> I'm working on a project where we're building a .NET wrapper to IBM's MQ
> Workflow C++ API.
[quoted text clipped - 10 lines]
>
> rc = _service->Logon(uUsername, uPassword, FmcjService::Default );
I should tell you that I haven't done any .Net 2.0 development so this is a
bit of guesswork. When I looked up the string marshaller in the
documentation I found this about the return value:
<quote>
The address, in unmanaged memory, to where s was copied, or 0 if a null
reference (Nothing in Visual Basic) string was supplied.
</quote>
You may want to remove the calls to ToPointer() .
If that doesn't work, please reply here so that someone else may offer
better advice.
Regards,
Will
Kapil Khosla [MSFT] - 17 Mar 2005 17:28 GMT

Signature
This posting is provided "AS IS" with no warranties, and confers no
rights."Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm"
>> I'm working on a project where we're building a .NET wrapper to IBM's MQ
>> Workflow C++ API.
[quoted text clipped - 21 lines]
>
> You may want to remove the calls to ToPointer() .
I dont see anything wrong is using ToPointer() to convert a managed string
to a native string. The issue seems to be in rc = _service->Logon(uUsername,
uPassword, FmcjService::Default );
Could you share out more information on the type rc and _service, without
that it is very hard to understand what is going on.
Thanks.
Kapil