#1623 Inconsistent prototype of VerQueryValue

None
closed-fixed
2016-06-03
2012-02-05
Yak!
No

The first parameter of VerQueryValue should be LPCVOID according to MSDN document.
On the other hand, in winver.h in w32api, the first parameter is declared as const LPVOID.
LPCVOID and const LPVOID are different types. The former is a pointer to const void and the latter is a const pointer to void.

http://cygwin.com/cgi-bin/cvsweb.cgi/src/winsup/w32api/include/winver.h?rev=1.5&content-type=text/x-cvsweb-markup&cvsroot=src
http://msdn.microsoft.com/en-us/library/ms647464\(VS.85).aspx

Discussion

  • Earnie Boyd

    Earnie Boyd - 2012-06-14
    • assigned_to: nobody --> ir0nh34d
     
  • Earnie Boyd

    Earnie Boyd - 2012-08-04
    • milestone: --> Aged_issue
    • assigned_to: ir0nh34d --> earnie
    • status: open --> closed-fixed
     
  • Earnie Boyd

    Earnie Boyd - 2012-08-04

    The problem you report has caused modification in some fashion in
    the official CVS for the given package. The w32api and
    mingw-runtime official CVS reside in the winsup CVS directory tree for Cygwin. If you still find problems then please open a
    new report.

     
  • Keith Marshall

    Keith Marshall - 2016-06-03

    LPCVOID and const LPVOID are different types. The former is a pointer to const void and the latter is a const pointer to void.

    This is untrue. Eliminate the nasty Microsoft obfuscation, and both translate to identically the same underlying type: const void *.