Changeset 4387 for trunk/src/kernel32/profile.cpp
- Timestamp:
- Oct 2, 2000, 8:40:12 PM (25 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kernel32/profile.cpp
r4372 r4387 1 /* $Id: profile.cpp,v 1.2 6 2000-10-02 13:38:57sandervl Exp $ */1 /* $Id: profile.cpp,v 1.27 2000-10-02 18:39:35 sandervl Exp $ */ 2 2 3 3 /* … … 74 74 time_t mtime; 75 75 } PROFILE; 76 77 78 /****************************************************************************79 * internal prototypes *80 ****************************************************************************/81 UINT ODIN_INTERNAL ODIN_GetPrivateProfileIntA(LPCSTR, LPCSTR, INT, LPCSTR);82 UINT ODIN_INTERNAL ODIN_GetPrivateProfileIntW(LPCWSTR, LPCWSTR, INT, LPCWSTR);83 INT ODIN_INTERNAL ODIN_GetPrivateProfileStringW(LPCWSTR, LPCWSTR, LPCWSTR, LPWSTR, UINT, LPCWSTR);84 BOOL ODIN_INTERNAL ODIN_WritePrivateProfileStringA(LPCSTR, LPCSTR, LPCSTR, LPCSTR);85 BOOL ODIN_INTERNAL ODIN_WritePrivateProfileStringW(LPCWSTR, LPCWSTR, LPCWSTR, LPCWSTR);86 76 87 77 … … 1087 1077 INT, def_val) 1088 1078 { 1089 return ODIN_GetPrivateProfileIntA( section, entry, def_val, WINININAME );1079 return CALL_ODINFUNC(GetPrivateProfileIntA)( section, entry, def_val, WINININAME ); 1090 1080 } 1091 1081 … … 1099 1089 { 1100 1090 if (!wininiW) wininiW = HEAP_strdupAtoW( SystemHeap, 0, WINININAME ); 1101 return ODIN_GetPrivateProfileIntW( section, entry, def_val, wininiW );1091 return CALL_ODINFUNC(GetPrivateProfileIntW)( section, entry, def_val, wininiW ); 1102 1092 } 1103 1093 … … 1112 1102 UINT, len) 1113 1103 { 1114 return ODIN_GetPrivateProfileStringA( section, entry, def_val,1104 return CALL_ODINFUNC(GetPrivateProfileStringA)( section, entry, def_val, 1115 1105 buffer, len, WINININAME ); 1116 1106 } … … 1127 1117 { 1128 1118 if (!wininiW) wininiW = HEAP_strdupAtoW( SystemHeap, 0, WINININAME ); 1129 return ODIN_GetPrivateProfileStringW( section, entry, def_val,1119 return CALL_ODINFUNC(GetPrivateProfileStringW)( section, entry, def_val, 1130 1120 buffer, len, wininiW ); 1131 1121 } … … 1139 1129 LPCSTR, string) 1140 1130 { 1141 return ODIN_WritePrivateProfileStringA( section, entry, string, WINININAME );1131 return CALL_ODINFUNC(WritePrivateProfileStringA)( section, entry, string, WINININAME ); 1142 1132 } 1143 1133 … … 1151 1141 { 1152 1142 if (!wininiW) wininiW = HEAP_strdupAtoW( SystemHeap, 0, WINININAME ); 1153 return ODIN_WritePrivateProfileStringW( section, entry, string, wininiW );1143 return CALL_ODINFUNC(WritePrivateProfileStringW)( section, entry, string, wininiW ); 1154 1144 } 1155 1145 … … 1167 1157 long result; 1168 1158 1169 ODIN_GetPrivateProfileStringA( section, entry, "",1159 CALL_ODINFUNC(GetPrivateProfileStringA)( section, entry, "", 1170 1160 buffer, sizeof(buffer), filename ); 1171 1161 if (!buffer[0]) return (UINT)def_val; … … 1187 1177 LPSTR entryA = HEAP_strdupWtoA( GetProcessHeap(), 0, entry ); 1188 1178 LPSTR filenameA = HEAP_strdupWtoA( GetProcessHeap(), 0, filename ); 1189 UINT res = ODIN_GetPrivateProfileIntA(sectionA, entryA, def_val, filenameA);1179 UINT res = CALL_ODINFUNC(GetPrivateProfileIntA)(sectionA, entryA, def_val, filenameA); 1190 1180 HeapFree( GetProcessHeap(), 0, sectionA ); 1191 1181 HeapFree( GetProcessHeap(), 0, filenameA ); … … 1240 1230 LPSTR def_valA = HEAP_strdupWtoA( GetProcessHeap(), 0, def_val ); 1241 1231 LPSTR bufferA = (LPSTR)HeapAlloc( GetProcessHeap(), 0, len ); 1242 INT ret = ODIN_GetPrivateProfileStringA( sectionA, entryA, def_valA,1232 INT ret = CALL_ODINFUNC(GetPrivateProfileStringA)( sectionA, entryA, def_valA, 1243 1233 bufferA, len, filenameA ); 1244 1234 lstrcpynAtoW( buffer, bufferA, len ); … … 1287 1277 LPSTR filenameA = HEAP_strdupWtoA( GetProcessHeap(), 0, filename ); 1288 1278 LPSTR bufferA = (LPSTR)HeapAlloc( GetProcessHeap(), 0, len ); 1289 INT ret = ODIN_GetPrivateProfileSectionA( sectionA, bufferA, len,1279 INT ret = CALL_ODINFUNC(GetPrivateProfileSectionA)( sectionA, bufferA, len, 1290 1280 filenameA ); 1291 1281 MultiByteToWideChar(CP_ACP,0,bufferA,ret,buffer,len); … … 1304 1294 DWORD, len) 1305 1295 { 1306 return ODIN_GetPrivateProfileSectionA( section, buffer, len, WINININAME );1296 return CALL_ODINFUNC(GetPrivateProfileSectionA)( section, buffer, len, WINININAME ); 1307 1297 } 1308 1298 … … 1316 1306 { 1317 1307 if (!wininiW) wininiW = HEAP_strdupAtoW( SystemHeap, 0, WINININAME ); 1318 return ODIN_GetPrivateProfileSectionW( section, buffer, len, wininiW );1308 return CALL_ODINFUNC(GetPrivateProfileSectionW)( section, buffer, len, wininiW ); 1319 1309 } 1320 1310 … … 1357 1347 LPSTR stringA = HEAP_strdupWtoA( GetProcessHeap(), 0, string ); 1358 1348 LPSTR filenameA = HEAP_strdupWtoA( GetProcessHeap(), 0, filename ); 1359 BOOL res = ODIN_WritePrivateProfileStringA( sectionA, entryA,1349 BOOL res = CALL_ODINFUNC(WritePrivateProfileStringA)( sectionA, entryA, 1360 1350 stringA, filenameA ); 1361 1351 HeapFree( GetProcessHeap(), 0, sectionA ); … … 1391 1381 LPSTR stringA = HEAP_strdupWtoA( GetProcessHeap(), 0, string ); 1392 1382 LPSTR filenameA = HEAP_strdupWtoA( GetProcessHeap(), 0, filename ); 1393 BOOL res = ODIN_WritePrivateProfileSectionA( sectionA, stringA, filenameA );1383 BOOL res = CALL_ODINFUNC(WritePrivateProfileSectionA)( sectionA, stringA, filenameA ); 1394 1384 HeapFree( GetProcessHeap(), 0, sectionA ); 1395 1385 HeapFree( GetProcessHeap(), 0, stringA ); … … 1405 1395 LPCSTR, keys_n_values) 1406 1396 { 1407 return ODIN_WritePrivateProfileSectionA( section, keys_n_values, WINININAME);1397 return CALL_ODINFUNC(WritePrivateProfileSectionA)( section, keys_n_values, WINININAME); 1408 1398 } 1409 1399 … … 1417 1407 if (!wininiW) wininiW = HEAP_strdupAtoW( SystemHeap, 0, WINININAME); 1418 1408 1419 return ( ODIN_WritePrivateProfileSectionW(section,keys_n_values, wininiW));1409 return (CALL_ODINFUNC(WritePrivateProfileSectionW) (section,keys_n_values, wininiW)); 1420 1410 } 1421 1411 … … 1448 1438 LPCSTR, filename) 1449 1439 { 1450 return ( ODIN_GetPrivateProfileSectionNames16(buffer,size,filename));1440 return (CALL_ODINFUNC(GetPrivateProfileSectionNames16) (buffer,size,filename)); 1451 1441 } 1452 1442 … … 1462 1452 LPSTR bufferA = (LPSTR)HeapAlloc( GetProcessHeap(), 0, size); 1463 1453 1464 INT ret = ODIN_GetPrivateProfileSectionNames16(bufferA, size, filenameA);1454 INT ret = CALL_ODINFUNC(GetPrivateProfileSectionNames16) (bufferA, size, filenameA); 1465 1455 lstrcpynAtoW( buffer, bufferA, size); 1466 1456 HeapFree( GetProcessHeap(), 0, bufferA); … … 1511 1501 LPSTR bufferA = (LPSTR)HeapAlloc( GetProcessHeap(), 0, len ); 1512 1502 1513 INT ret = ODIN_GetPrivateProfileStructA( sectionA, keyA, bufferA,1503 INT ret = CALL_ODINFUNC(GetPrivateProfileStructA)( sectionA, keyA, bufferA, 1514 1504 len, filenameA ); 1515 1505 lstrcpynAtoW( (LPWSTR)buffer, bufferA, len ); … … 1536 1526 1537 1527 if (!section && !key && !buf) /* flush the cache */ 1538 return ODIN_WritePrivateProfileStringA( NULL, NULL, NULL, filename );1528 return CALL_ODINFUNC(WritePrivateProfileStringA)( NULL, NULL, NULL, filename ); 1539 1529 1540 1530 EnterCriticalSection( &PROFILE_CritSect ); … … 1561 1551 LPSTR keyA = HEAP_strdupWtoA( GetProcessHeap(), 0, key); 1562 1552 LPSTR filenameA = HEAP_strdupWtoA( GetProcessHeap(), 0, filename ); 1563 INT ret = ODIN_WritePrivateProfileStructA( sectionA, keyA, buf, bufsize,1553 INT ret = CALL_ODINFUNC(WritePrivateProfileStructA)( sectionA, keyA, buf, bufsize, 1564 1554 filenameA ); 1565 1555 HeapFree( GetProcessHeap(), 0, sectionA );
Note:
See TracChangeset
for help on using the changeset viewer.