Changeset 12037
- Timestamp:
- Oct 26, 1999, 12:45:17 AM (26 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified tags/trunk/src/kernel32/Fileio.cpp ¶
r11830 r12037 1 /* $Id: Fileio.cpp,v 1.1 0 1999-10-10 09:00:57 sandervlExp $ */1 /* $Id: Fileio.cpp,v 1.11 1999-10-25 22:45:17 phaller Exp $ */ 2 2 3 3 /* … … 11 11 * 12 12 */ 13 14 15 /***************************************************************************** 16 * Includes * 17 *****************************************************************************/ 18 19 #include <odin.h> 20 #include <odinwrap.h> 21 #include <os2sel.h> 22 13 23 #include <os2win.h> 14 24 #include <stdlib.h> … … 20 30 #include "oslibdos.h" 21 31 22 //****************************************************************************** 23 //****************************************************************************** 24 HFILE WIN32API CreateFileA(LPCSTR lpszName, 25 DWORD fdwAccess, 26 DWORD fdwShareMode, 27 LPSECURITY_ATTRIBUTES lpsa, 28 DWORD fdwCreate, 29 DWORD fdwAttrsAndFlags, 30 HANDLE hTemplateFile) 31 { 32 HANDLE rc; 33 34 dprintf(("KERNEL32: CreateFileA(%s,%08xh,%08xh,%08xh,%08xh,%08xh,%08xh)\n", 35 lpszName, 36 fdwAccess, 37 fdwShareMode, 38 lpsa, 39 fdwCreate, 40 fdwAttrsAndFlags, 41 hTemplateFile)); 42 43 rc = HMCreateFile(lpszName, 32 33 ODINDEBUGCHANNEL(KERNEL32-FILEIO) 34 35 //****************************************************************************** 36 //****************************************************************************** 37 ODINFUNCTION7(HFILE, CreateFileA, 38 LPCSTR, lpszName, 39 DWORD, fdwAccess, 40 DWORD, fdwShareMode, 41 LPSECURITY_ATTRIBUTES, lpsa, 42 DWORD, fdwCreate, 43 DWORD, fdwAttrsAndFlags, 44 HANDLE, hTemplateFile) 45 { 46 return(HMCreateFile(lpszName, 44 47 fdwAccess, 45 48 fdwShareMode, … … 47 50 fdwCreate, 48 51 fdwAttrsAndFlags, 49 hTemplateFile); 50 52 hTemplateFile)); 53 } 54 55 //****************************************************************************** 56 //****************************************************************************** 57 ODINFUNCTION7(HFILE, CreateFileW, 58 LPCWSTR, arg1, 59 DWORD, arg2, 60 DWORD, arg3, 61 PSECURITY_ATTRIBUTES, arg4, 62 DWORD, arg5, 63 DWORD, arg6, 64 HANDLE, arg7) 65 { 66 HANDLE rc; 67 char *astring; 68 69 astring = UnicodeToAsciiString((LPWSTR)arg1); 70 rc = CreateFileA(astring, arg2, arg3, arg4, arg5, arg6, arg7); 71 FreeAsciiString(astring); 51 72 return(rc); 52 73 } 53 74 //****************************************************************************** 54 75 //****************************************************************************** 55 HFILE WIN32API CreateFileW(LPCWSTR arg1, 56 DWORD arg2, 57 DWORD arg3, 58 PSECURITY_ATTRIBUTES arg4, 59 DWORD arg5, 60 DWORD arg6, 61 HANDLE arg7) 62 { 63 HANDLE rc; 64 char *astring; 65 66 dprintf(("KERNEL32: CreateFileW")); 67 astring = UnicodeToAsciiString((LPWSTR)arg1); 68 rc = CreateFileA(astring, arg2, arg3, arg4, arg5, arg6, arg7); 69 FreeAsciiString(astring); 70 return(rc); 71 } 72 //****************************************************************************** 73 //****************************************************************************** 74 HANDLE WIN32API FindFirstFileA(LPCSTR arg1, WIN32_FIND_DATAA * arg2) 75 { 76 dprintf(("KERNEL32: FindFirstFile(%s,%08xh)\n", 77 arg1, 78 arg2)); 79 80 return O32_FindFirstFile(arg1, arg2); 81 } 82 //****************************************************************************** 83 //****************************************************************************** 84 HANDLE WIN32API FindFirstFileW(LPCWSTR arg1, WIN32_FIND_DATAW * arg2) 76 ODINFUNCTION2(HANDLE, FindFirstFileA, 77 LPCSTR, arg1, 78 WIN32_FIND_DATAA *, arg2) 79 { 80 return O32_FindFirstFile(arg1, arg2); 81 } 82 83 //****************************************************************************** 84 //****************************************************************************** 85 ODINFUNCTION2(HANDLE, FindFirstFileW, 86 LPCWSTR, arg1, 87 WIN32_FIND_DATAW *, arg2) 85 88 { 86 89 HANDLE rc; 87 90 char *astring; 88 91 WIN32_FIND_DATAA wfda; 89 90 dprintf(("KERNEL32: FindFirstFileW(%08xh, %08xh)",91 arg1,92 arg2));93 92 94 93 astring = UnicodeToAsciiString((LPWSTR)arg1); … … 113 112 //****************************************************************************** 114 113 //****************************************************************************** 115 BOOL WIN32API FindNextFileA(HANDLE arg1, WIN32_FIND_DATAA * arg2) 116 { 117 dprintf(("KERNEL32: FindNextFile")); 118 return O32_FindNextFile(arg1, arg2); 114 ODINFUNCTION2(BOOL, FindNextFileA, 115 HANDLE, arg1, 116 WIN32_FIND_DATAA *, arg2) 117 { 118 return O32_FindNextFile(arg1, arg2); 119 119 } 120 120 //****************************************************************************** 121 121 //TODO: convert string in WIN32_FIND_DATAW * structure 122 122 //****************************************************************************** 123 BOOL WIN32API FindNextFileW(HANDLE arg1, WIN32_FIND_DATAW * arg2) 123 ODINFUNCTION2(BOOL, FindNextFileW, 124 HANDLE, arg1, 125 WIN32_FIND_DATAW *, arg2) 124 126 { 125 127 WIN32_FIND_DATAA wfda; 126 128 BOOL rc; 127 128 dprintf(("KERNEL32: FindNextFileW(%08xh, %08xh)\n",129 arg1,130 arg2));131 129 132 130 rc = FindNextFileA(arg1, &wfda); … … 149 147 //****************************************************************************** 150 148 //****************************************************************************** 151 BOOL WIN32API FindClose(HANDLE arg1) 152 { 153 dprintf(("KERNEL32: FindClose\n")); 154 return O32_FindClose(arg1); 155 } 156 //****************************************************************************** 157 //****************************************************************************** 158 DWORD WIN32API GetFileType(HANDLE hFile) 159 { 160 dprintf(("KERNEL32: GetFileType(%08xh)\n", 161 hFile)); 162 149 ODINFUNCTION1(BOOL, FindClose, 150 HANDLE, arg1) 151 { 152 return O32_FindClose(arg1); 153 } 154 //****************************************************************************** 155 //****************************************************************************** 156 ODINFUNCTION1(DWORD, GetFileType, 157 HANDLE, hFile) 158 { 163 159 return(HMGetFileType(hFile)); 164 160 } 165 161 //****************************************************************************** 166 162 //****************************************************************************** 167 DWORD WIN32API GetFileInformationByHandle(HANDLE arg1, 168 BY_HANDLE_FILE_INFORMATION *arg2) 169 { 170 dprintf(("KERNEL32: GetFIleInformationByHandle(%08xh,%0xh)\n", 171 arg1, 172 arg2)); 173 163 ODINFUNCTION2(DWORD, GetFileInformationByHandle, 164 HANDLE, arg1, 165 BY_HANDLE_FILE_INFORMATION *, arg2) 166 { 174 167 return(HMGetFileInformationByHandle(arg1,arg2)); 175 168 } 176 169 //****************************************************************************** 177 170 //****************************************************************************** 178 BOOL WIN32API SetEndOfFile( HANDLE arg1) 179 { 180 dprintf(("KERNEL32: SetEndOfFile(%08xh)\n", 181 arg1)); 182 171 ODINFUNCTION1(BOOL, SetEndOfFile, 172 HANDLE, arg1) 173 { 183 174 return HMSetEndOfFile(arg1); 184 175 } 185 176 //****************************************************************************** 186 177 //****************************************************************************** 187 BOOL WIN32API SetFileTime(HANDLE arg1, 188 const FILETIME *arg2, 189 const FILETIME *arg3, 190 const FILETIME *arg4) 191 { 192 dprintf(("KERNEL32: SetFileTime(%08xh,%08xh,%08xh,%08xh)\n", 193 arg1, 194 arg2, 195 arg3, 196 arg4)); 197 178 ODINFUNCTION4(BOOL, SetFileTime, 179 HANDLE, arg1, 180 const FILETIME *, arg2, 181 const FILETIME *, arg3, 182 const FILETIME *, arg4) 183 { 198 184 return HMSetFileTime(arg1, 199 185 arg2, … … 203 189 //****************************************************************************** 204 190 //****************************************************************************** 205 INT WIN32API CompareFileTime( FILETIME * arg1, FILETIME * arg2) 206 { 207 dprintf(("KERNEL32: CompareFileTime\n")); 208 return O32_CompareFileTime(arg1, arg2); 209 } 210 //****************************************************************************** 211 //****************************************************************************** 212 BOOL WIN32API CopyFileA(LPCSTR arg1, LPCSTR arg2, BOOL arg3) 213 { 214 dprintf(("KERNEL32: CopyFile %s %s\n", arg1, arg2)); 215 return O32_CopyFile(arg1, arg2, arg3); 191 ODINFUNCTION2(INT, CompareFileTime, 192 FILETIME *, arg1, 193 FILETIME *, arg2) 194 { 195 return O32_CompareFileTime(arg1, arg2); 196 } 197 //****************************************************************************** 198 //****************************************************************************** 199 ODINFUNCTION3(BOOL, CopyFileA, 200 LPCSTR, arg1, 201 LPCSTR, arg2, 202 BOOL, arg3) 203 { 204 return O32_CopyFile(arg1, arg2, arg3); 216 205 } 217 206 //****************************************************************************** 218 207 //SvL: 24-6-'97 - Added 219 208 //****************************************************************************** 220 BOOL WIN32API CopyFileW(LPCWSTR arg1, LPCWSTR arg2, BOOL arg3) 221 { 222 BOOL rc;223 char *astring1, *astring2;224 225 astring1 = UnicodeToAsciiString((LPWSTR)arg1);226 astring2 = UnicodeToAsciiString((LPWSTR)arg2);227 dprintf(("KERNEL32: CopyFileW\n")); 228 rc = O32_CopyFile(astring1, astring2, arg3);229 FreeAsciiString(astring2);230 FreeAsciiString(astring1);231 return(rc);232 } 233 //****************************************************************************** 234 //****************************************************************************** 235 DWORD WIN32API GetFileSize( HANDLE arg1, PDWORD arg2) 236 { 237 dprintf(("KERNEL32: GetFileSize (%08xh, %08xh)\n",238 arg1,239 arg2));240 209 ODINFUNCTION3(BOOL, CopyFileW, 210 LPCWSTR, arg1, 211 LPCWSTR, arg2, 212 BOOL, arg3) 213 { 214 BOOL rc; 215 char *astring1, *astring2; 216 217 astring1 = UnicodeToAsciiString((LPWSTR)arg1); 218 astring2 = UnicodeToAsciiString((LPWSTR)arg2); 219 rc = O32_CopyFile(astring1, astring2, arg3); 220 FreeAsciiString(astring2); 221 FreeAsciiString(astring1); 222 return(rc); 223 } 224 //****************************************************************************** 225 //****************************************************************************** 226 ODINFUNCTION2(DWORD, GetFileSize, 227 HANDLE, arg1, 228 PDWORD, arg2) 229 { 241 230 return HMGetFileSize(arg1, 242 231 arg2); … … 244 233 //****************************************************************************** 245 234 //****************************************************************************** 246 BOOL WIN32API DeleteFileA(LPCSTR arg1) 247 { 248 dprintf(("KERNEL32: DeleteFile %s\n", arg1)); 249 return O32_DeleteFile(arg1); 250 } 251 //****************************************************************************** 252 //****************************************************************************** 253 BOOL WIN32API DeleteFileW(LPCWSTR arg1) 254 { 255 BOOL rc; 256 char *astring; 257 258 dprintf(("KERNEL32: DeleteFileW\n")); 259 astring = UnicodeToAsciiString((LPWSTR)arg1); 260 rc = O32_DeleteFile(astring); 261 FreeAsciiString(astring); 262 return(rc); 263 } 264 //****************************************************************************** 265 //****************************************************************************** 266 UINT WIN32API GetTempFileNameA(LPCSTR arg1, LPCSTR arg2, UINT arg3, LPSTR arg4) 267 { 268 dprintf(("KERNEL32: GetTempFileName")); 269 return O32_GetTempFileName(arg1, arg2, arg3, arg4); 270 } 271 //****************************************************************************** 272 //****************************************************************************** 273 UINT WIN32API GetTempFileNameW(LPCWSTR lpPathName, LPCWSTR lpPrefixString, 274 UINT uUnique, LPWSTR lpTempFileName) 275 { 276 char *asciipath, *asciiprefix; 277 char *asciitemp = (char *)malloc(MAX_PATH+1); 278 UINT rc; 279 280 dprintf(("KERNEL32: GetTempFileNameW")); 281 asciipath = UnicodeToAsciiString((LPWSTR)lpPathName); 282 asciiprefix = UnicodeToAsciiString((LPWSTR)lpPrefixString); 283 rc = O32_GetTempFileName(asciipath, asciiprefix, uUnique, asciitemp); 284 if(rc) AsciiToUnicode(asciitemp, lpTempFileName); 285 FreeAsciiString(asciiprefix); 286 FreeAsciiString(asciipath); 287 free(asciitemp); 288 return(rc); 289 } 290 //****************************************************************************** 291 //****************************************************************************** 292 UINT WIN32API GetTempPathA(UINT arg1, LPSTR arg2) 293 { 294 dprintf(("KERNEL32: GetTempPath\n")); 295 return O32_GetTempPath(arg1, arg2); 296 } 297 //****************************************************************************** 298 //****************************************************************************** 299 UINT WIN32API GetTempPathW(UINT nBufferLength, LPWSTR lpBuffer) 300 { 301 char *asciibuffer = (char *)malloc(nBufferLength+1); 302 DWORD rc; 303 304 dprintf(("KERNEL32: GetTempPathW\n")); 305 rc = O32_GetTempPath(nBufferLength, asciibuffer); 306 if(rc) AsciiToUnicode(asciibuffer, lpBuffer); 307 free(asciibuffer); 308 return(rc); 309 } 310 //****************************************************************************** 311 //****************************************************************************** 312 BOOL WIN32API ReadFile(HANDLE arg1, 313 PVOID arg2, 314 DWORD arg3, 315 PDWORD arg4, 316 LPOVERLAPPED arg5) 317 { 318 BOOL rc; 319 320 rc = HMReadFile(arg1, 321 arg2, 322 arg3, 323 arg4, 324 arg5); 325 326 dprintf(("KERNEL32: ReadFile %X %d bytes returned %d\n", 327 arg1, 328 arg3, 329 rc)); 330 235 ODINFUNCTION1(BOOL, DeleteFileA, 236 LPCSTR, arg1) 237 { 238 return O32_DeleteFile(arg1); 239 } 240 //****************************************************************************** 241 //****************************************************************************** 242 ODINFUNCTION1(BOOL, DeleteFileW, 243 LPCWSTR, arg1) 244 { 245 BOOL rc; 246 char *astring; 247 248 astring = UnicodeToAsciiString((LPWSTR)arg1); 249 rc = O32_DeleteFile(astring); 250 FreeAsciiString(astring); 331 251 return(rc); 332 252 } 333 253 //****************************************************************************** 334 254 //****************************************************************************** 335 DWORD WIN32API SetFilePointer(HANDLE hFile, 336 LONG lDistanceToMove, 337 PLONG lpDistanceToMoveHigh, 338 DWORD dwMoveMethod) 255 ODINFUNCTION4(UINT, GetTempFileNameA, 256 LPCSTR, arg1, 257 LPCSTR, arg2, 258 UINT, arg3, 259 LPSTR, arg4) 260 { 261 return O32_GetTempFileName(arg1, arg2, arg3, arg4); 262 } 263 //****************************************************************************** 264 //****************************************************************************** 265 ODINFUNCTION4(UINT, GetTempFileNameW, 266 LPCWSTR, lpPathName, 267 LPCWSTR, lpPrefixString, 268 UINT, uUnique, 269 LPWSTR, lpTempFileName) 270 { 271 char *asciipath, *asciiprefix; 272 char *asciitemp = (char *)malloc(MAX_PATH+1); 273 UINT rc; 274 275 asciipath = UnicodeToAsciiString((LPWSTR)lpPathName); 276 asciiprefix = UnicodeToAsciiString((LPWSTR)lpPrefixString); 277 rc = O32_GetTempFileName(asciipath, asciiprefix, uUnique, asciitemp); 278 if(rc) AsciiToUnicode(asciitemp, lpTempFileName); 279 FreeAsciiString(asciiprefix); 280 FreeAsciiString(asciipath); 281 free(asciitemp); 282 return(rc); 283 } 284 //****************************************************************************** 285 //****************************************************************************** 286 ODINFUNCTION2(UINT, GetTempPathA, 287 UINT, arg1, 288 LPSTR, arg2) 289 { 290 return O32_GetTempPath(arg1, arg2); 291 } 292 //****************************************************************************** 293 //****************************************************************************** 294 ODINFUNCTION2(UINT, GetTempPathW, 295 UINT, nBufferLength, 296 LPWSTR, lpBuffer) 297 { 298 char *asciibuffer = (char *)malloc(nBufferLength+1); 299 DWORD rc; 300 301 rc = O32_GetTempPath(nBufferLength, asciibuffer); 302 if(rc) AsciiToUnicode(asciibuffer, lpBuffer); 303 free(asciibuffer); 304 return(rc); 305 } 306 //****************************************************************************** 307 //****************************************************************************** 308 ODINFUNCTION5(BOOL, ReadFile, 309 HANDLE, hFile, 310 PVOID, pBuffer, 311 DWORD, dwLength, 312 PDWORD, lpNumberOfBytesRead, 313 LPOVERLAPPED, lpOverlapped) 314 { 315 return (HMReadFile(hFile, 316 pBuffer, 317 dwLength, 318 lpNumberOfBytesRead, 319 lpOverlapped)); 320 } 321 //****************************************************************************** 322 //****************************************************************************** 323 ODINFUNCTION4(DWORD, SetFilePointer, 324 HANDLE, hFile, 325 LONG, lDistanceToMove, 326 PLONG, lpDistanceToMoveHigh, 327 DWORD, dwMoveMethod) 339 328 { 340 329 dprintf(("KERNEL32: SetFilePointer(%08xh,%08xh,%08xh,%08xh)\n", … … 351 340 //****************************************************************************** 352 341 //****************************************************************************** 353 BOOL WIN32API WriteFile(HANDLE hFile, 354 LPCVOID buffer, 355 DWORD nrbytes, 356 LPDWORD nrbyteswritten, 357 LPOVERLAPPED lpOverlapped) 342 ODINFUNCTION5(BOOL, WriteFile, 343 HANDLE, hFile, 344 LPCVOID, buffer, 345 DWORD, nrbytes, 346 LPDWORD, nrbyteswritten, 347 LPOVERLAPPED, lpOverlapped) 358 348 { 359 349 dprintf(("KERNEL32: WriteFile(%08xh,%08xh,%08xh,%08xh,%08xh)\n", … … 372 362 //****************************************************************************** 373 363 //****************************************************************************** 374 DWORD WIN32API SearchPathA( LPCSTR arg1, LPCSTR arg2, LPCSTR arg3, DWORD arg4, LPSTR arg5, LPSTR * arg6) 364 ODINFUNCTION6(DWORD, SearchPathA, 365 LPCSTR, arg1, 366 LPCSTR, arg2, 367 LPCSTR, arg3, 368 DWORD, arg4, 369 LPSTR, arg5, 370 LPSTR *, arg6) 375 371 { 376 372 dprintf(("KERNEL32: SearchPathA\n")); … … 379 375 //****************************************************************************** 380 376 //****************************************************************************** 381 DWORD WIN32API SearchPathW(LPCWSTR lpPath, LPCWSTR lpFileName, LPCWSTR lpExtension, 382 DWORD nBufferLength, LPWSTR lpBuffer, LPWSTR *lpFilePart) 377 ODINFUNCTION6(DWORD, SearchPathW, 378 LPCWSTR, lpPath, 379 LPCWSTR, lpFileName, 380 LPCWSTR, lpExtension, 381 DWORD, nBufferLength, 382 LPWSTR, lpBuffer, 383 LPWSTR *, lpFilePart) 383 384 { 384 385 char *asciipath, *asciifile, *asciiext, *asciibuffer, *asciipart; … … 404 405 //****************************************************************************** 405 406 //****************************************************************************** 406 DWORD WIN32API GetFileAttributesA(LPCSTR lpszFileName) 407 ODINFUNCTION1(DWORD, GetFileAttributesA, 408 LPCSTR, lpszFileName) 407 409 { 408 410 DWORD rc, error; … … 424 426 //****************************************************************************** 425 427 //****************************************************************************** 426 DWORD WIN32API GetFileAttributesW(LPCWSTR arg1) 428 ODINFUNCTION1(DWORD, GetFileAttributesW, 429 LPCWSTR, arg1) 427 430 { 428 431 DWORD rc; … … 437 440 //****************************************************************************** 438 441 //****************************************************************************** 439 BOOL WIN32API SetFileAttributesA(LPCSTR arg1, DWORD arg2) 442 ODINFUNCTION2(BOOL, SetFileAttributesA, 443 LPCSTR, arg1, 444 DWORD, arg2) 440 445 { 441 446 dprintf(("KERNEL32: SetFileAttributes of %s\n", arg1)); … … 444 449 //****************************************************************************** 445 450 //****************************************************************************** 446 BOOL WIN32API SetFileAttributesW(LPCWSTR lpFileName, DWORD dwFileAttributes) 451 ODINFUNCTION2(BOOL, SetFileAttributesW, 452 LPCWSTR, lpFileName, 453 DWORD, dwFileAttributes) 447 454 { 448 455 char *asciifile; … … 457 464 //****************************************************************************** 458 465 //****************************************************************************** 459 DWORD WIN32API GetFullPathNameA(LPCSTR arg1, DWORD arg2, LPSTR arg3, LPSTR *arg4) 466 ODINFUNCTION4(DWORD, GetFullPathNameA, 467 LPCSTR, arg1, 468 DWORD, arg2, 469 LPSTR, arg3, 470 LPSTR *, arg4) 460 471 { 461 472 dprintf(("KERNEL32: GetFullPathName %s\n", arg1)); … … 464 475 //****************************************************************************** 465 476 //****************************************************************************** 466 DWORD WIN32API GetFullPathNameW(LPCWSTR lpFileName, DWORD nBufferLength, 467 LPWSTR lpBuffer, LPWSTR *lpFilePart) 477 ODINFUNCTION4(DWORD, GetFullPathNameW, 478 LPCWSTR, lpFileName, 479 DWORD, nBufferLength, 480 LPWSTR, lpBuffer, 481 LPWSTR *, lpFilePart) 468 482 { 469 483 char *astring, *asciibuffer, *asciipart; … … 496 510 //****************************************************************************** 497 511 //****************************************************************************** 498 BOOL WIN32API LockFile(HANDLE arg1, 499 DWORD arg2, 500 DWORD arg3, 501 DWORD arg4, 502 DWORD arg5) 512 ODINFUNCTION5(BOOL, LockFile, 513 HANDLE, arg1, 514 DWORD, arg2, 515 DWORD, arg3, 516 DWORD, arg4, 517 DWORD, arg5) 503 518 { 504 519 dprintf(("KERNEL32: LockFile (%08xh,%08xh,%08xh,%08xh,%08xh)\n", … … 534 549 *****************************************************************************/ 535 550 536 BOOL WIN32API LockFileEx(HANDLE hFile, 537 DWORD dwFlags, 538 DWORD dwReserved, 539 DWORD nNumberOfBytesToLockLow, 540 DWORD nNumberOfBytesToLockHigh, 541 LPOVERLAPPED lpOverlapped) 551 ODINFUNCTION6(BOOL, LockFileEx, 552 HANDLE, hFile, 553 DWORD, dwFlags, 554 DWORD, dwReserved, 555 DWORD, nNumberOfBytesToLockLow, 556 DWORD, nNumberOfBytesToLockHigh, 557 LPOVERLAPPED, lpOverlapped) 542 558 { 543 559 dprintf(("Kernel32: LockFileEx(%08xh,%08xh,%08xh,%08xh,%08xh,%08xh)\n", … … 561 577 //****************************************************************************** 562 578 //****************************************************************************** 563 BOOL WIN32API MoveFileA( LPCSTR arg1, LPCSTR arg2) 579 ODINFUNCTION2(BOOL, MoveFileA, 580 LPCSTR, arg1, 581 LPCSTR, arg2) 564 582 { 565 583 dprintf(("KERNEL32: MoveFileA\n")); … … 568 586 //****************************************************************************** 569 587 //****************************************************************************** 570 BOOL WIN32API MoveFileExA(LPCSTR arg1, 571 LPCSTR arg2, 572 DWORD fdwFlags) 588 ODINFUNCTION3(BOOL, MoveFileExA, 589 LPCSTR, arg1, 590 LPCSTR, arg2, 591 DWORD, fdwFlags) 573 592 { 574 593 dprintf(("KERNEL32: MoveFileExA %s to %s, not complete!\n", arg1, arg2)); … … 577 596 //****************************************************************************** 578 597 //****************************************************************************** 579 BOOL WIN32API MoveFileW(LPCWSTR lpSrc, LPCWSTR lpDest) 598 ODINFUNCTION2(BOOL, MoveFileW, 599 LPCWSTR, lpSrc, 600 LPCWSTR, lpDest) 580 601 { 581 602 char *asciisrc, *asciidest; … … 592 613 //****************************************************************************** 593 614 //****************************************************************************** 594 BOOL WIN32API MoveFileExW(LPCWSTR arg1, 595 LPCWSTR arg2, 596 DWORD fdwFlags) 615 ODINFUNCTION3(BOOL, MoveFileExW, 616 LPCWSTR, arg1, 617 LPCWSTR, arg2, 618 DWORD, fdwFlags) 597 619 { 598 620 dprintf(("KERNEL32: MoveFileExW %s to %s, not complete!\n", arg1, arg2)); … … 601 623 //****************************************************************************** 602 624 /***************************************************************************** 603 * Name : HFILE WIN32API OpenFile 604 * Purpose : forward OpenFile to Open32 625 ODINFUNCTION3(*, :, 626 HFILE, WIN32API, 627 OpenFile *, Purpose, 628 :, forwardOpenFile to Open32 605 629 * Parameters: 606 630 * Variables : … … 612 636 *****************************************************************************/ 613 637 614 HFILE WIN32API OpenFile(LPCSTR arg1, 615 OFSTRUCT *arg2, 616 UINT arg3) 638 ODINFUNCTION3(HFILE, OpenFile, 639 LPCSTR, arg1, 640 OFSTRUCT *, arg2, 641 UINT, arg3) 617 642 { 618 643 HFILE hFile; … … 631 656 //****************************************************************************** 632 657 //****************************************************************************** 633 BOOL WIN32API UnlockFile(HANDLE arg1, 634 DWORD arg2, 635 DWORD arg3, 636 DWORD arg4, 637 DWORD arg5) 658 ODINFUNCTION5(BOOL, UnlockFile, 659 HANDLE, arg1, 660 DWORD, arg2, 661 DWORD, arg3, 662 DWORD, arg4, 663 DWORD, arg5) 638 664 { 639 665 dprintf(("KERNEL32: UnlockFile(%08xh,%08xh,%08xh,%08xh,%08xh)\n", … … 668 694 *****************************************************************************/ 669 695 670 BOOL WIN32API UnlockFileEx(HANDLE hFile, 671 DWORD dwReserved, 672 DWORD nNumberOfBytesToLockLow, 673 DWORD nNumberOfBytesToLockHigh, 674 LPOVERLAPPED lpOverlapped) 696 ODINFUNCTION5(BOOL, UnlockFileEx, 697 HANDLE, hFile, 698 DWORD, dwReserved, 699 DWORD, nNumberOfBytesToLockLow, 700 DWORD, nNumberOfBytesToLockHigh, 701 LPOVERLAPPED, lpOverlapped) 675 702 { 676 703 dprintf(("Kernel32: UnlockFileEx(%08xh,%08xh,%08xh,%08xh,%08xh,%08xh)\n", … … 689 716 //****************************************************************************** 690 717 //****************************************************************************** 691 DWORD WIN32API GetShortPathNameA(LPCTSTR lpszLongPath, LPTSTR lpszShortPath, 692 DWORD cchBuffer) 718 ODINFUNCTION3(DWORD, GetShortPathNameA, 719 LPCTSTR, lpszLongPath, 720 LPTSTR, lpszShortPath, 721 DWORD, cchBuffer) 693 722 { 694 723 int length; … … 705 734 //****************************************************************************** 706 735 //****************************************************************************** 707 DWORD WIN32API GetShortPathNameW(LPCWSTR lpszLongPath, LPWSTR lpszShortPath, 708 DWORD cchBuffer) 736 ODINFUNCTION3(DWORD, GetShortPathNameW, 737 LPCWSTR, lpszLongPath, 738 LPWSTR, lpszShortPath, 739 DWORD, cchBuffer) 709 740 { 710 741 int length; … … 721 752 //****************************************************************************** 722 753 //****************************************************************************** 723 HANDLE WIN32API FindFirstChangeNotificationA(LPCSTR lpPathName, BOOL bWatchSubtree, 724 DWORD dwNotifyFilter) 754 ODINFUNCTION3(HANDLE, FindFirstChangeNotificationA, 755 LPCSTR, lpPathName, 756 BOOL, bWatchSubtree, 757 DWORD, dwNotifyFilter) 725 758 { 726 759 dprintf(("KERNEL32: FindFirstChangeNotificationA, Not implemented\n")); … … 729 762 //****************************************************************************** 730 763 //****************************************************************************** 731 BOOL WIN32API FindNextChangeNotification(HANDLE hChange) 764 ODINFUNCTION1(BOOL, FindNextChangeNotification, 765 HANDLE, hChange) 732 766 { 733 767 dprintf(("KERNEL32: FindNextChangeNotification (%08xh), Not implemented\n", … … 738 772 //****************************************************************************** 739 773 //****************************************************************************** 740 VOID WIN32API SetFileApisToANSI( VOID ) /*PLF Tue 98-02-10 00:52:22*/ 774 ODINPROCEDURE0(SetFileApisToANSI) 741 775 { 742 776 dprintf(("SetFileApisToANSI() stub\n")); … … 758 792 *****************************************************************************/ 759 793 760 DWORD WIN32API GetCompressedFileSizeA(LPCTSTR lpFileName, 761 LPDWORD lpFileSizeHigh) 794 ODINFUNCTION2(DWORD, GetCompressedFileSizeA, 795 LPCTSTR, lpFileName, 796 LPDWORD, lpFileSizeHigh) 762 797 { 763 798 dprintf(("KERNEL32: GetCompressedFileSizeA (%s, %08xh) not implemented.\n", … … 785 820 *****************************************************************************/ 786 821 787 DWORD WIN32API GetCompressedFileSizeW(LPCWSTR lpFileName, 788 LPDWORD lpFileSizeHigh) 822 ODINFUNCTION2(DWORD, GetCompressedFileSizeW, 823 LPCWSTR, lpFileName, 824 LPDWORD, lpFileSizeHigh) 789 825 { 790 826 LPCTSTR lpAsciiFileName; /* converted filename */ … … 818 854 *****************************************************************************/ 819 855 820 BOOL WIN32API GetFileAttributesExA(LPCSTR lpFileName, 821 GET_FILEEX_INFO_LEVELS fInfoLevelId, 822 LPVOID lpFileInformation) 856 ODINFUNCTION3(BOOL, GetFileAttributesExA, 857 LPCSTR, lpFileName, 858 GET_FILEEX_INFO_LEVELS, fInfoLevelId, 859 LPVOID, lpFileInformation) 823 860 { 824 861 BOOL rc; … … 862 899 *****************************************************************************/ 863 900 864 BOOL WINAPI GetFileAttributesExW(LPCWSTR lpFileName, 865 GET_FILEEX_INFO_LEVELS fInfoLevelId, 866 LPVOID lpFileInformation) 901 ODINFUNCTION3(BOOL, GetFileAttributesExW, 902 LPCWSTR, lpFileName, 903 GET_FILEEX_INFO_LEVELS, fInfoLevelId, 904 LPVOID, lpFileInformation) 867 905 { 868 906 LPSTR nameA = HEAP_strdupWtoA( GetProcessHeap(), 0, lpFileName ); … … 872 910 } 873 911 912
Note:
See TracChangeset
for help on using the changeset viewer.