From: Kevin Provance on
"ralph" <nt_consulting64(a)yahoo.net> wrote in message
news:ij8646hupfq8ihdm0ck5h7mq50l7jjue2i(a)4ax.com...
:
: But you need to explain a bit more why you need the "As Any".

Me personally? None. I merely pointed it out to the OP before it became a
question. I don't like As Any. It's like a Variant, which I don't prefer
either.

I have two versions of SendMessage, ByString and ByLong, properly declared.
Takes a lot of the guesswork out of it.

From: ralph on
On Sun, 18 Jul 2010 13:41:01 -0400, "Kevin Provance" <k(a)p.c> wrote:

>"ralph" <nt_consulting64(a)yahoo.net> wrote in message
>news:ij8646hupfq8ihdm0ck5h7mq50l7jjue2i(a)4ax.com...
>:
>: But you need to explain a bit more why you need the "As Any".
>
>Me personally? None. I merely pointed it out to the OP before it became a
>question. I don't like As Any. It's like a Variant, which I don't prefer
>either.
>
>I have two versions of SendMessage, ByString and ByLong, properly declared.
>Takes a lot of the guesswork out of it.

ha. I wondered about that. As I assumed you knew all about "As Any".

I combined the first line with the last and it looked like you were
asking, so I just responded - just in case.

-ralph
From: Kevin Provance on

"ralph" <nt_consulting64(a)yahoo.net> wrote in message
news:s2p646lm6mgb63o5va7e74m9j8jatouo7g(a)4ax.com...
:
: ha. I wondered about that. As I assumed you knew all about "As Any".
:
: I combined the first line with the last and it looked like you were
: asking, so I just responded - just in case.
:

Contrary to popular opinion, I do actually know one or two things about VB -
versus the general idea I'm only around to poke (no pun) the neighborhood
trolls back across to their side of the tracks. <eg>

From: Dee Earley on
On 18/07/2010 16:44, ralph wrote:
> On Sun, 18 Jul 2010 16:40:31 +1000, Leo<ttdhead(a)gmail.com> wrote:
>
>
>>
>> I did mean to say a Standard DLL built using VB. I have vbAdvance
>> installed which will do the extra stuff for me.
>
> Ok. Always good to make sure.<g>
>
> What you do is compensate for the hidden conversion by converting it
> first. So your calls will look like this ...

Note also that using a type library means it won't do any conversion at all.

--
Dee Earley (dee.earley(a)icode.co.uk)
i-Catcher Development Team

iCode Systems

(Replies direct to my email address will be ignored.
Please reply to the group.)
From: ralph on
On Mon, 19 Jul 2010 09:29:35 +0100, Dee Earley
<dee.earley(a)icode.co.uk> wrote:

>On 18/07/2010 16:44, ralph wrote:
>> On Sun, 18 Jul 2010 16:40:31 +1000, Leo<ttdhead(a)gmail.com> wrote:
>>
>>
>>>
>>> I did mean to say a Standard DLL built using VB. I have vbAdvance
>>> installed which will do the extra stuff for me.
>>
>> Ok. Always good to make sure.<g>
>>
>> What you do is compensate for the hidden conversion by converting it
>> first. So your calls will look like this ...
>
>Note also that using a type library means it won't do any conversion at all.

There are many advantages to using a Type Library instead of Declare
directives for Standard DLLs, essentially removing some over-head in
making the call, but unfortunately this is not one of them.

The conversion VB does from a VB BSTR to an ANSI BSTR is built into
the VB VM (Runtime), and always occurs when VB passes a BSTR to an
external library (Win32 or anything else).

This *feature* was provided so that VB programs would be compatible
with both Windows 9x (non-Unicode) and Windows NT (Unicode) operating
systems. It even occurs if running on WinNT and making a call into
Unicode entry points in the Win32 (Wide versions).

-ralph
First  |  Prev  |  Next  |  Last
Pages: 1 2 3 4 5
Prev: New form on Main thread.
Next: Pasting text to browser