Page 1 of 1

How do I declare a pb dll in vb6

Posted: Fri Mar 12, 2004 5:43 pm
by netmon
procedurecdll() and proceduredll() are not working.

ex.
procedurecdll savesnapshot(name.s)
endprocedure


vb declare is as follows. declare sub also.
Public Declare Function savesnapshot Lib "c:\temp\netdll.dll" (ByVal name As String)

when i use savesnapshot text1.text i get a bad calling convention. I can call a dll if it doesn't take parameters, but not this.

funny thing is the function works but i guess then its done calling the function, thats when if fails out.

Posted: Sat Mar 13, 2004 8:47 am
by netmon
I solved this. It was the declare statement that was the culprit. I took out the public part and it seems to work not with no fuss. And I am using proceduredll not cdll.