Bugs item #1970043, was opened at 2008-05-22 18:26
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=642714&aid=1970043&group_id=105970

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: clickthrough
Group: v3.0
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: mballou (mballou11)
Assigned to: Nobody/Anonymous (nobody)
Summary: CompareString not working on Windows 2000

Initial Comment:
The setupexe.exe is not using CompareString properly on a Windows 2000 machine 
causing all the command line parameters to not work properly.

The command line parsing which uses CompareString is failing because of the 
LOCALE_INVARIANT which apparently is only available on Windows XP and higher.

According to MSDN it should be like this:

On Windows XP and later:
        CompareString(LOCALE_INVARIANT, NORM_IGNORECASE, mystr, -1, 
_T("InLap"), -1); For earlier operating systems:
        DWORD lcid = MAKELCID(MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US), 
SORT_DEFAULT);
            CompareString(lcid, NORM_IGNORECASE, mystr, -1, _T("InLap"), -1);

I wrote this function to get the proper compare LCID for passing to the 
CompareString() function.

LCID GetLCIDCompare()
{
        LCID lcidCompare = LOCALE_INVARIANT;

        OSVERSIONINFO osvi;
        osvi.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
        if (GetVersionEx(&osvi))
        {
                if ( (osvi.dwMajorVersion < 5) || ( (osvi.dwMajorVersion == 5) 
&& (osvi.dwMinorVersion == 0) ))
                        lcidCompare = MAKELCID(MAKELANGID(LANG_ENGLISH, 
SUBLANG_ENGLISH_US), SORT_DEFAULT);
        }
        return lcidCompare;
}


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=642714&aid=1970043&group_id=105970

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
WiX-devs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wix-devs

Reply via email to