Re: Feedback on recursive file search...

From: Schmidt (sss_at_online.de)
Date: 11/18/04


Date: Thu, 18 Nov 2004 03:52:28 +0100


"Mark Alexander Bertenshaw" <mark.bertenshaw@virgin.net> schrieb im
Newsbeitrag news:OeWVbeQzEHA.3840@tk2msftngp13.phx.gbl...

> >> Why do that when you can call the Unicode version of the API calls?
> >> (I assume that you aren't writing for Win95/98/Me anymore :-) ).
> > Because VB converts String-Params in API-Calls *always* to ANSI,
> > regardless if the Function is the 'A' or the 'W'-Version - if the
> > Params are Byref or Byval.
> >
> > If you can speed up the Unicode-Function 'FastFindW' in my posted
> > example without using ByteArrays - I would like to see how.
>
> What? You're still using Declares?
Of course, it's the normal way for the most VB-Programmers.
Copy'nPaste - full control - no need to recompile a typelib, if one wants to
change some Parameter to another, better suiting type.

> That's what type libraries are for,
not only - I use them most of the time to cast to special interfaces.

> because Unicode declarations of parameters are never converted.
Ack.

> Google for WinU.tlb for a good start.
I know this Tlbs from Bruce McKinney but never used them.

Olaf

BTW:
I've checked WinU.tlb in and changed the classic GetFilesAPI-Loop to use it
(remove the 'A' from FindFirst File and FindNextFile).
Now without implicite Unicode/ANSI-Conversion - but it's still 30% slower
than the universal approach FindFastA and 50% slower than FindFastW due to
some other positive effects of the bytearray-usage (fast Dot-Test) and more
efficient Buf-Copy compared with StripNulls.



Relevant Pages

  • Re: Feedback on recursive file search...
    ... it's the normal way for the most VB-Programmers. ... Copy'nPaste - full control - no need to recompile a typelib, ... Now without implicite Unicode/ANSI-Conversion - but it's still 30% slower ... than the universal approach FindFastA and 50% slower than FindFastW due to ...
    (microsoft.public.vb.general.discussion)
  • Re: what am I doing wrong? ww
    ... The slower you go with WW the more control you have. ... Unicorn's Profile: http://www.unicyclist.com/profile/12801 ... Posted Via Usenet.com Premium Usenet Newsgroup Services ...
    (rec.sport.unicycling)
  • Re: PIC controlled 12v waveform generator
    ... see when the voltage is ramped up, where the light actually fills the ... tubes from one end to the other. ... Hz or slower, with a sine wave type input. ... PWM control value and writing some BASIC or whatever to control the ...
    (sci.electronics.design)
  • Re: User TreeView
    ... panels...The treeview has also a property (DrawMode) that allows to take ... Fix also your date so that your message is not deleted (this is what I'll do ... It works but is much slower than the native control, ... It is also much slower in VB Express than in Visual Studio 2003. ...
    (microsoft.public.dotnet.languages.vb)