Hi VB experts.....
I am trying to implement a Win32 declare working from a VB example.....
I think I have most of it but not sure what to do with the following
VB code...... in particular the StrPtr() and VarPrt() functions:
' Convert the Unicode strings to null terminated ANSI byte arrays
' then get pointers to the byte arrays.
intElementCount = UBound(astrGSArgs)
ReDim aAnsiArgs(intElementCount)
ReDim aPtrArgs(intElementCount)
For intCounter = 0 To intElementCount
aAnsiArgs(intCounter) = StrConv(astrGSArgs(intCounter),
vbFromUnicode)
aPtrArgs(intCounter) = StrPtr(aAnsiArgs(intCounter))
Next
ptrArgs = VarPtr(aPtrArgs(0))
The VB declare looks like:
Private Declare Function gsapi_init_with_args Lib "gsdll32.dll" (ByVal
lngGSInstance As Long, ByVal lngArgumentCount As Long, ByVal
lngArguments As Long) As Long
.... and the example passes "ptrArgs" into "lngArguments"
Any help is appreciated..... thank you,
Jim
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>
|