A 3rd-party SQLitening.dll written in PB wants strings BYVAL.
Is there a way to pass dynamic string from VB6 (which converts BYVAL to ASCIIZ?)
I can write another DLL and accept the strings as ASCIIZ and then pass
them onto the 3rd-party DLL BYVAL, but thought there might be a better way.
It looks like a PB DLL will accept a BYVAL string from VB6, but getting unpredictable results.
VB Code:
This seems to work:
VB6 calls mConnect that calls the 3rd party DLL function slConnect.
Is there a way to pass dynamic string from VB6 (which converts BYVAL to ASCIIZ?)
I can write another DLL and accept the strings as ASCIIZ and then pass
them onto the 3rd-party DLL BYVAL, but thought there might be a better way.
It looks like a PB DLL will accept a BYVAL string from VB6, but getting unpredictable results.
VB Code:
Code:
Private Sub Command1_Click() Dim sIp As String Dim PortNumber As Long Dim rsModChars As String Dim result As Long PortNumber = 51234 rsModChars = "E0" sIp = "192.168.0.101" rsModChars = "E0" result = slConnect(ByVal sIp, ByVal PortNumber, ByVal rsModChars) 'call 3rd party PB DLL.
VB6 calls mConnect that calls the 3rd party DLL function slConnect.
Code:
FUNCTION mConnect(rsServer AS ASCIIZ, BYVAL PortNumber AS LONG, rsModChars AS ASCIIZ) EXPORT AS LONG LOCAL result AS LONG ? rsServer slSetProcessMods "E0" result = slConnect(BYVAL rsServer, BYVAL PortNumber, BYVAL rsModChars) MSGBOX STR$(result) END FUNCTION
Comment