Changeset 5764 for trunk/src/kernel32/lang.cpp
- Timestamp:
- May 20, 2001, 10:17:42 AM (24 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kernel32/lang.cpp
r5740 r5764 1 /* $Id: lang.cpp,v 1.3 5 2001-05-19 08:24:47sandervl Exp $ */1 /* $Id: lang.cpp,v 1.36 2001-05-20 08:17:41 sandervl Exp $ */ 2 2 /* 3 3 * Win32 language API functions for OS/2 … … 524 524 LocaleFromUniStr(pInfoItem,wbuf,&ulInfoLen); 525 525 UniFreeMem(pInfoItem); 526 if ((++wbuf[0])=='7') wbuf[0]='0';527 526 break; 528 527 … … 914 913 //****************************************************************************** 915 914 //****************************************************************************** 916 917 918 919 #if 0920 PHS: disabled for ole2nls.cpp921 922 /*****************************************************************************923 * Name : BOOL SetLocaleInfoA924 * Purpose : The SetLocaleInfoA function sets an item of locale information.925 * It does so by making an entry in the process portion of the926 * locale table. This setting only affects the user override portion927 * of the locale settings; it does not set the system defaults.928 * Only certain types of locale information, or LCTYPE values, can929 * be set by this function. See the following Remarks section for a930 * list of valid LCTYPE values.931 * The locale information is always passed in as a null-terminated932 * Unicode string in the Unicode (W) version of the function, and as933 * a null-terminated ANSI string in the ANSI (A) version. No integers934 * are allowed by this function; any numeric values must be specified935 * as Unicode or ANSI text. Each LCTYPE has a particular format, as936 * noted in Locale Identifiers.937 * Parameters: LCID Locale locale identifier938 * LCTYPE LCType type of information to set939 * LPCTSTR lpLCData pointer to information to set940 * Variables :941 * Result : TRUE / FALSE942 * Remark :943 * Status : UNTESTED STUB944 *945 * Author : Patrick Haller [Mon, 1998/06/15 08:00]946 *****************************************************************************/947 948 BOOL WIN32API SetLocaleInfoA(LCID Locale,949 LCTYPE LCType,950 LPCSTR lpLCData)951 {952 dprintf(("KERNEL32: SetLocaleInfoA(%08xh,%08xh,%08xh) not implemented.\n",953 Locale,954 LCType,955 lpLCData));956 957 return (FALSE);958 }959 960 961 /*****************************************************************************962 * Name : BOOL SetLocaleInfoW963 * Purpose : The SetLocaleInfoW function sets an item of locale information.964 * It does so by making an entry in the process portion of the965 * locale table. This setting only affects the user override portion966 * of the locale settings; it does not set the system defaults.967 * Only certain types of locale information, or LCTYPE values, can968 * be set by this function. See the following Remarks section for a969 * list of valid LCTYPE values.970 * The locale information is always passed in as a null-terminated971 * Unicode string in the Unicode (W) version of the function, and as972 * a null-terminated ANSI string in the ANSI (A) version. No integers973 * are allowed by this function; any numeric values must be specified974 * as Unicode or ANSI text. Each LCTYPE has a particular format, as975 * noted in Locale Identifiers.976 * Parameters: LCID Locale locale identifier977 * LCTYPE LCType type of information to set978 * LPCTSTR lpLCData pointer to information to set979 * Variables :980 * Result : TRUE / FALSE981 * Remark :982 * Status : UNTESTED STUB983 *984 * Author : Patrick Haller [Mon, 1998/06/15 08:00]985 *****************************************************************************/986 987 BOOL WIN32API SetLocaleInfoW(LCID Locale,988 LCTYPE LCType,989 LPCWSTR lpLCData)990 {991 dprintf(("KERNEL32: SetLocaleInfoW(%08xh,%08xh,%08xh) not implemented.\n",992 Locale,993 LCType,994 lpLCData));995 996 return (FALSE);997 }998 999 1000 /*****************************************************************************1001 * Name :1002 * Purpose :1003 * Parameters:1004 * Variables :1005 * Result :1006 * Remark :1007 * Status : UNTESTED STUB1008 *1009 * Author : Patrick Haller [Tue, 1998/06/16 23:00]1010 *****************************************************************************/1011 1012 ODINFUNCTION3(DWORD,VerLanguageNameA,DWORD, wLang,1013 LPSTR, szLang,1014 DWORD, nSize)1015 {1016 char buffer[80];1017 LPCSTR name;1018 DWORD result;1019 1020 dprintf(("KERNEL32: VerLanguageNameA not implemented"));1021 1022 /*1023 * First, check \System\CurrentControlSet\control\Nls\Locale\<langid>1024 * from the registry.1025 */1026 1027 #if 01028 PHS: disabled because if interlinkage with registry1029 sprintf( buffer,1030 "\\System\\CurrentControlSet\\control\\Nls\\Locale\\%08x",1031 wLang );1032 1033 result = RegQueryValueA(HKEY_LOCAL_MACHINE,1034 buffer,1035 szLang,1036 (LPLONG)&nSize );1037 if (result == ERROR_SUCCESS ||1038 result == ERROR_MORE_DATA)1039 return nSize;1040 #endif1041 1042 /*1043 * If that fails, use the internal table1044 * (actually, Windows stores the names in a string table resource ...)1045 */1046 1047 lstrcpynA(szLang,1048 "Language-Neutral",1049 nSize);1050 1051 return strlen(szLang);1052 }1053 1054 /*****************************************************************************1055 * Name :1056 * Purpose :1057 * Parameters:1058 * Variables :1059 * Result :1060 * Remark :1061 * Status : UNTESTED STUB1062 *1063 * Author : Patrick Haller [Tue, 1998/06/16 23:00]1064 *****************************************************************************/1065 1066 ODINFUNCTION3(DWORD,VerLanguageNameW,DWORD, wLang,1067 LPWSTR, szLang,1068 DWORD, nSize)1069 {1070 LPSTR szLangA;1071 DWORD rc;1072 1073 if ( (szLang == NULL) ||1074 (nSize == 0) ) // validate parameters1075 return 0;1076 1077 szLangA = (LPSTR)HEAP_malloc(nSize + 1);1078 rc = VerLanguageNameA(wLang,1079 szLangA,1080 nSize);1081 if (rc == ERROR_SUCCESS || rc == ERROR_MORE_DATA)1082 AsciiToUnicodeN(szLangA,1083 szLang,1084 nSize);1085 HEAP_free(szLangA);1086 return rc;1087 }1088 1089 1090 #endif1091
Note:
See TracChangeset
for help on using the changeset viewer.