Works like a charm. Thanks!
In a message dated 7/22/2004 11:30:33 AM Eastern Standard Time,
[EMAIL PROTECTED] writes:
in order to see the contents of a bstr*
you have to dereference the pointer.
you can also use _bstr_t to convert to a
"regular" string.
hope this helps.
void GettaBSTR(BSTR* bstr) {
*bstr =
SysAllocString("some string");
printf("this is the string: %S",
*bstr);
}
BSTR bs;
GettaBSTR(&bs);
_bstr_t bst
= bs;
printf("this is the string: %s", (const char*)
bst);
std::string
s = (const char*) bst;
printf("this is the string: %s",
s.data());
SysFreeString(bs);
Does Anybody know how I can convert a BSTR* to a type that will output
the contents of the String to the screen?
I am currently getting only what seems to be the address of the BSTR at
the screen.
In a message dated 7/21/2004 5:43:55 PM Eastern Standard Time,
[EMAIL PROTECTED] writes:
Are you using the MS SOAP
toolkit or .NET? Also, are you using Visual Studio 6 or 7
(.NET)?
Jim
[EMAIL PROTECTED] wrote:
>
Hello, > > I am creating a client for my axis web
service in Visual Studio. By > using Visual Studio to add a web
reference, the program creates several > data objects of type
BSTR. > > I am wondering if anybody could give me a
quick explanation why my > Strings are getting placed as BSTR's,
and one is being placed as a > BSTR*. Now the BSTR* is becoming a
complete obstacle because I don't > even know how to get it
initialized and I can't find anything on it. > > If
somebody could give me a quick rundown of what I have to do to these
> BSTR's to get them initialized with the String values and how
they'll > run through axis, that'd be great. > >
Thanks in advance. > James Crosson >
[EMAIL PROTECTED]
|