Windows 2000 does support ConvertStringSidToSid (see PS.)
Converting SIDs Between Strings and Binary
Posted by Brian Friesen on December 17th, 2001
http://www.codeguru.com/cpp/w-p/system/security/article.php/c5659/Converting-SIDs-Between-Strings-and-Binary.htm
...
Starting in Windows 2000 Microsoft added two APIs for converting SIDs. They are ConvertStringSidToSid() and ConvertSidToStringSid(). The down-side to these APIs is they require the Platform SDK (for the file SDDL.H) and they don't work on Windows NT. If you are content with these restrictions, then I encourage you to use the Microsoft APIs. ... |
The SDDL.h in Windows SDK 7.1 has
1 2 3 4 5 6 7 8
|
#if(_WIN32_WINNT >= 0x0500)
BOOL
WINAPI
ConvertSidToStringSidA(
__in PSID Sid,
__deref_out LPSTR *StringSid
);
|
and the header in MinGW 4.7.2 is using
#if (WINVER >= 0x0500)
So maybe you need to #define WINVER, too?
(Unless you need to support old systems, using a higher value for WINVER/_WIN32_WINNT might make sense. See list here:
Using the Windows Headers
http://msdn.microsoft.com/en-us/library/windows/desktop/aa383745%28v=vs.85%29.aspx )
Andy
PS I think that MSDN's "Minimum supported client" no longer necessarily means the version the API turned up it, as it once did (or at least I used to think it did?) For example, the minimum supported client for CreateFile is Windows XP, where time now apparently starts (since Windows 2000 is no longer supported). Of course, CreateFile turned up at the dawn of time, in Windows NT 3.1.
But it appears that the entries aren't all in step. The entry for CloseHandle still refers to Windows 2000 Professional (I'm pretty sure CloseHandle predates that!)