C++ dll calling from Vb
-
Hi, I have a dll writen in C++ which contains a fn that takes a char** parameter. Now, if I call this fn from a VB application, how can I specify aargument-value to the fn. it shows a 'long' in my VB method call. Shenthil
char** means : pointer to pointer of type char pointers are 4 byte integers in Win32 so long is the VB6 type that can represent it.. If you use COM pass BSTRs not chars
-
Hi, I have a dll writen in C++ which contains a fn that takes a char** parameter. Now, if I call this fn from a VB application, how can I specify aargument-value to the fn. it shows a 'long' in my VB method call. Shenthil
Hi Shenthil, Check this article from the Microsoft Knowledge base HOWTO: Pass a String Between Visual Basic and Your C DLL Fabian
-
Hi Shenthil, Check this article from the Microsoft Knowledge base HOWTO: Pass a String Between Visual Basic and Your C DLL Fabian
-
Hi Shenthil, Check this article from the Microsoft Knowledge base HOWTO: Pass a String Between Visual Basic and Your C DLL Fabian
see, I am using the foll. Win32 API. here I want to pass the argument for the third parameter- lpServiceArgVectors . If I call the same api from my .cpp program I will pass the arg.vectors or arg.array. But, in VB how can I pass the vector/array. can u help me? Public Declare Function StartService Lib "advapi32.dll" Alias "StartServiceA" (ByVal hService As Long, ByVal dwNumServiceArgs As Long, ByVal lpServiceArgVectors As Long) As Long Shenthil
-
see, I am using the foll. Win32 API. here I want to pass the argument for the third parameter- lpServiceArgVectors . If I call the same api from my .cpp program I will pass the arg.vectors or arg.array. But, in VB how can I pass the vector/array. can u help me? Public Declare Function StartService Lib "advapi32.dll" Alias "StartServiceA" (ByVal hService As Long, ByVal dwNumServiceArgs As Long, ByVal lpServiceArgVectors As Long) As Long Shenthil
Hi Check this one HOWTO: Pass Arrays Between Visual Basic and C Fabian