#Help w/BSTR
5 messages in this thread
Betty,
OK! I have been able to trace through what Jim Butterfield gave
you, but I don't know what to do with BSTRs. I can locate all the
addresses (I used ARTM to find out what they were, in advance, so I would
know if I found the right things) with MemEd. I don't know how to convert
a BSTR to anything intelligible. HELP!
Steve
Steven,
A BSTR consists of a single length byte, followed by the contens of the
string.
-larry
Larry,
Is the string in ASCII? In what I was doing I could find the
location of the BSTR, but it wasn't readable as ASCII text. How would I
convert the string to a readable form?
Steve
Steven,
Yes, the string is in ASCII. As to finding it, you need to know what it
is that points to the string. If it is a regular pointer, it will point to
the length byte at the beginning (which of course is _not_ ASCII). If,
however, it is a BPTR, you will need to multiply it by 4, since a BPTR is a
pointer to relative longword, in order to get the BSTR's real address.
-larry
Larry,
Thanks. After your last message I got to thinking about what you
said, then after looking at what I had, I realized that what I had was
actually a pointer to the BSTR, rather than the string itself, which is
what I first thought. I then found the string, and sure enough, it was in
ASCII. Appreciate the help!
Steve