EA Durbin <ead1234(a)hotmail.com> writes:
GEOID WINAPI GetUserGeoID( GEOCLASS GeoClass ) { - FIXME("%d\n",GeoClass); - return GEOID_NOT_AVAILABLE; + GEOID ret = GEOID_NOT_AVAILABLE; + static const WCHAR geoW[] = {'G','e','o',0}; + static const WCHAR nationW[] = {'N','a','t','i','o','n',0}; + WCHAR bufferW[10], *end;
The buffer is too small since it has to contain the key information too.
+ switch(GeoClass){ + case GEOCLASS_NATION: + if((NtQueryValueKey(hSubkey, &keyW, KeyValuePartialInformation, (LPBYTE)bufferW, count, &count) == STATUS_SUCCESS) && (info->DataLength)) + ret = strtolW((LPCWSTR)info->Data, &end, 10);
You have to make sure the buffer is null-terminated. -- Alexandre Julliard julliard(a)winehq.org