From: Leo on
Is there a set of functions that do the oposite to the *ptr functions.
I want to be able to get a pointer as the parameter for a native DLL to
avoid the ANSI to UNICODE conversion.


From: Jim Mack on
Leo wrote:
> Is there a set of functions that do the oposite to the *ptr
> functions. I want to be able to get a pointer as the parameter for
> a native DLL to avoid the ANSI to UNICODE conversion.

I don't see how that's the opposite of the xPtr functions, it's
exactly what StrPtr does -- it gives you a pointer to a Unicode BSTR
that you can pass out to external code.

--
Jim Mack
Twisted tees at http://www.cafepress.com/2050inc
"We sew confusion"

From: Leo on
Jim Mack formulated on Sunday :
> Leo wrote:
>> Is there a set of functions that do the oposite to the *ptr
>> functions. I want to be able to get a pointer as the parameter for
>> a native DLL to avoid the ANSI to UNICODE conversion.
>
> I don't see how that's the opposite of the xPtr functions, it's
> exactly what StrPtr does -- it gives you a pointer to a Unicode BSTR
> that you can pass out to external code.

But can I write a DLL that is being passed a pointer and use that
pointer with a VB function or should I investigate the CopyMemory API?


From: Jim Mack on
Leo wrote:
> Jim Mack formulated on Sunday :
>> Leo wrote:
>>> Is there a set of functions that do the oposite to the *ptr
>>> functions. I want to be able to get a pointer as the parameter for
>>> a native DLL to avoid the ANSI to UNICODE conversion.
>>
>> I don't see how that's the opposite of the xPtr functions, it's
>> exactly what StrPtr does -- it gives you a pointer to a Unicode
>> BSTR that you can pass out to external code.
>
> But can I write a DLL that is being passed a pointer and use that
> pointer with a VB function or should I investigate the CopyMemory
> API?

I don't know what you really want. Something more concrete might help,
maybe an example or some code. What is your larger goal here?

What language will the DLL be written in? How will it be invoked
(Declare, COM, ??). What do you mean by 'and use that pointer with a
VB function'? I thought you asked about passing a pointer OUT of a VB
function.

--
Jim Mack
Twisted tees at http://www.cafepress.com/2050inc
"We sew confusion"