I'm working with an OCX that requires passing a pointer to a BSTR data type:
what version of Progress ?
10.2B
I was told that BSTR has something to do with putting the length to follow in the first two bytes, so I tried this...
DEFINE VARIABLE mpData AS MEMPTR.
SET-SIZE(mpData) = 17.
PUT-SHORT(mpData,1) = 2.
PUT-STRING(mpData,3) = "1".
PUT-SHORT(mpData,5) = 2.
PUT-STRING(mpData,7) = "3".
PUT-SHORT(mpData,9) = 3.
PUT-STRING(mpData,11) = "20".
PUT-SHORT(mpData,14) = 2.
PUT-STRING(mpData,16) = "0".
Hmm. http://msdn.microsoft.com/en-us/library/ms221069(v=vs.85).aspx
says that the first 4 bytes are the length ...
http://www.youtube.com/watch?v=ZCFCeJTEzNU
Many thanks! This is exactly what I needed! (Don't ask why I couldn't find this...)
Cheers,
Steve