I'm familiarizing myself with lower level functions (and am aware of Tracker's non-support policy re: same).
I have successfully executed the following functions in order:
PXCp_StringGetB(hString, , BufLen) ... the first call with buf arg NULL to obtain buffer length
IN that code segment, BufLen is returned = 4
Then I want to actually get the string....
redim buf(BufLen) ... where buf was initially declared dim buf as Byte(), as it appears to me from docs that this is a ByteArray we're working with.
But no matter how I pass it to PXCp_StringGetB(hString, xxx, BufLen) (where 'xxx' is any number of attempts to properly pass the buffer... including "buf(0", "buf(1)", "byval buf", etc),
I get either an error or the value 0 (zero) returned in each of the 4 elements of the buf array.
res = PXCp_StringGetB(lKeyName, ByVal buf(0), BufLen) returns res = 0 (which apparently means success), but buf() contains only zeroes in each element. lKeyName was a large (long) value at time of call.
How do I make that call to get good data back? I presume a proper result is that each element of the byte array will contain an ascii value? Do I need to use a Windows API such as CopyMemory or something? I will research that next.
I tried to experiment with this with the C# and VB.net examples (since I think those languages are bit more capable in such areas), but found that even the declares had not been provided for many of those functions.