803 HKEY hkLocations, hkCards, hkCardLocations, hsubkey;
804 int numlocations, numcards;
807 char *loc_key_name =
NULL;
808 char *card_key_name =
NULL;
817 TRACE(
"(%p, %08x, %p (tot. size %d)\n", hLineApp, dwAPIVersion,
818 lpTranslateCaps, lpTranslateCaps->dwTotalSize );
823 ERR(
"unexpected registry error 1.\n");
826 lendword =
sizeof(
DWORD);
833 ERR(
"unexpected registry error 2.\n");
837 if( maxlockeylen < 10)
844 while(
RegEnumKeyA(hkLocations,
i, loc_key_name, maxlockeylen)
848 if(
_strnicmp(loc_key_name,
"location", 8) ||
867 if(numlocations == 0) {
903 if( maxcardkeylen < 6) maxcardkeylen = 6;
906 while(
RegEnumKeyA(hkCards,
i, card_key_name, maxcardkeylen) ==
948 if ( lpTranslateCaps->dwNeededSize > lpTranslateCaps->dwTotalSize ) {
954 TRACE(
"Insufficient space: total %d needed %d used %d\n",
955 lpTranslateCaps->dwTotalSize,
956 lpTranslateCaps->dwNeededSize,
957 lpTranslateCaps->dwUsedSize);
961 lpTranslateCaps->dwUsedSize = lpTranslateCaps->dwNeededSize;
962 lpTranslateCaps->dwNumLocations = numlocations;
964 lpTranslateCaps->dwNumLocations;
966 lpTranslateCaps->dwCurrentLocationID = currentid;
967 lpTranslateCaps->dwNumCards = numcards;
969 lpTranslateCaps->dwNumCards;
970 lpTranslateCaps->dwCardListOffset = lpTranslateCaps->dwLocationListOffset +
971 lpTranslateCaps->dwLocationListSize;
972 lpTranslateCaps->dwCurrentPreferredCardID = 0;
974 strptr = ((
LPBYTE) lpTranslateCaps) +
975 lpTranslateCaps->dwCardListOffset + lpTranslateCaps->dwCardListSize;
983 while(
RegEnumKeyA(hkLocations,
i, loc_key_name, maxlockeylen)
987 if(
_strnicmp(loc_key_name,
"location", 8) ||
991 size_val=
sizeof(
DWORD);
1018 (
LPBYTE) lpTranslateCaps;
1030 size_val=
sizeof(
DWORD);
1039 if ( hkCardLocations) {
1040 size_val=
sizeof(
DWORD);
1041 if(
RegOpenKeyA(hkCardLocations, loc_key_name, &hsubkey) ==
1050 if(currentid == -1){
1052 lpTranslateCaps->dwCurrentLocationID = currentid;
1055 lpTranslateCaps->dwCurrentPreferredCardID =
1057 TRACE(
"added: ID %d %s CountryCode %d CityCode %s CardID %d " 1058 "LocalAccess: %s LongDistanceAccess: %s CountryID %d " 1059 "Options %d CancelCallWait %s\n",
1076 while(
RegEnumKeyA(hkCards,
i, card_key_name, maxcardkeylen) ==
1080 if(
_strnicmp(card_key_name,
"card", 4) ||
1083 size_val=
sizeof(
DWORD);
1109 (
LPBYTE) lpTranslateCaps;
1111 size_val=
sizeof(
DWORD);
1114 TRACE(
"added card: ID %d name %s SameArea %s LongDistance %s International %s Options 0x%x\n",
1131 TRACE(
" returning success tot %d needed %d used %d\n",
1132 lpTranslateCaps->dwTotalSize,
1133 lpTranslateCaps->dwNeededSize,
1134 lpTranslateCaps->dwUsedSize );
LONG WINAPI RegOpenKeyA(HKEY hKey, LPCSTR lpSubKey, PHKEY phkResult)
LONG WINAPI RegQueryValueExA(_In_ HKEY hkeyorg, _In_ LPCSTR name, _In_ LPDWORD reserved, _Out_opt_ LPDWORD type, _Out_opt_ LPBYTE data, _Inout_opt_ LPDWORD count)
DWORD dwLongDistanceRuleOffset
LONG WINAPI RegQueryInfoKeyA(HKEY hKey, LPSTR lpClass, LPDWORD lpcClass, LPDWORD lpReserved, LPDWORD lpcSubKeys, LPDWORD lpcMaxSubKeyLen, LPDWORD lpcMaxClassLen, LPDWORD lpcValues, LPDWORD lpcMaxValueNameLen, LPDWORD lpcMaxValueLen, LPDWORD lpcbSecurityDescriptor, PFILETIME lpftLastWriteTime)
INT WINAPI GetLocaleInfoA(LCID lcid, LCTYPE lctype, LPSTR buffer, INT len)
#define HKEY_CURRENT_USER
DWORD dwInternationalRuleSize
GLenum GLuint GLenum GLsizei const GLchar * buf
static const char szCardsKey[]
struct linecardentry_tag LINECARDENTRY
GLenum GLuint GLenum GLsizei length
static const char szLocationsKey[]
struct linecardentry_tag * LPLINECARDENTRY
LONG WINAPI RegCreateKeyA(HKEY hKey, LPCSTR lpSubKey, PHKEY phkResult)
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
#define LOCALE_SYSTEM_DEFAULT
DWORD dwInternationalRuleOffset
#define _strnicmp(_String1, _String2, _MaxCount)
LONG WINAPI RegEnumKeyA(HKEY hKey, DWORD dwIndex, LPSTR lpName, DWORD cbName)
DWORD dwLongDistanceAccessCodeSize
DWORD dwLocalAccessCodeSize
struct linelocationentry_tag LINELOCATIONENTRY
DWORD dwCancelCallWaitingSize
DWORD dwTollPrefixListOffset
DWORD dwLocalAccessCodeOffset
DWORD dwLocationNameOffset
DWORD dwTollPrefixListSize
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
#define LINEERR_STRUCTURETOOSMALL
DWORD dwSameAreaRuleOffset
DWORD dwLongDistanceRuleSize
_Check_return_ int __cdecl atoi(_In_z_ const char *_Str)
DWORD dwLongDistanceAccessCodeOffset
LONG WINAPI RegSetValueExA(HKEY hKey, LPCSTR lpValueName, DWORD Reserved, DWORD dwType, CONST BYTE *lpData, DWORD cbData)
#define HeapFree(x, y, z)
#define RegCloseKey(hKey)
#define LINEERR_INIFILECORRUPT
DWORD dwCancelCallWaitingOffset
#define HKEY_LOCAL_MACHINE
DWORD dwPermanentLocationID
struct linetranslatecaps_tag LINETRANSLATECAPS