Changeset 7849 for trunk/src/kernel32/Fileio.cpp
- Timestamp:
- Feb 9, 2002, 1:45:14 PM (24 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kernel32/Fileio.cpp
r7798 r7849 1 /* $Id: Fileio.cpp,v 1.6 4 2002-02-03 21:06:40sandervl Exp $ */1 /* $Id: Fileio.cpp,v 1.65 2002-02-09 12:45:11 sandervl Exp $ */ 2 2 3 3 /* … … 188 188 //****************************************************************************** 189 189 //****************************************************************************** 190 ODINFUNCTION7(HFILE, CreateFileA, 191 LPCSTR, lpszName, 192 DWORD, fdwAccess, 193 DWORD, fdwShareMode, 194 LPSECURITY_ATTRIBUTES, lpsa, 195 DWORD, fdwCreate, 196 DWORD, fdwAttrsAndFlags, 197 HANDLE, hTemplateFile) 190 HFILE WIN32API CreateFileA(LPCSTR lpszName, DWORD fdwAccess, DWORD fdwShareMode, 191 LPSECURITY_ATTRIBUTES lpsa, DWORD fdwCreate, 192 DWORD fdwAttrsAndFlags, HANDLE hTemplateFile) 198 193 { 199 194 dprintf(("CreateFileA %s", lpszName)); … … 209 204 //****************************************************************************** 210 205 //****************************************************************************** 211 ODINFUNCTION7(HFILE, CreateFileW, 212 LPCWSTR, arg1, 213 DWORD, arg2, 214 DWORD, arg3, 215 PSECURITY_ATTRIBUTES, arg4, 216 DWORD, arg5, 217 DWORD, arg6, 218 HANDLE, arg7) 206 HFILE WIN32API CreateFileW(LPCWSTR lpszName, DWORD fdwAccess, DWORD fdwShareMode, 207 LPSECURITY_ATTRIBUTES lpsa, DWORD fdwCreate, 208 DWORD fdwAttrsAndFlags, HANDLE hTemplateFile) 219 209 { 220 210 HANDLE rc; 221 211 char *astring; 222 212 223 astring = UnicodeToAsciiString((LPWSTR)arg1); 224 rc = CreateFileA(astring, arg2, arg3, arg4, arg5, arg6, arg7); 213 astring = UnicodeToAsciiString((LPWSTR)lpszName); 214 rc = CreateFileA(astring, fdwAccess, fdwShareMode, 215 lpsa, fdwCreate, fdwAttrsAndFlags, 216 hTemplateFile); 225 217 FreeAsciiString(astring); 226 218 return(rc); … … 255 247 * Author : SvL 256 248 *****************************************************************************/ 257 ODINFUNCTION6(HANDLE, FindFirstFileExA, LPCSTR, lpFileName, 258 FINDEX_INFO_LEVELS, fInfoLevelId, 259 LPVOID, lpFindFileData, 260 FINDEX_SEARCH_OPS, fSearchOp, 261 LPVOID, lpSearchFilter, 262 DWORD, dwAdditionalFlags) 249 HANDLE WIN32API FindFirstFileExA(LPCSTR lpFileName, FINDEX_INFO_LEVELS fInfoLevelId, 250 LPVOID lpFindFileData, 251 FINDEX_SEARCH_OPS fSearchOp, 252 LPVOID lpSearchFilter, 253 DWORD dwAdditionalFlags) 263 254 { 264 255 HANDLE hFind; … … 343 334 * Author : Wine 344 335 *****************************************************************************/ 345 ODINFUNCTION6(HANDLE, FindFirstFileExW, LPCWSTR,lpFileName,346 FINDEX_INFO_LEVELS,fInfoLevelId,347 LPVOID,lpFindFileData,348 FINDEX_SEARCH_OPS,fSearchOp,349 LPVOID,lpSearchFilter,350 DWORD,dwAdditionalFlags)336 HANDLE WIN32API FindFirstFileExW(LPCWSTR lpFileName, 337 FINDEX_INFO_LEVELS fInfoLevelId, 338 LPVOID lpFindFileData, 339 FINDEX_SEARCH_OPS fSearchOp, 340 LPVOID lpSearchFilter, 341 DWORD dwAdditionalFlags) 351 342 { 352 343 HANDLE handle; … … 397 388 // internal function for faster access (SHELL32) 398 389 //****************************************************************************** 399 ODINFUNCTION3(HANDLE, FindFirstFileMultiA, 400 LPCSTR, lpFileName, 401 WIN32_FIND_DATAA *, lpFindFileData, 402 DWORD *,count) 390 HANDLE WIN32API FindFirstFileMultiA(LPCSTR lpFileName, 391 WIN32_FIND_DATAA * lpFindFileData, 392 DWORD * count) 403 393 { 404 394 return (HANDLE)OSLibDosFindFirstMulti(lpFileName,lpFindFileData,count); … … 406 396 //****************************************************************************** 407 397 //****************************************************************************** 408 ODINFUNCTION2(BOOL, FindNextFileA, 409 HANDLE, hFindFile, 410 WIN32_FIND_DATAA *, lpFindFileData) 398 BOOL WIN32API FindNextFileA(HANDLE hFindFile, WIN32_FIND_DATAA * lpFindFileData) 411 399 { 412 400 return OSLibDosFindNext(hFindFile,lpFindFileData); … … 415 403 // internal function for faster access (SHELL32) 416 404 //****************************************************************************** 417 ODINFUNCTION3(BOOL, FindNextFileMultiA, 418 HANDLE, hFindFile, 419 WIN32_FIND_DATAA *, lpFindFileData, 420 DWORD *,count) 405 BOOL WIN32API FindNextFileMultiA(HANDLE hFindFile, WIN32_FIND_DATAA * lpFindFileData, 406 DWORD *count) 421 407 { 422 408 return OSLibDosFindNextMulti(hFindFile,lpFindFileData,count); … … 424 410 //****************************************************************************** 425 411 //****************************************************************************** 426 ODINFUNCTION2(BOOL, FindNextFileW, 427 HANDLE, hFindFile, 428 WIN32_FIND_DATAW *, lpFindFileData) 412 BOOL WIN32API FindNextFileW(HANDLE hFindFile, WIN32_FIND_DATAW * lpFindFileData) 429 413 { 430 414 WIN32_FIND_DATAA wfda; … … 454 438 //****************************************************************************** 455 439 //****************************************************************************** 456 ODINFUNCTION1(BOOL, FindClose, 457 HANDLE, hFindFile) 440 BOOL WIN32API FindClose(HANDLE hFindFile) 458 441 { 459 442 return OSLibDosFindClose(hFindFile); … … 461 444 //****************************************************************************** 462 445 //****************************************************************************** 463 ODINFUNCTION1(DWORD, GetFileType, 464 HANDLE, hFile) 446 DWORD WIN32API GetFileType(HANDLE hFile) 465 447 { 466 448 return(HMGetFileType(hFile)); … … 468 450 //****************************************************************************** 469 451 //****************************************************************************** 470 ODINFUNCTION2(DWORD, GetFileInformationByHandle, 471 HANDLE, arg1, 472 BY_HANDLE_FILE_INFORMATION *, arg2) 452 DWORD WIN32API GetFileInformationByHandle(HANDLE arg1, BY_HANDLE_FILE_INFORMATION * arg2) 473 453 { 474 454 return(HMGetFileInformationByHandle(arg1,arg2)); … … 476 456 //****************************************************************************** 477 457 //****************************************************************************** 478 ODINFUNCTION1(BOOL, SetEndOfFile, 479 HANDLE, arg1) 458 BOOL WIN32API SetEndOfFile(HANDLE arg1) 480 459 { 481 460 return HMSetEndOfFile(arg1); … … 483 462 //****************************************************************************** 484 463 //****************************************************************************** 485 ODINFUNCTION4(BOOL, SetFileTime, 486 HANDLE, arg1, 487 const FILETIME *, arg2, 488 const FILETIME *, arg3, 489 const FILETIME *, arg4) 464 BOOL WIN32API SetFileTime(HANDLE arg1, const FILETIME * arg2, 465 const FILETIME * arg3, 466 const FILETIME * arg4) 490 467 { 491 468 return HMSetFileTime(arg1, … … 496 473 //****************************************************************************** 497 474 //****************************************************************************** 498 ODINFUNCTION2(INT, CompareFileTime, 499 FILETIME *, lpft1, 500 FILETIME *, lpft2) 475 INT WIN32API CompareFileTime(FILETIME * lpft1, FILETIME * lpft2) 501 476 { 502 477 if (lpft1 == NULL || lpft2 == NULL) { … … 521 496 //****************************************************************************** 522 497 //****************************************************************************** 523 ODINFUNCTION4(BOOL, GetFileTime, HANDLE, hFile, LPFILETIME, arg2, LPFILETIME, arg3, LPFILETIME,arg4)498 BOOL WIN32API GetFileTime(HANDLE hFile, LPFILETIME arg2, LPFILETIME arg3, LPFILETIME arg4) 524 499 { 525 500 return HMGetFileTime(hFile, arg2, arg3, arg4); … … 527 502 //****************************************************************************** 528 503 //****************************************************************************** 529 ODINFUNCTION3(BOOL, CopyFileA, 530 LPCSTR, arg1, 531 LPCSTR, arg2, 532 BOOL, arg3) 504 BOOL WIN32API CopyFileA(LPCSTR arg1, LPCSTR arg2, BOOL arg3) 533 505 { 534 506 return OSLibDosCopyFile(arg1, arg2, arg3); 535 507 } 536 508 //****************************************************************************** 537 //SvL: 24-6-'97 - Added 538 //****************************************************************************** 539 ODINFUNCTION3(BOOL, CopyFileW, 540 LPCWSTR, arg1, 541 LPCWSTR, arg2, 542 BOOL, arg3) 509 //****************************************************************************** 510 BOOL WIN32API CopyFileW(LPCWSTR arg1, LPCWSTR arg2, BOOL arg3) 543 511 { 544 512 BOOL rc; … … 547 515 astring1 = UnicodeToAsciiString((LPWSTR)arg1); 548 516 astring2 = UnicodeToAsciiString((LPWSTR)arg2); 549 rc = C ALL_ODINFUNC(CopyFileA)(astring1, astring2, arg3);517 rc = CopyFileA(astring1, astring2, arg3); 550 518 FreeAsciiString(astring2); 551 519 FreeAsciiString(astring1); … … 576 544 577 545 BOOL WIN32API CopyFileExA( LPCSTR lpExistingFileName, 578 579 580 581 582 546 LPCSTR lpNewFileName, 547 LPPROGRESS_ROUTINE lpProgressRoutine, 548 LPVOID lpData, 549 LPBOOL pbCancel, 550 DWORD dwCopyFlags) 583 551 { 584 552 … … 653 621 //****************************************************************************** 654 622 //****************************************************************************** 655 ODINFUNCTION2(DWORD, GetFileSize, 656 HANDLE, arg1, 657 PDWORD, arg2) 623 DWORD WIN32API GetFileSize(HANDLE arg1, PDWORD arg2) 658 624 { 659 625 return HMGetFileSize(arg1, … … 662 628 //****************************************************************************** 663 629 //****************************************************************************** 664 ODINFUNCTION1(BOOL, DeleteFileA, 665 LPCSTR, lpszFile) 630 BOOL WIN32API DeleteFileA(LPCSTR lpszFile) 666 631 { 667 632 BOOL rc; 668 633 669 #if 0670 dprintf(("DeleteFileA %s", lpszFile));671 return 1;672 #else673 634 rc = OSLibDosDelete((LPSTR)lpszFile); 674 635 if(!rc) { … … 681 642 682 643 return rc; 683 #endif 684 } 685 //****************************************************************************** 686 //****************************************************************************** 687 ODINFUNCTION1(BOOL, DeleteFileW, 688 LPCWSTR, arg1) 644 } 645 //****************************************************************************** 646 //****************************************************************************** 647 BOOL WIN32API DeleteFileW(LPCWSTR arg1) 689 648 { 690 649 BOOL rc; … … 692 651 693 652 astring = UnicodeToAsciiString((LPWSTR)arg1); 694 rc = CALL_ODINFUNC(DeleteFileA)(astring);653 rc = DeleteFileA(astring); 695 654 FreeAsciiString(astring); 696 655 return(rc); … … 698 657 //****************************************************************************** 699 658 //****************************************************************************** 700 ODINFUNCTION4(UINT, GetTempFileNameA, 701 LPCSTR, arg1, 702 LPCSTR, arg2, 703 UINT, arg3, 704 LPSTR, arg4) 659 UINT WIN32API GetTempFileNameA(LPCSTR arg1, LPCSTR arg2, UINT arg3, LPSTR arg4) 705 660 { 706 661 return O32_GetTempFileName(arg1, arg2, arg3, arg4); … … 708 663 //****************************************************************************** 709 664 //****************************************************************************** 710 ODINFUNCTION4(UINT, GetTempFileNameW, 711 LPCWSTR, lpPathName, 712 LPCWSTR, lpPrefixString, 713 UINT, uUnique, 714 LPWSTR, lpTempFileName) 665 UINT WIN32API GetTempFileNameW(LPCWSTR lpPathName, LPCWSTR lpPrefixString, 666 UINT uUnique, LPWSTR lpTempFileName) 715 667 { 716 668 char *asciipath, *asciiprefix; … … 729 681 //****************************************************************************** 730 682 //****************************************************************************** 731 ODINFUNCTION5(BOOL, ReadFile, 732 HANDLE, hFile, 733 PVOID, pBuffer, 734 DWORD, dwLength, 735 PDWORD, lpNumberOfBytesRead, 736 LPOVERLAPPED, lpOverlapped) 683 BOOL WIN32API ReadFile(HANDLE hFile, PVOID pBuffer, DWORD dwLength, 684 PDWORD lpNumberOfBytesRead, LPOVERLAPPED lpOverlapped) 737 685 { 738 686 if(lpNumberOfBytesRead) *lpNumberOfBytesRead = 0; … … 750 698 //****************************************************************************** 751 699 //****************************************************************************** 752 ODINFUNCTION5(BOOL, ReadFileEx, 753 HANDLE, hFile, 754 LPVOID, lpBuffer, 755 DWORD, nNumberOfBytesToRead, 756 LPOVERLAPPED, lpOverlapped, 757 LPOVERLAPPED_COMPLETION_ROUTINE, lpCompletionRoutine) 700 BOOL WIN32API ReadFileEx(HANDLE hFile, 701 LPVOID lpBuffer, 702 DWORD nNumberOfBytesToRead, 703 LPOVERLAPPED lpOverlapped, 704 LPOVERLAPPED_COMPLETION_ROUTINE lpCompletionRoutine) 758 705 { 759 706 if(nNumberOfBytesToRead == 0) { … … 780 727 //****************************************************************************** 781 728 //****************************************************************************** 782 ODINFUNCTION5(BOOL, WriteFile, 783 HANDLE, hFile, 784 LPCVOID, buffer, 785 DWORD, nrbytes, 786 LPDWORD, nrbyteswritten, 787 LPOVERLAPPED, lpOverlapped) 729 BOOL WIN32API WriteFile(HANDLE hFile, LPCVOID buffer, DWORD nrbytes, 730 LPDWORD nrbyteswritten, LPOVERLAPPED lpOverlapped) 788 731 { 789 732 if(nrbyteswritten) *nrbyteswritten = 0; … … 821 764 *****************************************************************************/ 822 765 823 ODINFUNCTION5(BOOL, WriteFileEx, 824 HANDLE, hFile, 825 LPCVOID, lpBuffer, 826 DWORD, nNumberOfBytesToWrite, 827 LPOVERLAPPED, lpOverlapped, 828 LPOVERLAPPED_COMPLETION_ROUTINE, lpCompletionRoutine) 766 BOOL WIN32API WriteFileEx(HANDLE hFile, 767 LPCVOID lpBuffer, 768 DWORD nNumberOfBytesToWrite, 769 LPOVERLAPPED lpOverlapped, 770 LPOVERLAPPED_COMPLETION_ROUTINE lpCompletionRoutine) 829 771 { 830 772 if(nNumberOfBytesToWrite == 0) { … … 851 793 //****************************************************************************** 852 794 //****************************************************************************** 853 ODINFUNCTION4(DWORD, SetFilePointer, 854 HANDLE, hFile, 855 LONG, lDistanceToMove, 856 PLONG, lpDistanceToMoveHigh, 857 DWORD, dwMoveMethod) 795 DWORD WIN32API SetFilePointer(HANDLE hFile, LONG lDistanceToMove, 796 PLONG lpDistanceToMoveHigh, DWORD dwMoveMethod) 858 797 { 859 798 return(HMSetFilePointer(hFile, … … 864 803 //****************************************************************************** 865 804 //****************************************************************************** 866 ODINFUNCTION1(DWORD, GetFileAttributesA, 867 LPCSTR, lpszFileName) 805 DWORD WIN32API GetFileAttributesA(LPCSTR lpszFileName) 868 806 { 869 807 DWORD rc, error; … … 908 846 //****************************************************************************** 909 847 //****************************************************************************** 910 ODINFUNCTION1(DWORD, GetFileAttributesW, 911 LPCWSTR, arg1) 848 DWORD WIN32API GetFileAttributesW(LPCWSTR arg1) 912 849 { 913 850 DWORD rc; … … 915 852 916 853 astring = UnicodeToAsciiString((LPWSTR)arg1); 917 rc = CALL_ODINFUNC(GetFileAttributesA)(astring);854 rc = GetFileAttributesA(astring); 918 855 FreeAsciiString(astring); 919 856 return(rc); … … 921 858 //****************************************************************************** 922 859 //****************************************************************************** 923 ODINFUNCTION2(BOOL, SetFileAttributesA, 924 LPCSTR, arg1, 925 DWORD, arg2) 926 { 927 dprintf(("KERNEL32: SetFileAttributes of %s\n", arg1)); 928 return O32_SetFileAttributes(arg1, arg2); 929 } 930 //****************************************************************************** 931 //****************************************************************************** 932 ODINFUNCTION2(BOOL, SetFileAttributesW, 933 LPCWSTR, lpFileName, 934 DWORD, dwFileAttributes) 860 BOOL WIN32API SetFileAttributesA(LPCSTR lpFileName, DWORD dwFileAttributes) 861 { 862 dprintf(("KERNEL32: SetFileAttributes of %s", lpFileName)); 863 return O32_SetFileAttributes(lpFileName, dwFileAttributes); 864 } 865 //****************************************************************************** 866 //****************************************************************************** 867 BOOL WIN32API SetFileAttributesW(LPCWSTR lpFileName, DWORD dwFileAttributes) 935 868 { 936 869 char *asciifile; … … 938 871 939 872 asciifile = UnicodeToAsciiString((LPWSTR)lpFileName); 940 rc = O32_SetFileAttributes(asciifile, dwFileAttributes);873 rc = SetFileAttributesA(asciifile, dwFileAttributes); 941 874 FreeAsciiString(asciifile); 942 875 return(rc); … … 944 877 //****************************************************************************** 945 878 //****************************************************************************** 946 ODINFUNCTION4(DWORD, GetFullPathNameA, 947 LPCSTR, arg1, 948 DWORD, arg2, 949 LPSTR, arg3, 950 LPSTR *, arg4) 879 DWORD WIN32API GetFullPathNameA(LPCSTR arg1, DWORD arg2, LPSTR arg3, 880 LPSTR * arg4) 951 881 { 952 882 char *ptr; … … 960 890 //****************************************************************************** 961 891 //****************************************************************************** 962 ODINFUNCTION4(DWORD, GetFullPathNameW, 963 LPCWSTR, lpFileName, 964 DWORD, nBufferLength, 965 LPWSTR, lpBuffer, 966 LPWSTR *, lpFilePart) 892 DWORD WIN32API GetFullPathNameW(LPCWSTR lpFileName, DWORD nBufferLength, 893 LPWSTR lpBuffer, LPWSTR *lpFilePart) 967 894 { 968 895 char *astring, *asciibuffer, *asciipart; … … 972 899 astring = UnicodeToAsciiString((LPWSTR)lpFileName); 973 900 974 rc = CALL_ODINFUNC(GetFullPathNameA)(astring, 975 nBufferLength, 976 asciibuffer, 977 &asciipart); 901 rc = GetFullPathNameA(astring, nBufferLength, 902 asciibuffer, &asciipart); 978 903 979 904 dprintf(("KERNEL32: GetFullPathNameW %s returns %s\n", … … 998 923 //****************************************************************************** 999 924 //****************************************************************************** 1000 ODINFUNCTION5(BOOL, LockFile, 1001 HANDLE, arg1, 1002 DWORD, arg2, 1003 DWORD, arg3, 1004 DWORD, arg4, 1005 DWORD, arg5) 925 BOOL WIN32API LockFile(HANDLE arg1, DWORD arg2, 926 DWORD arg3, DWORD arg4, 927 DWORD arg5) 1006 928 { 1007 929 return HMLockFile(arg1, … … 1030 952 *****************************************************************************/ 1031 953 1032 ODINFUNCTION6(BOOL, LockFileEx, 1033 HANDLE, hFile, 1034 DWORD, dwFlags, 1035 DWORD, dwReserved, 1036 DWORD, nNumberOfBytesToLockLow, 1037 DWORD, nNumberOfBytesToLockHigh, 1038 LPOVERLAPPED, lpOverlapped) 954 BOOL LockFileEx(HANDLE hFile, DWORD dwFlags, DWORD dwReserved, 955 DWORD nNumberOfBytesToLockLow, 956 DWORD nNumberOfBytesToLockHigh, 957 LPOVERLAPPED lpOverlapped) 1039 958 { 1040 959 return(HMLockFile(hFile, … … 1046 965 //****************************************************************************** 1047 966 //****************************************************************************** 1048 ODINFUNCTION2(BOOL, MoveFileA, 1049 LPCSTR, arg1, 1050 LPCSTR, arg2) 967 BOOL WIN32API MoveFileA(LPCSTR arg1, LPCSTR arg2) 1051 968 { 1052 969 dprintf(("KERNEL32: MoveFileA %s %s", arg1, arg2)); … … 1071 988 *****************************************************************************/ 1072 989 1073 ODINFUNCTION3(BOOL, MoveFileExA, 1074 LPCSTR, lpszOldFilename, 1075 LPCSTR, lpszNewFilename, 1076 DWORD, fdwFlags) 990 BOOL WIN32API MoveFileExA(LPCSTR lpszOldFilename, 991 LPCSTR lpszNewFilename, 992 DWORD fdwFlags) 1077 993 { 1078 994 dprintf(("KERNEL32: MoveFileExA %s to %s %x, not complete!\n", … … 1134 1050 //****************************************************************************** 1135 1051 //****************************************************************************** 1136 ODINFUNCTION2(BOOL, MoveFileW, 1137 LPCWSTR, lpSrc, 1138 LPCWSTR, lpDest) 1052 BOOL WIN32API MoveFileW(LPCWSTR lpSrc, LPCWSTR lpDest) 1139 1053 { 1140 1054 char *asciisrc, *asciidest; … … 1150 1064 //****************************************************************************** 1151 1065 //****************************************************************************** 1152 ODINFUNCTION3(BOOL, MoveFileExW, 1153 LPCWSTR, lpSrc, 1154 LPCWSTR, lpDest, 1155 DWORD, fdwFlags) 1066 BOOL WIN32API MoveFileExW(LPCWSTR lpSrc, LPCWSTR lpDest, DWORD fdwFlags) 1156 1067 { 1157 1068 dprintf(("KERNEL32: MoveFileExW %ls to %ls %x", … … 1196 1107 *****************************************************************************/ 1197 1108 1198 ODINFUNCTION3(HFILE, OpenFile, 1199 LPCSTR, lpszFile, 1200 OFSTRUCT *, lpOpenBuff, 1201 UINT, fuMode) 1109 HFILE WIN32API OpenFile(LPCSTR lpszFile, OFSTRUCT *lpOpenBuff, 1110 UINT fuMode) 1202 1111 { 1203 1112 HFILE hFile; … … 1216 1125 //****************************************************************************** 1217 1126 //****************************************************************************** 1218 ODINFUNCTION5(BOOL, UnlockFile, 1219 HANDLE, arg1, 1220 DWORD, arg2, 1221 DWORD, arg3, 1222 DWORD, arg4, 1223 DWORD, arg5) 1127 BOOL WIN32API UnlockFile(HANDLE arg1, DWORD arg2, DWORD arg3, 1128 DWORD arg4, DWORD arg5) 1224 1129 { 1225 1130 return HMUnlockFile(arg1, … … 1247 1152 *****************************************************************************/ 1248 1153 1249 ODINFUNCTION5(BOOL, UnlockFileEx, 1250 HANDLE, hFile, 1251 DWORD, dwReserved, 1252 DWORD, nNumberOfBytesToLockLow, 1253 DWORD, nNumberOfBytesToLockHigh, 1254 LPOVERLAPPED, lpOverlapped) 1154 BOOL WIN32API UnlockFileEx(HANDLE hFile, DWORD dwReserved, 1155 DWORD nNumberOfBytesToLockLow, 1156 DWORD nNumberOfBytesToLockHigh, 1157 LPOVERLAPPED lpOverlapped) 1255 1158 { 1256 1159 return(HMUnlockFileEx(hFile, dwReserved, … … 1270 1173 //- if successful -> return length of string (excluding 0 terminator) 1271 1174 //****************************************************************************** 1272 ODINFUNCTION3(DWORD, GetShortPathNameA, 1273 LPCTSTR, lpszLongPath, 1274 LPTSTR, lpszShortPath, 1275 DWORD, cchBuffer) 1175 DWORD WIN32API GetShortPathNameA(LPCTSTR lpszLongPath, 1176 LPTSTR lpszShortPath, 1177 DWORD cchBuffer) 1276 1178 { 1277 1179 int length; … … 1286 1188 length = lstrlenA(lpszLongPath) + 1; 1287 1189 if(length > cchBuffer) { 1288 if(lpszShortPath) {1190 if(lpszShortPath) { 1289 1191 *lpszShortPath = 0; 1290 }1291 1192 } 1193 return(length); //return length required (including 0 terminator) 1292 1194 } 1293 1195 lstrcpyA(lpszShortPath, lpszLongPath); … … 1296 1198 //****************************************************************************** 1297 1199 //****************************************************************************** 1298 ODINFUNCTION3(DWORD, GetShortPathNameW, 1299 LPCWSTR, lpszLongPath, 1300 LPWSTR, lpszShortPath, 1301 DWORD, cchBuffer) 1200 DWORD WIN32API GetShortPathNameW(LPCWSTR lpszLongPath, LPWSTR lpszShortPath, 1201 DWORD cchBuffer) 1302 1202 { 1303 1203 int length; … … 1311 1211 length = lstrlenW(lpszLongPath) + 1; 1312 1212 if(length > cchBuffer) { 1313 if(lpszShortPath) {1213 if(lpszShortPath) { 1314 1214 *lpszShortPath = 0; 1315 }1316 1215 } 1216 return(length); //return length required (including 0 terminator) 1317 1217 } 1318 1218 lstrcpyW(lpszShortPath, lpszLongPath); … … 1379 1279 //****************************************************************************** 1380 1280 //****************************************************************************** 1381 ODINPROCEDURE0(SetFileApisToANSI)1281 void WIN32API SetFileApisToANSI() 1382 1282 { 1383 1283 dprintf(("!WARNING! SetFileApisToANSI() stub\n")); … … 1399 1299 *****************************************************************************/ 1400 1300 1401 ODINFUNCTION2(DWORD, GetCompressedFileSizeA, 1402 LPCTSTR, lpFileName, 1403 LPDWORD, lpFileSizeHigh) 1301 DWORD WIN32API GetCompressedFileSizeA(LPCTSTR lpFileName, LPDWORD lpFileSizeHigh) 1404 1302 { 1405 1303 dprintf(("KERNEL32: GetCompressedFileSizeA (%s, %08xh) not implemented.\n", … … 1427 1325 *****************************************************************************/ 1428 1326 1429 ODINFUNCTION2(DWORD, GetCompressedFileSizeW, 1430 LPCWSTR, lpFileName, 1431 LPDWORD, lpFileSizeHigh) 1327 DWORD WIN32API GetCompressedFileSizeW(LPCWSTR lpFileName, LPDWORD lpFileSizeHigh) 1432 1328 { 1433 1329 LPCTSTR lpAsciiFileName; /* converted filename */ … … 1461 1357 *****************************************************************************/ 1462 1358 1463 ODINFUNCTION3(BOOL, GetFileAttributesExA, 1464 LPCSTR, lpFileName, 1465 GET_FILEEX_INFO_LEVELS, fInfoLevelId, 1466 LPVOID, lpFileInformation) 1359 BOOL WIN32API GetFileAttributesExA(LPCSTR lpFileName, GET_FILEEX_INFO_LEVELS fInfoLevelId, 1360 LPVOID lpFileInformation) 1467 1361 { 1468 1362 BOOL rc; … … 1506 1400 *****************************************************************************/ 1507 1401 1508 ODINFUNCTION3(BOOL, GetFileAttributesExW, 1509 LPCWSTR, lpFileName, 1510 GET_FILEEX_INFO_LEVELS, fInfoLevelId, 1511 LPVOID, lpFileInformation) 1402 BOOL WIN32API GetFileAttributesExW(LPCWSTR lpFileName, 1403 GET_FILEEX_INFO_LEVELS fInfoLevelId, 1404 LPVOID lpFileInformation) 1512 1405 { 1513 1406 LPSTR nameA = HEAP_strdupWtoA( GetProcessHeap(), 0, lpFileName ); … … 1519 1412 //****************************************************************************** 1520 1413 //****************************************************************************** 1521 ODINFUNCTION3(HANDLE, FindFirstChangeNotificationA, 1522 LPCSTR, lpPathName, 1523 BOOL, bWatchSubtree, 1524 DWORD, dwNotifyFilter) 1414 HANDLE WIN32API FindFirstChangeNotificationA(LPCSTR lpPathName, 1415 BOOL bWatchSubtree, 1416 DWORD dwNotifyFilter) 1525 1417 { 1526 1418 dprintf(("KERNEL32: FindFirstChangeNotificationA %s, Not implemented (faked)", lpPathName)); … … 1529 1421 //****************************************************************************** 1530 1422 //****************************************************************************** 1531 ODINFUNCTION1(BOOL, FindNextChangeNotification, 1532 HANDLE, hChange) 1423 BOOL WIN32API FindNextChangeNotification(HANDLE hChange) 1533 1424 { 1534 1425 dprintf(("KERNEL32: FindNextChangeNotification (%08xh), Not implemented\n", … … 1539 1430 //****************************************************************************** 1540 1431 //****************************************************************************** 1541 ODINFUNCTION1(BOOL, FindCloseChangeNotification, HANDLE,hChange)1432 BOOL WIN32API FindCloseChangeNotification(HANDLE hChange) 1542 1433 { 1543 1434 dprintf(("KERNEL32: OS2FindNextChangeNotification, Not implemented\n")); … … 1565 1456 * Author : Markus Montkowski [Tha, 1998/05/21 20:57] 1566 1457 *****************************************************************************/ 1567 ODINFUNCTION3(HANDLE, FindFirstChangeNotificationW, LPCWSTR,lpPathName,1568 BOOL,bWatchSubtree,1569 DWORD,dwNotifyFilter)1458 HANDLE WIN32API FindFirstChangeNotificationW(LPCWSTR lpPathName, 1459 BOOL bWatchSubtree, 1460 DWORD dwNotifyFilter) 1570 1461 { 1571 1462 LPSTR lpAsciiPath; … … 1580 1471 //****************************************************************************** 1581 1472 //****************************************************************************** 1582 ODINFUNCTION8(BOOL, DeviceIoControl, HANDLE, hDevice, DWORD,dwIoControlCode,1583 LPVOID, lpInBuffer, DWORD,nInBufferSize,1584 LPVOID, lpOutBuffer, DWORD,nOutBufferSize,1585 LPDWORD, lpBytesReturned, LPOVERLAPPED,lpOverlapped)1473 BOOL WIN32API DeviceIoControl(HANDLE hDevice, DWORD dwIoControlCode, 1474 LPVOID lpInBuffer, DWORD nInBufferSize, 1475 LPVOID lpOutBuffer, DWORD nOutBufferSize, 1476 LPDWORD lpBytesReturned, LPOVERLAPPED lpOverlapped) 1586 1477 { 1587 1478 return HMDeviceIoControl(hDevice, dwIoControlCode, lpInBuffer, nInBufferSize, … … 1602 1493 * To get extended error information, call GetLastError. 1603 1494 * Remark : If there are any I/O operations in progress for the specified 1604 * file handle,and they were issued by the calling thread, the1495 * file HANDLE and they were issued by the calling thread, the 1605 1496 * CancelIO function cancels them. 1606 1497 * Note that the I/O operations must have been issued as … … 1612 1503 * error ERROR_OPERATION_ABORTED. All completion notifications 1613 1504 * for the I/O operations will occur normally. 1614 * Status : UNTESTED STUB1505 * Status : 1615 1506 * 1616 1507 * Author : Markus Montkowski [Thu, 1998/05/19 11:46] 1617 1508 *****************************************************************************/ 1618 ODINFUNCTION1(BOOL, CancelIo, HANDLE,hFile)1509 BOOL WIN32API CancelIo(HANDLE hFile) 1619 1510 { 1620 1511 return HMCancelIo(hFile); … … 1632 1523 *****************************************************************************/ 1633 1524 1634 ODINFUNCTION4(BOOL, GetOverlappedResult, 1635 HANDLE, hFile, /* [in] handle of file to check on */ 1636 LPOVERLAPPED, lpOverlapped, /* [in/out] pointer to overlapped */ 1637 LPDWORD, lpTransferred, /* [in/out] number of bytes transferred */ 1638 BOOL, bWait) /* [in] wait for the transfer to complete ? */ 1525 BOOL WIN32API GetOverlappedResult(HANDLE hFile, /* [in] handle of file to check on */ 1526 LPOVERLAPPED lpOverlapped, /* [in/out] pointer to overlapped */ 1527 LPDWORD lpTransferred, /* [in/out] number of bytes transferred */ 1528 BOOL bWait) /* [in] wait for the transfer to complete ? */ 1639 1529 { 1640 1530 //NOTE: According to the SDK docs lpOverlapped->hEvent can be 0. This function
Note:
See TracChangeset
for help on using the changeset viewer.