Click to See Complete Forum and Search --> : problem using dll


manikamaraj
February 28th, 2004, 03:15 PM
Dear pals!

i encounter a error on visualbasic when refer a api from dll developed using vc++.The error message is

"member already exists in a object module from which this object
module derives".

Here my code:

in vc header

API gn_error __stdcall CheckForConnection();
API gn_error __stdcall SendSms(char*,char*);
API gn_error __stdcall SendRingtone(char*,char*);
API gn_error __stdcall GetSms(char*,char*,char*);

in vc .def file

LIBRARY "gnokiid"
EXPORTS
CheckForConnection @1
SendSms @2
SendRingtone @3
GetSms @4

in vb delarations

Private Declare Function CheckForConnection Lib "gnokiid.dll" () As Integer

Private Declare Function SendSms Lib "gnokiid.dll" Alias "SendSms" (ByVal lpNUmber As String, ByVal lpMessage As String) As Integer

Private Declare Function GetSms Lib "gnokii.dll" (ByVal memtype As Integer, ByVal start As String, ByVal ed As String) As Integer

Private Declare Function SendRingtone Lib "gnokii.dll" (ByVal memtype As String, ByVal start As String, ByVal ed As String) As Integer



Please urgent requirement!
if any one known about it please help me!

regards
kamaraj.M

:confused:

Fandu_Nagesh
March 1st, 2004, 06:31 AM
Hi,
Actully You need to ask this question in VB forums not in OS Issues. Just few days back only I faced this problem.

I resolved this issue by writing the C/c++ funcions like this..

__declspec(dllexport) long _stdcall MyFunc(HDC hPicDC, long *size_x, long *size_y)

Change the function prototype as per requirement.


Hope so this helps you.
Regards
Nagesh