How I can make a DLL in MASM32 that it can to pass data to a receive from a procedure made in Visual Basic ?
Posted on 2000-12-16 11:36:00 by JR
You can write DLL (MyDll.DLL) code in MASM as usually , e.c. : ... MyGodFunc PROC EXPORT par1:DWORD, par2:LPSTR, result:DWORD ... MyGodFunc ENDP Then define in VB: Declare Function MyGodFunc Lib "MyDll.DLL" (ByVal par1 As Long, ByVal par2 As String, ByRef result As Long) As Long Real life examples: Declare Function RegOpenKeyA Lib "ADVAPI32.DLL" (ByVal hkey As Long, ByVal sSubkey As String, ByRef hkeyResult As Long) As Long Declare Function RegCloseKey Lib "ADVAPI32.DLL" (ByVal hkey As Long) As Long Hope that helps.
Posted on 2000-12-16 11:56:00 by AndyCar
There is a good book on this subject and even though I can't say I have read it, but it might help. It is called "Win32 API for the VB programmer" or something like that.
Posted on 2000-12-16 14:06:00 by drsmith
Gee, as long as you intend it to be used from VB, why not give your functions a COM object wrapper? Just plugging my site. :-)
Posted on 2000-12-16 20:06:00 by Ernie