Changeset 7334 for trunk/src/kernel32
- Timestamp:
- Nov 14, 2001, 1:30:46 PM (24 years ago)
- Location:
- trunk/src/kernel32
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kernel32/Fileio.cpp
r6613 r7334 1 /* $Id: Fileio.cpp,v 1.5 3 2001-08-31 19:53:11phaller Exp $ */1 /* $Id: Fileio.cpp,v 1.54 2001-11-14 12:30:35 phaller Exp $ */ 2 2 3 3 /* … … 531 531 DWORD dwCopyFlags) 532 532 { 533 LPSTR sourceA = HEAP_strdupWtoA( GetProcessHeap(), 0, lpExistingFileName ); 534 LPSTR destA = HEAP_strdupWtoA( GetProcessHeap(), 0, lpNewFileName ); 535 536 BOOL ret = CopyFileExA(sourceA, 537 destA, 538 lpProgressRoutine, 539 lpData, 540 pbCancel, 541 dwCopyFlags); 542 543 HeapFree( GetProcessHeap(), 0, sourceA ); 544 HeapFree( GetProcessHeap(), 0, destA ); 545 546 return ret; 533 #ifdef __WIN32OS2__ 534 LPSTR sourceA; 535 LPSTR destA; 536 STACK_strdupWtoA(lpExistingFileName, sourceA) 537 STACK_strdupWtoA(lpNewFileName, destA) 538 #else 539 LPSTR sourceA = HEAP_strdupWtoA( GetProcessHeap(), 0, lpExistingFileName ); 540 LPSTR destA = HEAP_strdupWtoA( GetProcessHeap(), 0, lpNewFileName ); 541 #endif 542 543 BOOL ret = CopyFileExA(sourceA, 544 destA, 545 lpProgressRoutine, 546 lpData, 547 pbCancel, 548 dwCopyFlags); 549 550 #ifndef __WIN32OS2__ 551 HeapFree( GetProcessHeap(), 0, sourceA ); 552 HeapFree( GetProcessHeap(), 0, destA ); 553 #endif 554 555 return ret; 547 556 } 548 557 //****************************************************************************** … … 1383 1392 LPVOID, lpFileInformation) 1384 1393 { 1394 #ifdef __WIN32OS2__ 1395 LPSTR nameA; 1396 STACK_strdupWtoA(lpFileName, nameA) 1397 #else 1385 1398 LPSTR nameA = HEAP_strdupWtoA( GetProcessHeap(), 0, lpFileName ); 1399 #endif 1400 1386 1401 BOOL res = GetFileAttributesExA( nameA, fInfoLevelId, lpFileInformation); 1402 1403 #ifndef __WIN32OS2__ 1387 1404 HeapFree( GetProcessHeap(), 0, nameA ); 1405 #endif 1388 1406 return res; 1389 1407 } -
trunk/src/kernel32/directory.cpp
r7063 r7334 1 /* $Id: directory.cpp,v 1.4 0 2001-10-15 17:10:54 sandervlExp $ */1 /* $Id: directory.cpp,v 1.41 2001-11-14 12:30:30 phaller Exp $ */ 2 2 3 3 /* … … 350 350 *****************************************************************************/ 351 351 352 BOOL WIN32API CreateDirectoryExA( LPCSTR lpTemplateDirectory, 353 LPCSTR lpNewDirectory, 354 LPSECURITY_ATTRIBUTES lpSecurityAttributes) 355 { 356 357 dprintf(("KERNEL32:CreateDirectoryExA(%08x,%08x,%08x) not properly implemented\n", 352 ODINFUNCTION3(BOOL, CreateDirectoryExA, 353 LPCSTR, lpTemplateDirectory, 354 LPCSTR, lpNewDirectory, 355 LPSECURITY_ATTRIBUTES, lpSecurityAttributes) 356 { 357 358 dprintf(("KERNEL32:CreateDirectoryExA(%s,%s,%08xh) not properly implemented\n", 358 359 lpTemplateDirectory,lpNewDirectory,lpSecurityAttributes 359 360 )); … … 389 390 *****************************************************************************/ 390 391 391 BOOL WIN32API CreateDirectoryExW( LPCWSTR lpTemplateDirectory, 392 LPCWSTR lpNewDirectory, 393 LPSECURITY_ATTRIBUTES lpSecurityAttributes) 392 ODINFUNCTION3(BOOL, CreateDirectoryExW, 393 LPCWSTR, lpTemplateDirectory, 394 LPCWSTR, lpNewDirectory, 395 LPSECURITY_ATTRIBUTES, lpSecurityAttributes) 394 396 { 395 397 … … 721 723 * Should call SetLastError(but currently doesn't). 722 724 */ 723 DWORD WINAPI SearchPathA(LPCSTR path, LPCSTR name, LPCSTR ext, DWORD buflen, 724 LPSTR buffer, LPSTR *lastpart ) 725 ODINFUNCTION6(DWORD, SearchPathA, 726 LPCSTR, path, 727 LPCSTR, name, 728 LPCSTR, ext, 729 DWORD, buflen, 730 LPSTR, buffer, 731 LPSTR *, lastpart ) 725 732 { 726 733 char full_name[MAX_PATHNAME_LEN]; … … 736 743 * SearchPath32W (KERNEL32.448) 737 744 */ 738 DWORD WINAPI SearchPathW(LPCWSTR path, LPCWSTR name, LPCWSTR ext, 739 DWORD buflen, LPWSTR buffer, LPWSTR *lastpart ) 745 ODINFUNCTION6(DWORD, SearchPathW, 746 LPCWSTR, path, 747 LPCWSTR, name, 748 LPCWSTR, ext, 749 DWORD, buflen, 750 LPWSTR, buffer, 751 LPWSTR *, lastpart ) 740 752 { 741 753 char full_name[MAX_PATHNAME_LEN]; 742 754 755 #ifdef __WIN32OS2__ 756 LPSTR pathA; 757 LPSTR nameA; 758 LPSTR extA; 759 STACK_strdupWtoA(path, pathA) 760 STACK_strdupWtoA(name, nameA) 761 STACK_strdupWtoA(ext, extA) 762 #else 743 763 LPSTR pathA = HEAP_strdupWtoA( GetProcessHeap(), 0, path ); 744 764 LPSTR nameA = HEAP_strdupWtoA( GetProcessHeap(), 0, name ); 745 765 LPSTR extA = HEAP_strdupWtoA( GetProcessHeap(), 0, ext ); 766 #endif 767 746 768 DWORD ret = DIR_SearchPath( pathA, nameA, extA, (LPSTR)full_name ); 769 770 #ifndef __WIN32OS2__ 747 771 HeapFree( GetProcessHeap(), 0, extA ); 748 772 HeapFree( GetProcessHeap(), 0, nameA ); 749 773 HeapFree( GetProcessHeap(), 0, pathA ); 774 #endif 775 750 776 if (!ret) return 0; 751 777 -
trunk/src/kernel32/environ.cpp
r5596 r7334 1 /* $Id: environ.cpp,v 1.1 1 2001-04-26 17:01:58 sandervlExp $ */1 /* $Id: environ.cpp,v 1.12 2001-11-14 12:30:34 phaller Exp $ */ 2 2 3 3 /* … … 283 283 DWORD, nSize) 284 284 { 285 #ifdef __WIN32OS2__ 286 LPSTR srcA; 287 STACK_strdupWtoA(lpSrc, srcA) 288 #else 285 289 LPSTR srcA = HEAP_strdupWtoA( GetProcessHeap(), 0, lpSrc ); 290 #endif 291 286 292 LPSTR dstA = lpDst ? (LPSTR)HeapAlloc( GetProcessHeap(), 0, nSize ) : NULL; 287 293 … … 294 300 HeapFree( GetProcessHeap(), 0, dstA ); 295 301 } 302 #ifndef __WIN32OS2__ 296 303 HeapFree( GetProcessHeap(), 0, srcA ); 304 #endif 297 305 return ret; 298 306 } -
trunk/src/kernel32/module.cpp
r6646 r7334 1 /* $Id: module.cpp,v 1. 3 2001-09-05 12:57:59 birdExp $1 /* $Id: module.cpp,v 1.4 2001-11-14 12:30:38 phaller Exp $ 2 2 * 3 3 * GetBinaryTypeA/W (Wine Port) … … 262 262 { 263 263 BOOL ret = FALSE; 264 LPSTR strNew = NULL;265 264 266 265 dprintf(("KERNEL32: GetBinaryTypeW %x %x", lpApplicationName, lpBinaryType)); … … 276 275 /* Convert the wide string to a ascii string. 277 276 */ 278 strNew = HEAP_strdupWtoA( GetProcessHeap(), 0, lpApplicationName ); 277 #ifdef __WIN32OS2__ 278 LPSTR strNew; 279 STACK_strdupWtoA(lpApplicationName, strNew) 280 #else 281 LPSTR strNew = HEAP_strdupWtoA( GetProcessHeap(), 0, lpApplicationName ); 282 #endif 279 283 280 284 if ( strNew != NULL ) … … 284 288 /* Free the allocated string. 285 289 */ 286 HeapFree( GetProcessHeap(), 0, strNew ); 290 #ifndef __WIN32OS2__ 291 HeapFree( GetProcessHeap(), 0, strNew ); 292 #endif 287 293 } 288 294 -
trunk/src/kernel32/ole2nls.cpp
r6646 r7334 1 /* $Id: ole2nls.cpp,v 1.1 4 2001-09-05 12:57:59 birdExp $1 /* $Id: ole2nls.cpp,v 1.15 2001-11-14 12:30:40 phaller Exp $ 2 2 * 3 3 * National Language Support library … … 442 442 int string_num; 443 443 int i; 444 445 /* Replace SUBLANG_NEUTRAL by SUBLANG_DEFAULT */ 446 if(SUBLANGID(lang_id) == SUBLANG_NEUTRAL) 447 lang_id = MAKELANGID(PRIMARYLANGID(lang_id), SUBLANG_DEFAULT); 444 448 445 449 hrsrc = FindResourceExW(hModule, RT_STRINGW, (LPCWSTR)((res_id >> 4) + 1), lang_id); … … 2022 2026 * characters, we can support NORM_IGNOREKANATYPE 2023 2027 */ 2028 #ifdef DEBUG 2024 2029 if (mapflags & ~LCMAPSTRINGA_SUPPORTED_FLAGS) 2025 2030 { … … 2035 2040 ); 2036 2041 } 2042 #endif 2037 2043 2038 2044 if ( !(mapflags & LCMAP_SORTKEY) ) -
trunk/src/kernel32/thread.cpp
r7326 r7334 1 /* $Id: thread.cpp,v 1.3 4 2001-11-12 23:04:56phaller Exp $ */1 /* $Id: thread.cpp,v 1.35 2001-11-14 12:30:44 phaller Exp $ */ 2 2 3 3 /* … … 153 153 char* WIN32API dbg_GetLastCallerName() 154 154 { 155 #ifdef DEBUG 155 156 // retrieve last caller name from stack 156 157 TEB *teb; … … 167 168 } 168 169 } 170 #endif 169 171 170 172 return NULL; -
trunk/src/kernel32/virtual.cpp
r6975 r7334 1 /* $Id: virtual.cpp,v 1.4 0 2001-10-09 20:25:20 sandervlExp $ */1 /* $Id: virtual.cpp,v 1.41 2001-11-14 12:30:46 phaller Exp $ */ 2 2 3 3 /* … … 69 69 DWORD size_low, LPCWSTR name ) 70 70 { 71 LPSTR nameA = HEAP_strdupWtoA( GetProcessHeap(), 0, name ); 71 #ifdef __WIN32OS2__ 72 LPSTR nameA; 73 STACK_strdupWtoA(name, nameA) 74 #else 75 LPSTR nameA = HEAP_strdupWtoA( GetProcessHeap(), 0, name ); 76 #endif 77 72 78 HANDLE ret = CreateFileMappingA( hFile, attr, protect, 73 size_high, size_low, nameA ); 74 HeapFree( GetProcessHeap(), 0, nameA ); 75 return ret; 79 size_high, size_low, nameA ); 80 81 #ifndef __WIN32OS2__ 82 HeapFree( GetProcessHeap(), 0, nameA ); 83 #endif 84 return ret; 76 85 } 77 86 … … 101 110 HANDLE WINAPI OpenFileMappingW( DWORD access, BOOL inherit, LPCWSTR name) 102 111 { 112 #ifdef __WIN32OS2__ 113 LPSTR nameA; 114 STACK_strdupWtoA(name, nameA) 115 #else 103 116 LPSTR nameA = HEAP_strdupWtoA( GetProcessHeap(), 0, name ); 104 HANDLE ret = OpenFileMappingA( access, inherit, nameA ); 105 HeapFree( GetProcessHeap(), 0, nameA ); 106 return ret; 117 #endif 118 119 HANDLE ret = OpenFileMappingA( access, inherit, nameA ); 120 121 #ifndef __WIN32OS2__ 122 HeapFree( GetProcessHeap(), 0, nameA ); 123 #endif 124 return ret; 107 125 } 108 126
Note:
See TracChangeset
for help on using the changeset viewer.