kernel32/locale.c: partially implement GetUserGeoID()

Alexandre Julliard julliard at winehq.org
Wed Oct 10 05:47:33 CDT 2007


EA Durbin <ead1234 at hotmail.com> writes:

> +    if(!(hkey = create_registry_key())) return ret;
> +    hSubkey = NLS_RegOpenSubKey( hkey, geoW );
> +    count = sizeof(bufferW);
> +
> +    switch( GeoClass ){
> +    case GEOCLASS_NATION:
> +        NtQueryValueKey(hSubkey, &keyW, KeyValuePartialInformation, (LPBYTE)bufferW, count, &count);
> +        retID = strtolW( (LPCWSTR)info->Data, &end, 10 );

You need some error checking in there, the key and/or value may not
exist.

> +    case GEOCLASS_REGION:
> +       /* GetUserGeoID returns a GEOID from the table listed here 
> +       http://msdn2.microsoft.com/en-us/library/ms776390.aspx
> +       Default windows behavior is to post this code to the Geo/Nation Key during SetUserGeoID(), not sure how the region request is handled */

Please don't put URLs in the code, particularly not from MSDN since
they change all the time.

-- 
Alexandre Julliard
julliard at winehq.org



More information about the wine-devel mailing list