Changeset 2866 for trunk/src/kernel32/oslibdos.cpp
- Timestamp:
- Feb 23, 2000, 2:06:59 AM (25 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kernel32/oslibdos.cpp
r2803 r2866 1 /* $Id: oslibdos.cpp,v 1. 19 2000-02-16 14:25:45sandervl Exp $ */1 /* $Id: oslibdos.cpp,v 1.20 2000-02-23 01:06:58 sandervl Exp $ */ 2 2 /* 3 3 * Wrappers for OS/2 Dos* API … … 34 34 ***********************************/ 35 35 36 void _System SetLastError(ULONG ulError);36 void _System _O32_SetLastError(ULONG ulError); 37 37 38 38 APIRET APIENTRY DosAliasMem(PVOID pb, ULONG cb, PPVOID ppbAlias, ULONG fl); … … 621 621 if (nMaxInstances>0xff) 622 622 { 623 SetLastError(87); // ERROR_INVALID_PARAMETER623 _O32_SetLastError(87); // ERROR_INVALID_PARAMETER 624 624 return -1; // INVALID_HANDLE_VALUE 625 625 } … … 648 648 if (rc) 649 649 { 650 if ( rc == ERROR_PIPE_BUSY ) SetLastError(ERROR_PIPE_BUSY_W);650 if ( rc == ERROR_PIPE_BUSY ) _O32_SetLastError(ERROR_PIPE_BUSY_W); 651 651 else 652 if ( rc == ERROR_PATH_NOT_FOUND ) SetLastError(ERROR_PATH_NOT_FOUND_W);652 if ( rc == ERROR_PATH_NOT_FOUND ) _O32_SetLastError(ERROR_PATH_NOT_FOUND_W); 653 653 else 654 if ( rc == ERROR_NOT_ENOUGH_MEMORY ) SetLastError(ERROR_NOT_ENOUGH_MEMORY_W);654 if ( rc == ERROR_NOT_ENOUGH_MEMORY ) _O32_SetLastError(ERROR_NOT_ENOUGH_MEMORY_W); 655 655 else 656 if ( rc == ERROR_INVALID_PARAMETER ) SetLastError(ERROR_INVALID_PARAMETER_W);656 if ( rc == ERROR_INVALID_PARAMETER ) _O32_SetLastError(ERROR_INVALID_PARAMETER_W); 657 657 else 658 if ( rc == ERROR_OUT_OF_STRUCTURES ) SetLastError(ERROR_OUT_OF_STRUCTURES_W);658 if ( rc == ERROR_OUT_OF_STRUCTURES ) _O32_SetLastError(ERROR_OUT_OF_STRUCTURES_W); 659 659 else 660 660 // Unknown error 661 SetLastError(ERROR_INVALID_PARAMETER_W); // fixme!661 _O32_SetLastError(ERROR_INVALID_PARAMETER_W); // fixme! 662 662 return -1; // INVALID_HANDLE_VALUE 663 663 } … … 677 677 if (!rc) return (TRUE); 678 678 else 679 if (rc==ERROR_BROKEN_PIPE) SetLastError(ERROR_BROKEN_PIPE_W);680 else 681 if (rc==ERROR_BAD_PIPE) SetLastError(ERROR_BAD_PIPE_W);682 else 683 if (rc==ERROR_PIPE_NOT_CONNECTED) SetLastError(ERROR_PIPE_NOT_CONNECTED_W);679 if (rc==ERROR_BROKEN_PIPE) _O32_SetLastError(ERROR_BROKEN_PIPE_W); 680 else 681 if (rc==ERROR_BAD_PIPE) _O32_SetLastError(ERROR_BAD_PIPE_W); 682 else 683 if (rc==ERROR_PIPE_NOT_CONNECTED) _O32_SetLastError(ERROR_PIPE_NOT_CONNECTED_W); 684 684 else 685 685 // TODO: Implemnt this using Windows Errors 686 686 // if (rc==ERROR_INTERRUPT) 687 SetLastError(ERROR_PIPE_NOT_CONNECTED_W);687 _O32_SetLastError(ERROR_PIPE_NOT_CONNECTED_W); 688 688 689 689 return (FALSE); … … 724 724 if (!rc) return (TRUE); 725 725 else 726 if ( rc==ERROR_FILE_NOT_FOUND ) SetLastError(ERROR_FILE_NOT_FOUND_W);727 else 728 if ( rc==ERROR_PATH_NOT_FOUND ) SetLastError(ERROR_PATH_NOT_FOUND_W);729 else 730 if ( rc==ERROR_ACCESS_DENIED ) SetLastError(ERROR_ACCESS_DENIED_W);731 else 732 if ( rc==ERROR_MORE_DATA ) SetLastError(ERROR_MORE_DATA_W);733 else 734 if ( rc==ERROR_PIPE_BUSY ) SetLastError(ERROR_PIPE_BUSY_W);735 else 736 if ( rc==ERROR_BAD_FORMAT ) SetLastError(ERROR_BAD_FORMAT_W);737 else 738 if ( rc==ERROR_BROKEN_PIPE ) SetLastError(ERROR_BROKEN_PIPE_W);739 else 740 if ( rc==ERROR_BAD_PIPE ) SetLastError(ERROR_BAD_PIPE_W);741 else 742 if ( rc==ERROR_PIPE_NOT_CONNECTED ) SetLastError(ERROR_PIPE_NOT_CONNECTED_W);726 if ( rc==ERROR_FILE_NOT_FOUND ) _O32_SetLastError(ERROR_FILE_NOT_FOUND_W); 727 else 728 if ( rc==ERROR_PATH_NOT_FOUND ) _O32_SetLastError(ERROR_PATH_NOT_FOUND_W); 729 else 730 if ( rc==ERROR_ACCESS_DENIED ) _O32_SetLastError(ERROR_ACCESS_DENIED_W); 731 else 732 if ( rc==ERROR_MORE_DATA ) _O32_SetLastError(ERROR_MORE_DATA_W); 733 else 734 if ( rc==ERROR_PIPE_BUSY ) _O32_SetLastError(ERROR_PIPE_BUSY_W); 735 else 736 if ( rc==ERROR_BAD_FORMAT ) _O32_SetLastError(ERROR_BAD_FORMAT_W); 737 else 738 if ( rc==ERROR_BROKEN_PIPE ) _O32_SetLastError(ERROR_BROKEN_PIPE_W); 739 else 740 if ( rc==ERROR_BAD_PIPE ) _O32_SetLastError(ERROR_BAD_PIPE_W); 741 else 742 if ( rc==ERROR_PIPE_NOT_CONNECTED ) _O32_SetLastError(ERROR_PIPE_NOT_CONNECTED_W); 743 743 else 744 744 // TODO: Implemnt this using Windows Errors 745 745 // if (rc==ERROR_INTERRUPT) 746 SetLastError(233);746 _O32_SetLastError(233); 747 747 748 748 return (FALSE); … … 771 771 if (!rc) return (TRUE); 772 772 else 773 if ( rc==ERROR_ACCESS_DENIED ) SetLastError(ERROR_ACCESS_DENIED_W);774 else 775 if ( rc==ERROR_MORE_DATA ) SetLastError(ERROR_MORE_DATA_W);776 else 777 if ( rc==ERROR_PIPE_BUSY ) SetLastError(ERROR_PIPE_BUSY_W);778 else 779 if ( rc==ERROR_BAD_FORMAT ) SetLastError(ERROR_BAD_FORMAT_W);780 else 781 if ( rc==ERROR_BROKEN_PIPE ) SetLastError(ERROR_BROKEN_PIPE_W);782 else 783 if ( rc==ERROR_BAD_PIPE ) SetLastError(ERROR_BAD_PIPE_W);784 else 785 if ( rc==ERROR_PIPE_NOT_CONNECTED ) SetLastError(ERROR_PIPE_NOT_CONNECTED_W);773 if ( rc==ERROR_ACCESS_DENIED ) _O32_SetLastError(ERROR_ACCESS_DENIED_W); 774 else 775 if ( rc==ERROR_MORE_DATA ) _O32_SetLastError(ERROR_MORE_DATA_W); 776 else 777 if ( rc==ERROR_PIPE_BUSY ) _O32_SetLastError(ERROR_PIPE_BUSY_W); 778 else 779 if ( rc==ERROR_BAD_FORMAT ) _O32_SetLastError(ERROR_BAD_FORMAT_W); 780 else 781 if ( rc==ERROR_BROKEN_PIPE ) _O32_SetLastError(ERROR_BROKEN_PIPE_W); 782 else 783 if ( rc==ERROR_BAD_PIPE ) _O32_SetLastError(ERROR_BAD_PIPE_W); 784 else 785 if ( rc==ERROR_PIPE_NOT_CONNECTED ) _O32_SetLastError(ERROR_PIPE_NOT_CONNECTED_W); 786 786 else 787 787 // Unknown error 788 SetLastError(ERROR_PIPE_NOT_CONNECTED_W);788 _O32_SetLastError(ERROR_PIPE_NOT_CONNECTED_W); 789 789 790 790 return (FALSE); … … 815 815 } 816 816 else 817 if ( rc==ERROR_ACCESS_DENIED ) SetLastError(ERROR_ACCESS_DENIED_W);818 else 819 if ( rc==ERROR_PIPE_BUSY ) SetLastError(ERROR_PIPE_BUSY_W);820 else 821 if ( rc==ERROR_BAD_PIPE ) SetLastError(ERROR_BAD_PIPE_W);822 else 823 if ( rc==ERROR_PIPE_NOT_CONNECTED ) SetLastError(ERROR_PIPE_NOT_CONNECTED_W);817 if ( rc==ERROR_ACCESS_DENIED ) _O32_SetLastError(ERROR_ACCESS_DENIED_W); 818 else 819 if ( rc==ERROR_PIPE_BUSY ) _O32_SetLastError(ERROR_PIPE_BUSY_W); 820 else 821 if ( rc==ERROR_BAD_PIPE ) _O32_SetLastError(ERROR_BAD_PIPE_W); 822 else 823 if ( rc==ERROR_PIPE_NOT_CONNECTED ) _O32_SetLastError(ERROR_PIPE_NOT_CONNECTED_W); 824 824 else 825 825 // Unknown error 826 SetLastError(ERROR_PIPE_NOT_CONNECTED_W);826 _O32_SetLastError(ERROR_PIPE_NOT_CONNECTED_W); 827 827 828 828 return (FALSE); … … 840 840 if (!rc) return TRUE; 841 841 else 842 if ( rc==ERROR_BROKEN_PIPE ) SetLastError(ERROR_BROKEN_PIPE_W);843 else 844 if ( rc==ERROR_BAD_PIPE ) SetLastError(ERROR_BAD_PIPE_W);842 if ( rc==ERROR_BROKEN_PIPE ) _O32_SetLastError(ERROR_BROKEN_PIPE_W); 843 else 844 if ( rc==ERROR_BAD_PIPE ) _O32_SetLastError(ERROR_BAD_PIPE_W); 845 845 else 846 846 // Unknown error 847 SetLastError(ERROR_PIPE_NOT_CONNECTED_W); // Maybe another?847 _O32_SetLastError(ERROR_PIPE_NOT_CONNECTED_W); // Maybe another? 848 848 849 849 return (FALSE); … … 873 873 if (!rc) return TRUE; 874 874 else 875 if ( rc == ERROR_PATH_NOT_FOUND ) SetLastError(ERROR_PATH_NOT_FOUND_W);876 else 877 if ( rc==ERROR_BAD_PIPE ) SetLastError(ERROR_BAD_PIPE_W);878 else 879 if ( rc == ERROR_PIPE_BUSY ) SetLastError(ERROR_PIPE_BUSY_W);880 else 881 if ( rc == ERROR_SEM_TIMEOUT_W ) SetLastError(ERROR_SEM_TIMEOUT_W);875 if ( rc == ERROR_PATH_NOT_FOUND ) _O32_SetLastError(ERROR_PATH_NOT_FOUND_W); 876 else 877 if ( rc==ERROR_BAD_PIPE ) _O32_SetLastError(ERROR_BAD_PIPE_W); 878 else 879 if ( rc == ERROR_PIPE_BUSY ) _O32_SetLastError(ERROR_PIPE_BUSY_W); 880 else 881 if ( rc == ERROR_SEM_TIMEOUT_W ) _O32_SetLastError(ERROR_SEM_TIMEOUT_W); 882 882 else 883 883 // TODO: Implemnt this using Windows Errors 884 884 // if (rc==ERROR_INTERRUPT) 885 SetLastError(ERROR_PIPE_NOT_CONNECTED_W);885 _O32_SetLastError(ERROR_PIPE_NOT_CONNECTED_W); 886 886 887 887 return (FALSE);
Note:
See TracChangeset
for help on using the changeset viewer.