kernel32/locale.c: partially implement GetUserGeoID() (try2)
Alexandre Julliard
julliard at winehq.org
Fri Oct 12 04:38:56 CDT 2007
EA Durbin <ead1234 at 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 at winehq.org
More information about the wine-devel
mailing list