Re: how to read two bytes from string and convert to long?

Tech-Archive recommends: Fix windows errors by optimizing your registry



"J French" <erewhon@xxxxxxxxxx> wrote in message
news:42f47f05.8559932@xxxxxxxxxxxxxxxxxxxxxxx
>
> If you have set the buffer up as a String then there is a small chance
> that under some regional settings the ANSI -> UNICODE conversion will
> do something horrible

Probably. In fact, if this is a problem, then it is likely to always be a
problem.

> It is actually quite unusual for Windows APIs to return the required
> length in the data buffer
> - normally the required length is returned in a variable

Yes. When I said it is common, I was mainly refering to the technique of
calling a function twice; once to get the sizw required for the data, then
again for the data.

> Realistically increasing the size of the buffer and re-showing the
> Dialog is a pretty nasty was of confusing the User

Where is it suggested that that be done?

> Interestingly one could quite easily select more than 256 files each
> with a name 256 (? or 255) long, in which case those 2 bytes would be
> simply giving back a lie. (Just checked MAX_PATH is actually 260)

That is a guess, correct? We don't know what the dialog would do if we
select so many files that the size required would be too big. It is possible
that the dialog would not allow it.


.



Relevant Pages

  • Re: String Matching Problem
    ... thrown in the buffer, so later it can be found by that other thread. ... looking for(what if the response was actually already in the buffer from ... it returns it(like the perfect scenario earlier). ...
    (comp.lang.ruby)
  • Re: how to read two bytes from string and convert to long?
    ... >> If you have set the buffer up as a String then there is a small chance ... >calling a function twice; once to get the sizw required for the data, ...
    (microsoft.public.vb.winapi)
  • Re: Cano 300d (rebel) to 350d (XT) worth the swap?
    ... >I have been using a Canon 300d for the last 10 months and don't have any ... However I now have the chance to change it to a 350d for ... XT's faster operation and larger buffer. ... 8MP over 6MP advantage is slight. ...
    (rec.photo.digital)
  • Re: Ada bench : count words
    ... Here is a FSM/OS_Lib variant, a shameless one, I must admit. ... on my FC3 machine. ... But of course it has no chance against: ... case Buffer is ...
    (comp.lang.ada)
  • Re: Newbie howto question.
    ... >> do is read each html file into a buffer, testing for the relevant line, ... It's moderately easier in higher-level languages, ... >> I'm using ANSI C and wish to avoid any non-standard usages. ... C99 is "ANSI C" - it's the most recent version of the ISO C standard, ...
    (comp.programming)