/*
Enumerations
*/
+
+
+#define GEOID_NOT_AVAILABLE (-1)
+/*
+ GEO information types for clients to query
+*/
+
+enum SYSGEOTYPE {
+ GEO_NATION = 0x01,
+ GEO_LATITUDE = 0x02,
+ GEO_LONGITUDE = 0x03,
+ GEO_ISO2 = 0x04,
+ GEO_ISO3 = 0x05,
+ GEO_RFC1766 = 0x06,
+ GEO_LCID = 0x07,
+ GEO_FRIENDLYNAME = 0x08,
+ GEO_OFFICIALNAME = 0x09,
+ GEO_TIMEZONES = 0x0A,
+ GEO_OFFICIALLANGUAGES = 0x0B,
+};
+
+/*
+ More GEOCLASS defines will be listed here
+*/
+
+enum SYSGEOCLASS {
+ GEOCLASS_NATION = 16,
+ GEOCLASS_REGION = 14,
+};
#define RASCS_DONE 0x2000
-/* $Id: lang.c,v 1.1 2003/09/20 23:37:56 weiden Exp $
+/* $Id: lang.c,v 1.2 2003/09/21 01:47:02 weiden Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT : ReactOS user mode libraries
#define NDEBUG
#include <kernel32/kernel32.h>
+
+static LCID SystemLocale = MAKELCID(LANG_ENGLISH, SORT_DEFAULT);
+
//#define _OLE2NLS_IN_BUILD_
/*
- * @unimplemented
+ * @implemented
*/
LCID
STDCALL
LCID Locale
)
{
- SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
- return 0;
+ switch(Locale)
+ {
+ case LOCALE_SYSTEM_DEFAULT:
+ return GetSystemDefaultLCID();
+
+ case LOCALE_USER_DEFAULT:
+ return GetUserDefaultLCID();
+
+ /*case LOCALE_NEUTRAL:
+ return MAKELCID(LANG_NEUTRAL, SUBLANG_NEUTRAL);*/
+ }
+
+ /* ported from wine, is that right? */
+ return MAKELANGID(PRIMARYLANGID(Locale), SUBLANG_NEUTRAL);
}
GEOID ParentGeoId,
GEO_ENUMPROC lpGeoEnumProc)
{
- SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
- return 0;
+ if(!lpGeoEnumProc)
+ {
+ SetLastError(ERROR_INVALID_PARAMETER);
+ return FALSE;
+ }
+
+ switch(GeoClass)
+ {
+ case GEOCLASS_NATION:
+ /*RtlEnterCriticalSection(&DllLock);
+
+ FIXME - Get GEO IDs calling Csr
+
+ RtlLeaveCriticalSection(&DllLock);*/
+
+ SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+ break;
+
+ default:
+ SetLastError(ERROR_INVALID_FLAGS);
+ return FALSE;
+ }
+
+ return FALSE;
}
/*
- * @unimplemented
+ * @implemented
*/
LCID
STDCALL
GetSystemDefaultLCID (VOID)
{
- /* FIXME: ??? */
- SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
- return MAKELCID(
- LANG_ENGLISH,
- SORT_DEFAULT
- );
+ return SystemLocale;
}
#endif