Hm...
Don't know what to do. The SafeArrayPutElement doesn't seem to
work for me. I have the following code
Tried different variations with AsciiZ and String ptr but I get
this strange result. It should print 0
------------------
Don't know what to do. The SafeArrayPutElement doesn't seem to
work for me. I have the following code
Code:
%VT_BSTR = 8 Dim SafeArrayBoundDt As SAFEARRAYBOUND SafeArrayBoundDt.lLBound = 0 SafeArrayBoundDt.cElements = 100 psa = SafeArrayCreate(%VT_BSTR, 1, SafeArrayBoundDt) If psa = 0 Then Print "Error creating SafeArray." Else Print "Successfully created SafeArray." End If Dim x(0:1) As Long Dim xPtr As Long ' No pointer here - will be passed by reference. Dim Datastr As AsciiZ Ptr Dim TextStr As String x(0) = 0 xPtr = VarPtr(x(0)) TextStr = "Hello" DataStr = VarPtr(TextStr) Print SafeArrayPutElement(psa, xPtr, DataStr)
this strange result. It should print 0
------------------
Comment