How I can make a DLL in MASM32 that it can to pass data to a receive from a procedure made in Visual Basic ?
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.
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.
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. :-) http://here.is/COMinASM