Re: VerQueryValue

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

From: Danny (NOSPAMFORdaniel_ahorn_at_yahoo.com)
Date: 01/31/05


Date: Mon, 31 Jan 2005 17:26:50 GMT

Date: Sun, 30 Jan 2005 17:25:07 -0800
Name: "Sam Hobbs" <samuel@social.rr.com_change_social_to_socal>

>> I'm sorry, Sam, but you're completely missing the point here.
>
>What point? I think if the "point" had been clear enough I would not have
>missed it.

You managed quite masterfully. The point was very clear all along: How
do I make this call work? A hint: reading the Subject often helps.

>Note that when I read your initial question, it had been a year or two since
>I had written code using VerQueryValue. I did not understand a lot of what
>was said in the original question and the dump had no value at the time.

Which then begs the obvious question...

And it explains your inability to locate the problem.

>I think if you read what I said, there is very little, if anything, that is
>worth complaining about. I really think you were too quick to complain and
>resisted admitting what the problems were. I know I answered the question
>*why* the call failed; you just don't want to admit the mistakes.

Huh? I found the error myself and I said so! Are we reading the same
messages?

All you did is go on about error checking, code style (hello? this is
*test* code) and complain about cross posting (which nobody else seems
to mind).

Contrast that to Karl's response with working code. After comparing it
to mine I was able to locate the problem within minutes and then
promptly reported it here.

>There were at least three problems with the call to VerQueryValue.
>
>(1) You used double backslashes instead of single backslashes.

Irrelevant. The way the call was defined, using single backslashes
would've made no difference whatsoever (as I found out because I tried
all permutations, single and double).

>(2) You used the wrong lang-codepage value (I am not sure about that, but my
>guess is that the value you were using was incorrect).

Incorrect guesswork. But even if it were correct: See above.

>(3) You used "lpVersion" for the address of the version value pointer buffer
>instead of "VarPtr(lpVersion)".

Which you did *NOT* mention at all! (I just re-read your original
reply which I strongly advise you do as well.)

Only *AFTER* I found the problem myself and reported it, did you
piggy-back with a "me-too" comment offering an "alternative" solution.

Of course, once I found the problem, *anyone* could've come up with
many alternate solutions.

>Instead of admitting those problems, you sad that the declare for the
>VerQueryValue address of the pointer parameter was incorrect. The declare
>was correct if you used "VarPtr(lpVersion)".

Which you did *NOT* write in your original reply. If you did (instead
of unwarranted condescending remarks) we would not have this
discussion.

>So I posted working code. It seems strange to me that you would imply I did
>not answer the question *why* the call failed.

You did *NOT* answer why. Only *AFTER* I myself answered why, did you
comment with alternate code. => Check the thread!! <=

Anyway, I've got better things to do, so I think I'll just follow
Tony's lead (apparently, you do this often) and wrap it up with what
he said: "Have it your way...".

Danny

(You guessed it! ;o) Remove NOSPAMFOR before emailing.)



Relevant Pages

  • Re: VerQueryValue
    ... reading the Subject often helps. ... *test* code) and complain about cross posting (which nobody else seems ... >You used double backslashes instead of single backslashes. ... >guess is that the value you were using was incorrect). ...
    (microsoft.public.vb.syntax)
  • Re: VerQueryValue
    ... reading the Subject often helps. ... *test* code) and complain about cross posting (which nobody else seems ... >You used double backslashes instead of single backslashes. ... >guess is that the value you were using was incorrect). ...
    (microsoft.public.vb.general.discussion)
  • Re: PING Tihomir
    ... Reading up? ... you didn't sound like a mess at all. ... I'm probably way too soft on this but that's just me LOL ... a bleak financial situation we have little to complain about. ...
    (alt.support.stop-smoking)
  • Pam_radius readme
    ... Can anyone tell me whether I am reading this incorrectly. ... The sample config shows the username and password in plain ... Is this incorrect? ...
    (FreeBSD-Security)
  • Re: threads vs. processes
    ... >> stipulation you're making in the standard. ... > Your reading is incorrect because it is incorrect for real systems. ...
    (comp.unix.programmer)