Changeset 2984 for trunk/src/kernel32/oslibdos.cpp
- Timestamp:
- Mar 3, 2000, 12:16:00 PM (25 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kernel32/oslibdos.cpp
r2866 r2984 1 /* $Id: oslibdos.cpp,v 1.2 0 2000-02-23 01:06:58 sandervl Exp $ */1 /* $Id: oslibdos.cpp,v 1.21 2000-03-03 11:15:58 sandervl Exp $ */ 2 2 /* 3 3 * Wrappers for OS/2 Dos* API … … 20 20 #include <stdio.h> 21 21 #include <string.h> 22 #include <win32 type.h>22 #include <win32api.h> 23 23 #include <winconst.h> 24 24 #include <misc.h> … … 29 29 #define DBG_LOCALLOG DBG_oslibdos 30 30 #include "dbglocal.h" 31 32 /***********************************33 * PH: fixups for missing os2win.h *34 ***********************************/35 36 void _System _O32_SetLastError(ULONG ulError);37 38 APIRET APIENTRY DosAliasMem(PVOID pb, ULONG cb, PPVOID ppbAlias, ULONG fl);39 31 40 32 //****************************************************************************** … … 621 613 if (nMaxInstances>0xff) 622 614 { 623 _O32_SetLastError(87); // ERROR_INVALID_PARAMETER615 SetLastError(ERROR_INVALID_PARAMETER_W); // ERROR_INVALID_PARAMETER 624 616 return -1; // INVALID_HANDLE_VALUE 625 617 } … … 648 640 if (rc) 649 641 { 650 if ( rc == ERROR_PIPE_BUSY ) _O32_SetLastError(ERROR_PIPE_BUSY_W);642 if ( rc == ERROR_PIPE_BUSY ) SetLastError(ERROR_PIPE_BUSY_W); 651 643 else 652 if ( rc == ERROR_PATH_NOT_FOUND ) _O32_SetLastError(ERROR_PATH_NOT_FOUND_W);644 if ( rc == ERROR_PATH_NOT_FOUND ) SetLastError(ERROR_PATH_NOT_FOUND_W); 653 645 else 654 if ( rc == ERROR_NOT_ENOUGH_MEMORY ) _O32_SetLastError(ERROR_NOT_ENOUGH_MEMORY_W);646 if ( rc == ERROR_NOT_ENOUGH_MEMORY ) SetLastError(ERROR_NOT_ENOUGH_MEMORY_W); 655 647 else 656 if ( rc == ERROR_INVALID_PARAMETER ) _O32_SetLastError(ERROR_INVALID_PARAMETER_W);648 if ( rc == ERROR_INVALID_PARAMETER ) SetLastError(ERROR_INVALID_PARAMETER_W); 657 649 else 658 if ( rc == ERROR_OUT_OF_STRUCTURES ) _O32_SetLastError(ERROR_OUT_OF_STRUCTURES_W);650 if ( rc == ERROR_OUT_OF_STRUCTURES ) SetLastError(ERROR_OUT_OF_STRUCTURES_W); 659 651 else 660 652 // Unknown error 661 _O32_SetLastError(ERROR_INVALID_PARAMETER_W); // fixme!653 SetLastError(ERROR_INVALID_PARAMETER_W); // fixme! 662 654 return -1; // INVALID_HANDLE_VALUE 663 655 } … … 677 669 if (!rc) return (TRUE); 678 670 else 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);671 if (rc==ERROR_BROKEN_PIPE) SetLastError(ERROR_BROKEN_PIPE_W); 672 else 673 if (rc==ERROR_BAD_PIPE) SetLastError(ERROR_BAD_PIPE_W); 674 else 675 if (rc==ERROR_PIPE_NOT_CONNECTED) SetLastError(ERROR_PIPE_NOT_CONNECTED_W); 684 676 else 685 677 // TODO: Implemnt this using Windows Errors 686 678 // if (rc==ERROR_INTERRUPT) 687 _O32_SetLastError(ERROR_PIPE_NOT_CONNECTED_W);679 SetLastError(ERROR_PIPE_NOT_CONNECTED_W); 688 680 689 681 return (FALSE); … … 724 716 if (!rc) return (TRUE); 725 717 else 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);718 if ( rc==ERROR_FILE_NOT_FOUND ) SetLastError(ERROR_FILE_NOT_FOUND_W); 719 else 720 if ( rc==ERROR_PATH_NOT_FOUND ) SetLastError(ERROR_PATH_NOT_FOUND_W); 721 else 722 if ( rc==ERROR_ACCESS_DENIED ) SetLastError(ERROR_ACCESS_DENIED_W); 723 else 724 if ( rc==ERROR_MORE_DATA ) SetLastError(ERROR_MORE_DATA_W); 725 else 726 if ( rc==ERROR_PIPE_BUSY ) SetLastError(ERROR_PIPE_BUSY_W); 727 else 728 if ( rc==ERROR_BAD_FORMAT ) SetLastError(ERROR_BAD_FORMAT_W); 729 else 730 if ( rc==ERROR_BROKEN_PIPE ) SetLastError(ERROR_BROKEN_PIPE_W); 731 else 732 if ( rc==ERROR_BAD_PIPE ) SetLastError(ERROR_BAD_PIPE_W); 733 else 734 if ( rc==ERROR_PIPE_NOT_CONNECTED ) SetLastError(ERROR_PIPE_NOT_CONNECTED_W); 743 735 else 744 736 // TODO: Implemnt this using Windows Errors 745 737 // if (rc==ERROR_INTERRUPT) 746 _O32_SetLastError(233);738 SetLastError(ERROR_PIPE_NOT_CONNECTED_W); 747 739 748 740 return (FALSE); … … 771 763 if (!rc) return (TRUE); 772 764 else 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);765 if ( rc==ERROR_ACCESS_DENIED ) SetLastError(ERROR_ACCESS_DENIED_W); 766 else 767 if ( rc==ERROR_MORE_DATA ) SetLastError(ERROR_MORE_DATA_W); 768 else 769 if ( rc==ERROR_PIPE_BUSY ) SetLastError(ERROR_PIPE_BUSY_W); 770 else 771 if ( rc==ERROR_BAD_FORMAT ) SetLastError(ERROR_BAD_FORMAT_W); 772 else 773 if ( rc==ERROR_BROKEN_PIPE ) SetLastError(ERROR_BROKEN_PIPE_W); 774 else 775 if ( rc==ERROR_BAD_PIPE ) SetLastError(ERROR_BAD_PIPE_W); 776 else 777 if ( rc==ERROR_PIPE_NOT_CONNECTED ) SetLastError(ERROR_PIPE_NOT_CONNECTED_W); 786 778 else 787 779 // Unknown error 788 _O32_SetLastError(ERROR_PIPE_NOT_CONNECTED_W);780 SetLastError(ERROR_PIPE_NOT_CONNECTED_W); 789 781 790 782 return (FALSE); … … 815 807 } 816 808 else 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);809 if ( rc==ERROR_ACCESS_DENIED ) SetLastError(ERROR_ACCESS_DENIED_W); 810 else 811 if ( rc==ERROR_PIPE_BUSY ) SetLastError(ERROR_PIPE_BUSY_W); 812 else 813 if ( rc==ERROR_BAD_PIPE ) SetLastError(ERROR_BAD_PIPE_W); 814 else 815 if ( rc==ERROR_PIPE_NOT_CONNECTED ) SetLastError(ERROR_PIPE_NOT_CONNECTED_W); 824 816 else 825 817 // Unknown error 826 _O32_SetLastError(ERROR_PIPE_NOT_CONNECTED_W);818 SetLastError(ERROR_PIPE_NOT_CONNECTED_W); 827 819 828 820 return (FALSE); … … 840 832 if (!rc) return TRUE; 841 833 else 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);834 if ( rc==ERROR_BROKEN_PIPE ) SetLastError(ERROR_BROKEN_PIPE_W); 835 else 836 if ( rc==ERROR_BAD_PIPE ) SetLastError(ERROR_BAD_PIPE_W); 845 837 else 846 838 // Unknown error 847 _O32_SetLastError(ERROR_PIPE_NOT_CONNECTED_W); // Maybe another?839 SetLastError(ERROR_PIPE_NOT_CONNECTED_W); // Maybe another? 848 840 849 841 return (FALSE); … … 873 865 if (!rc) return TRUE; 874 866 else 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);867 if ( rc == ERROR_PATH_NOT_FOUND ) SetLastError(ERROR_PATH_NOT_FOUND_W); 868 else 869 if ( rc==ERROR_BAD_PIPE ) SetLastError(ERROR_BAD_PIPE_W); 870 else 871 if ( rc == ERROR_PIPE_BUSY ) SetLastError(ERROR_PIPE_BUSY_W); 872 else 873 if ( rc == ERROR_SEM_TIMEOUT_W ) SetLastError(ERROR_SEM_TIMEOUT_W); 882 874 else 883 875 // TODO: Implemnt this using Windows Errors 884 876 // if (rc==ERROR_INTERRUPT) 885 _O32_SetLastError(ERROR_PIPE_NOT_CONNECTED_W);877 SetLastError(ERROR_PIPE_NOT_CONNECTED_W); 886 878 887 879 return (FALSE);
Note:
See TracChangeset
for help on using the changeset viewer.