Changeset 129 for trunk/include/helpers
- Timestamp:
- Jan 8, 2002, 7:29:57 PM (24 years ago)
- Location:
- trunk/include/helpers
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/helpers/dosh.h
r127 r129 360 360 HFILE hf; 361 361 ULONG hmtx; // a HMTX really 362 ULONG flOpenMode; // as given to doshOpen 362 363 PSZ pszFilename; // as given to doshOpen 364 ULONG flOpenMode; // as given to doshOpen 365 363 366 ULONG cbInitial, // intial file size on open (can be 0 if new) 364 367 cbCurrent; // current file size (raised with each write) 368 369 PBYTE pbCache; // if != NULL, cached data from doshReadAt 370 ULONG cbCache, // size of data in cbCache 371 ulReadFrom; // file offset where pbCache was read from 365 372 } XFILE, *PXFILE; 366 373 … … 399 406 400 407 APIRET doshLoadTextFile(PCSZ pcszFile, 401 PSZ* ppszContent); 408 PSZ* ppszContent, 409 PULONG pcbRead); 402 410 403 411 PSZ doshCreateBackupFileName(const char* pszExisting); … … 463 471 PUSHORT pusReturn); 464 472 465 /********************************************************************466 *467 * Executable helpers468 *469 ********************************************************************/470 471 #pragma pack(1)472 473 /*474 *@@ DOSEXEHEADER:475 * old DOS EXE header at offset 0476 * in any EXE file.477 *478 *@@changed V0.9.7 (2000-12-20) [umoeller]: fixed NE offset479 *@@changed V0.9.9 (2001-04-06) [lafaix]: additional fields defined480 */481 482 typedef struct _DOSEXEHEADER483 {484 USHORT usDosExeID; // 00: DOS exeid (0x5a4d)485 USHORT usFileLenMod512; // 02: filelen mod 512486 USHORT usFileLenDiv512; // 04: filelen div 512487 USHORT usSegFix; // 06: count of segment adds to fix488 USHORT usHdrPargCnt; // 08: size of header in paragrphs489 USHORT usMinAddPargCnt; // 0a: minimum addtl paragraphs count490 USHORT usMaxAddPargCnt; // 0c: max addtl paragraphs count491 USHORT usSSStartup; // 0e: SS at startup492 USHORT usSPStartup; // 10: SP at startup493 USHORT usHdrChecksum; // 12: header checksum494 USHORT usIPStartup; // 14: IP at startup495 USHORT usCodeSegOfs; // 16: code segment offset from EXE start496 USHORT usRelocTableOfs; // 18: reloc table ofs.header (Win: >= 0x40)497 USHORT usOverlayNo; // 1a: overlay no.498 USHORT usLinkerVersion; // 1c: linker version (if 0x18 > 0x28)499 USHORT usUnused1; // 1e: unused500 USHORT usBehaviorBits; // 20: exe.h says this field contains501 // 'behavior bits'502 USHORT usUnused2; // 22: unused503 USHORT usOEMIdentifier; // 24: OEM identifier504 USHORT usOEMInformation; // 26: OEM information505 ULONG ulUnused3; // 28:506 ULONG ulUnused4; // 2c:507 ULONG ulUnused5; // 30:508 ULONG ulUnused6; // 34:509 ULONG ulUnused7; // 38:510 ULONG ulNewHeaderOfs; // 3c: new header ofs (if 0x18 > 0x40)511 // fixed this from USHORT, thanks Martin Lafaix512 // V0.9.7 (2000-12-20) [umoeller]513 } DOSEXEHEADER, *PDOSEXEHEADER;514 515 // NE and LX OS types516 #define NEOS_UNKNOWN 0517 #define NEOS_OS2 1 // Win16 SDK says: "reserved"...518 #define NEOS_WIN16 2519 #define NEOS_DOS4 3 // Win16 SDK says: "reserved"...520 #define NEOS_WIN386 4 // Win16 SDK says: "reserved"...521 522 /*523 *@@ NEHEADER:524 * linear executable (LX) header format,525 * which comes after the DOS header in the526 * EXE file (at DOSEXEHEADER.ulNewHeaderOfs).527 *528 *@@changed V0.9.9 (2001-04-06) [lafaix]: fixed typo in usMoveableEntries529 */530 531 typedef struct _NEHEADER532 {533 CHAR achNE[2]; // 00: "NE" magic ne_magic534 BYTE bLinkerVersion; // 02: linker version ne_ver535 BYTE bLinkerRevision; // 03: linker revision ne_rev536 USHORT usEntryTblOfs; // 04: ofs from this to entrytable ne_enttab537 USHORT usEntryTblLen; // 06: length of entrytable ne_cbenttab538 ULONG ulChecksum; // 08: MS: reserved, OS/2: checksum ne_crc539 USHORT usFlags; // 0c: flags ne_flags540 /*541 #define NENOTP 0x8000 // Not a process == library542 #define NENOTMPSAFE 0x4000 // Process is not multi-processor safe543 // (Win3.1 SDK: "reserved")544 #define NEIERR 0x2000 // Errors in image545 #define NEBOUND 0x0800 // Bound Family/API546 // (Win3.1 SDK: "first segment contains code547 // that loads the application")548 #define NEAPPTYP 0x0700 // Application type mask549 // (Win3.1 SDK: "reserved")550 #define NENOTWINCOMPAT 0x0100 // Not compatible with P.M. Windowing551 // (Win3.1 SDK: "reserved")552 #define NEWINCOMPAT 0x0200 // Compatible with P.M. Windowing553 // (Win3.1 SDK: "reserved")554 #define NEWINAPI 0x0300 // Uses P.M. Windowing API555 // (Win3.1 SDK: "reserved")556 #define NEFLTP 0x0080 // Floating-point instructions557 #define NEI386 0x0040 // 386 instructions558 #define NEI286 0x0020 // 286 instructions559 #define NEI086 0x0010 // 8086 instructions560 #define NEPROT 0x0008 // Runs in protected mode only561 // (Win3.1 SDK: "reserved")562 #define NEPPLI 0x0004 // Per-Process Library Initialization563 // (Win3.1 SDK: "reserved")564 #define NEINST 0x0002 // Instance data565 #define NESOLO 0x0001 // Solo data (single data)566 */567 USHORT usAutoDataSegNo; // 0e: auto-data seg no. ne_autodata568 // (Win3.1 SDK: "0 if both NEINST and NESOLO are cleared")569 USHORT usInitlHeapSize; // 10: initl. heap size ne_heap570 // (Win3.1 SDK: "0 if no local allocation")571 USHORT usInitlStackSize; // 12: initl. stack size ne_stack572 // (Win3.1 SDK: "0 if SS != DS")573 ULONG ulCSIP; // 14: CS:IP ne_csip574 ULONG ulSSSP; // 18: SS:SP ne_sssp575 USHORT usSegTblEntries; // 1c: segment tbl entry count ne_cseg576 USHORT usModuleTblEntries; // 1e: module ref. table entry count ne_cmod577 USHORT usNonResdTblLen; // 20: non-resd. name tbl length ne_cbnrestab578 USHORT usSegTblOfs; // 22: segment tbl ofs ne_segtab579 // (from start of NEHEADER)580 USHORT usResTblOfs; // 24: resource tbl ofs ne_rsrctab581 // (from start of NEHEADER)582 USHORT usResdNameTblOfs; // 26: resd. name tbl ofs ne_restab583 // (from start of NEHEADER)584 USHORT usModRefTblOfs; // 28: module ref. table ofs ne_modtab585 // (from start of NEHEADER)586 USHORT usImportTblOfs; // 2a: import name tbl ofs ne_imptab587 // (from start of NEHEADER)588 ULONG ulNonResdTblOfs; // 2c: non-resd. name tbl ofs ne_nrestab589 // (from start of EXE!)590 USHORT usMoveableEntries; // 30: moveable entry points count ne_cmovent591 USHORT usLogicalSectShift; // 32: logcl. sector shift ne_align592 // (Win3.1 SDK: "typically 4, but default is 9")593 USHORT usResSegmCount; // 34: resource segm. count ne_cres594 BYTE bTargetOS; // 36: target OS (NEOS_* flags) ne_exetyp595 BYTE bFlags2; // 37: addtl. flags ne_flagsothers596 // Win3.1 SDK:597 // bit 1 --> Win2.x, but runs in Win3.x protected mode598 // bit 2 --> Win2.x that supports prop. fonts599 // bit 3 --> exec contains fastload area600 /*601 #define NELONGNAMES 0x01602 #define NEWINISPROT 0x02603 #define NEWINGETPROPFON 0x04604 #define NEWLOAPPL 0x80605 */606 // the following are not listed in newexe.h, but are documented for Win3.x607 USHORT usFastLoadOfs; // 38: fast-load area ofs608 USHORT usFastLoadLen; // 3a: fast-load area length609 USHORT usReserved; // 3c: MS: 'reserved'610 USHORT usReqWinVersion; // 3e: Win-only: min. Win version611 } NEHEADER, *PNEHEADER;612 613 /*614 *@@ LXHEADER:615 * linear executable (LX) header format,616 * which comes after the DOS header in the617 * EXE file (at DOSEXEHEADER.ulNewHeaderOfs).618 *619 *@@changed V0.9.9 (2001-04-06) [lafaix]: fixed auto data object and ulinstanceDemdCnt620 */621 622 typedef struct _LXHEADER623 {624 CHAR achLX[2]; // 00: "LX" or "LE" magic625 // this is "LX" for 32-bit OS/2 programs, but626 // "LE" for MS-DOS progs which use this format627 // (e.g. WINDOWS\SMARTDRV.EXE). IBM says the628 // LE format was never released and superceded629 // by LX... I am unsure what the differences are.630 BYTE fByteBigEndian; // 02: byte ordering (1 = big endian)631 BYTE fWordBigEndian; // 03: word ordering (1 = big endian)632 ULONG ulFormatLevel; // 04: format level633 USHORT usCPU; // 08: CPU type634 USHORT usTargetOS; // 0a: OS type (NEOS_* flags)635 ULONG ulModuleVersion; // 0c: module version636 ULONG ulFlags; // 10: module flags637 /* #define E32NOTP 0x8000L // Library Module - used as NENOTP638 #define E32NOLOAD 0x2000L // Module not Loadable639 #define E32PMAPI 0x0300L // Uses PM Windowing API640 #define E32PMW 0x0200L // Compatible with PM Windowing641 #define E32NOPMW 0x0100L // Incompatible with PM Windowing642 #define E32NOEXTFIX 0x0020L // NO External Fixups in .EXE643 #define E32NOINTFIX 0x0010L // NO Internal Fixups in .EXE644 #define E32SYSDLL 0x0008L // System DLL, Internal Fixups discarded645 #define E32LIBINIT 0x0004L // Per-Process Library Initialization646 #define E32LIBTERM 0x40000000L // Per-Process Library Termination647 #define E32APPMASK 0x0300L // Application Type Mask648 */649 ULONG ulPageCount; // 14: no. of pages in module650 ULONG ulEIPRelObj; // 18: object to which EIP is relative651 ULONG ulEIPEntryAddr; // 1c: EIP entry addr652 ULONG ulESPObj; // 20: ESP object653 ULONG ulESP; // 24: ESP654 ULONG ulPageSize; // 28: page size (4K)655 ULONG ulPageLeftShift; // 2c: page left-shift656 ULONG ulFixupTblLen; // 30: fixup section total size657 ULONG ulFixupTblChecksum; // 34: fixup section checksum658 ULONG ulLoaderLen; // 38: size req. for loader section659 ULONG ulLoaderChecksum; // 3c: loader section checksum660 ULONG ulObjTblOfs; // 40: object table offset661 ULONG ulObjCount; // 44: object count662 ULONG ulObjPageTblOfs; // 48: object page table ofs663 ULONG ulObjIterPagesOfs; // 4c: object iter pages ofs664 ULONG ulResTblOfs; // 50: resource table ofs665 ULONG ulResTblCnt; // 54: resource entry count666 ULONG ulResdNameTblOfs; // 58: resident name tbl ofs667 ULONG ulEntryTblOfs; // 5c: entry tbl ofs668 ULONG ulModDirectivesOfs; // 60: module directives ofs669 ULONG ulModDirectivesCnt; // 64: module directives count670 ULONG ulFixupPagePageTblOfs;// 68: fixup page tbl ofs671 ULONG ulFixupRecTblOfs; // 6c: fixup record tbl ofs672 ULONG ulImportModTblOfs; // 70: import modl tbl ofs673 ULONG ulImportModTblCnt; // 74: import modl tbl count674 ULONG ulImportProcTblOfs; // 78: import proc tbl ofs675 ULONG ulPerPageCSOfs; // 7c: per page checksum ofs676 ULONG ulDataPagesOfs; // 80: data pages ofs677 ULONG ulPreloadPagesCnt; // 84: preload pages count678 ULONG ulNonResdNameTblOfs; // 88: non-resdnt name tbl ofs679 ULONG ulNonResdNameTblLen; // 8c: non-resdnt name tbl length680 ULONG ulNonResdNameTblCS; // 90: non-res name tbl checksum681 ULONG ulAutoDataSegObj; // 94: auto dataseg object682 ULONG ulDebugOfs; // 98: debug info ofs683 ULONG ulDebugLen; // 9c: debug info length684 ULONG ulInstancePrelCnt; // a0: instance preload count685 ULONG ulInstanceDemdCnt; // a0: instance demand count686 ULONG ulHeapSize16; // a8: heap size (16-bit)687 ULONG ulStackSize; // ac: stack size688 } LXHEADER, *PLXHEADER;689 690 /*691 *@@ PEHEADER:692 * portable executable (PE) header format,693 * which comes after the DOS header in the694 * EXE file (at DOSEXEHEADER.ulNewHeaderOfs).695 *696 *@@added V0.9.10 (2001-04-08) [lafaix]697 */698 699 typedef struct _PEHEADER700 {701 // standard header702 ULONG ulSignature; // 00: 'P', 'E', 0, 0703 USHORT usCPU; // 04: CPU type704 USHORT usObjCount; // 06: number of object entries705 ULONG ulTimeDateStamp; // 08: store the time and date the706 // file was created or modified707 // by the linker708 ULONG ulReserved1; // 0c: reserved709 ULONG ulReserved2; // 10: reserved710 USHORT usHeaderSize; // 14: number of remaining bytes after711 // usImageFlags712 USHORT usImageFlags; // 16: flags bits for the image713 714 // optional header (always present in valid Win32 files)715 USHORT usReserved3; // 18: reserved716 USHORT usLinkerMajor; // 1a: linker major version number717 USHORT usLinkerMinor; // 1c: linker minor version number718 USHORT usReserved4; // 1e: reserved719 ULONG ulReserved5; // 20: reserved720 ULONG ulReserved6; // 24: reserved721 ULONG ulEntryPointRVA; // 28: entry point relative virtual address722 ULONG ulReserved7; // 2c: reserved723 ULONG ulReserved8; // 30: reserved724 ULONG ulImageBase; // 34:725 ULONG ulObjectAlign; // 38:726 ULONG ulFileAlign; // 3c:727 USHORT usOSMajor; // 40:728 USHORT usOSMinor; // 42:729 USHORT usUserMajor; // 44:730 USHORT usUserMinor; // 46:731 USHORT usSubSystemMajor; // 48:732 USHORT usSubSystemMinor; // 4a:733 ULONG ulReserved9; // 4c: reserved734 ULONG ulImageSize; // 50:735 ULONG ulHeaderSize; // 54:736 ULONG ulFileChecksum; // 58:737 USHORT usSubSystem; // 5c:738 USHORT usDLLFlags; // 5e:739 ULONG ulStackReserveSize; // 60:740 ULONG ulStackCommitSize; // 64:741 ULONG ulHeapReserveSize; // 68:742 ULONG ulHeapCommitSize; // 6c:743 ULONG ulReserved10; // 70: reserved744 ULONG ulInterestingRVACount;// 74:745 ULONG aulRVASize[1]; // 78: array of RVA/Size entries746 } PEHEADER, *PPEHEADER;747 748 // additional LX structures749 750 /*751 *@@ RESOURCETABLEENTRY:752 * LX resource table entry.753 *754 *@@added V0.9.16 (2001-12-08) [umoeller]755 */756 757 typedef struct _RESOURCETABLEENTRY // rsrc32758 {759 unsigned short type; // Resource type760 unsigned short name; // Resource name761 unsigned long cb; // Resource size762 unsigned short obj; // Object number763 unsigned long offset; // Offset within object764 } RESOURCETABLEENTRY;765 766 /*767 *@@ OBJECTTABLEENTRY:768 * LX object table entry.769 *770 *@@added V0.9.16 (2001-12-08) [umoeller]771 */772 773 typedef struct _OBJECTTABLEENTRY // o32_obj774 {775 unsigned long o32_size; // Object virtual size776 unsigned long o32_base; // Object base virtual address777 unsigned long o32_flags; // Attribute flags778 unsigned long o32_pagemap; // Object page map index779 unsigned long o32_mapsize; // Number of entries in object page map780 unsigned long o32_reserved; // Reserved781 } OBJECTTABLEENTRY;782 783 /*784 *@@ OBJECTPAGETABLEENTRY:785 * LX object _page_ table entry, sometimes786 * referred to as map entry.787 *788 *@@added V0.9.16 (2001-12-08) [umoeller]789 */790 791 typedef struct _OBJECTPAGETABLEENTRY // o32_map792 {793 unsigned long o32_pagedataoffset; // file offset of page794 unsigned short o32_pagesize; // # of real bytes of page data795 unsigned short o32_pageflags; // Per-Page attributes796 } OBJECTPAGETABLEENTRY;797 798 /*799 *@@ LXITER:800 * iteration Record format for 'EXEPACK'ed pages.801 *802 *@@added V0.9.16 (2001-12-08) [umoeller]803 */804 805 typedef struct _LXITER806 {807 unsigned short LX_nIter; // number of iterations808 unsigned short LX_nBytes; // number of bytes809 unsigned char LX_Iterdata; // iterated data byte(s)810 } LXITER, *PLXITER;811 812 /*813 *@@ OS2NERESTBLENTRY:814 * OS/2 NE resource table entry.815 *816 *@@added V0.9.16 (2001-12-08) [umoeller]817 */818 819 typedef struct _OS2NERESTBLENTRY820 {821 USHORT usType;822 USHORT usID;823 } OS2NERESTBLENTRY, *POS2NERESTBLENTRY;824 825 /*826 *@@ OS2NESEGMENT:827 * OS/2 NE segment definition.828 *829 *@@added V0.9.16 (2001-12-08) [umoeller]830 */831 832 typedef struct _OS2NESEGMENT // New .EXE segment table entry833 {834 unsigned short ns_sector; // File sector of start of segment835 unsigned short ns_cbseg; // Number of bytes in file836 unsigned short ns_flags; // Attribute flags837 unsigned short ns_minalloc; // Minimum allocation in bytes838 } OS2NESEGMENT, *POS2NESEGMENT;839 840 #pragma pack()841 842 // object/segment flags (in NE and LX)843 #define OBJWRITE 0x0002L // Writeable Object844 #define OBJDISCARD 0x0010L // Object is Discardable845 #define OBJSHARED 0x0020L // Object is Shared846 #define OBJPRELOAD 0x0040L // Object has preload pages847 848 // resource flags849 #define RNMOVE 0x0010 // Moveable resource850 #define RNPURE 0x0020 // Pure (read-only) resource851 #define RNPRELOAD 0x0040 // Preloaded resource852 #define RNDISCARD 0xF000 // Discard priority level for resource853 854 // EXE format855 #define EXEFORMAT_OLDDOS 1856 #define EXEFORMAT_NE 2857 #define EXEFORMAT_PE 3858 #define EXEFORMAT_LX 4859 #define EXEFORMAT_TEXT_BATCH 5860 #define EXEFORMAT_TEXT_CMD 6 // REXX or plain OS/2 batch861 #define EXEFORMAT_COM 7 // added V0.9.16 (2002-01-04) [umoeller]862 863 // target OS (in NE and LX)864 #define EXEOS_DOS3 1865 #define EXEOS_DOS4 2 // there is a flag for this in NE866 #define EXEOS_OS2 3867 #define EXEOS_WIN16 4868 #define EXEOS_WIN386 5 // according to IBM, there are flags869 // for this both in NE and LX870 #define EXEOS_WIN32 6871 872 #ifndef __STRIP_DOWN_EXECUTABLE__873 // for mini stubs in warpin, which has its own874 // implementation of this875 876 /*877 *@@ EXECUTABLE:878 * structure used with all the doshExec*879 * functions.880 */881 882 typedef struct _EXECUTABLE883 {884 // executable opened by doshOpen885 PXFILE pFile;886 887 /* All the following fields are set by888 doshExecOpen if NO_ERROR is returned. */889 890 // old DOS EXE header;891 // note: before 0.9.12, this was ALWAYS valid,892 // but since we support NOSTUB executables now,893 // there may be situations where this is NULL,894 // but the other fields are valid! V0.9.12 (2001-05-03) [umoeller]895 PDOSEXEHEADER pDosExeHeader;896 ULONG cbDosExeHeader;897 898 // New Executable (NE) header, if ulExeFormat == EXEFORMAT_NE899 PNEHEADER pNEHeader;900 ULONG cbNEHeader;901 902 // Linear Executable (LX) header, if ulExeFormat == EXEFORMAT_LX903 PLXHEADER pLXHeader;904 ULONG cbLXHeader;905 906 // Portable Executable (PE) header, if ulExeFormat == EXEFORMAT_PE907 PPEHEADER pPEHeader;908 ULONG cbPEHeader;909 910 // module analysis (always set):911 ULONG ulExeFormat;912 // one of:913 // EXEFORMAT_OLDDOS 1914 // EXEFORMAT_NE 2915 // EXEFORMAT_PE 3916 // EXEFORMAT_LX 4917 // EXEFORMAT_TEXT_BATCH 5918 // EXEFORMAT_TEXT_CMD 6919 // EXEFORMAT_COM 7920 921 BOOL fLibrary, // TRUE if this is a DLL922 f32Bits; // TRUE if this a 32-bits module923 924 ULONG ulOS;925 // target operating system as flagged in one of926 // the EXE headers; one of:927 // EXEOS_DOS3 1928 // EXEOS_DOS4 2 // there is a flag for this in NE929 // EXEOS_OS2 3930 // EXEOS_WIN16 4931 // EXEOS_WIN386 5 // according to IBM, there are flags932 // for this both in NE and LX933 // EXEOS_WIN32 6934 935 /* The following fields are only set after936 an extra call to doshExecQueryBldLevel. */937 938 PSZ pszDescription;939 // whole string (first non-res name tbl entry)940 PSZ pszVendor;941 // vendor substring (if IBM BLDLEVEL format)942 PSZ pszVersion;943 // version substring (if IBM BLDLEVEL format)944 945 PSZ pszInfo;946 // module info substring (if IBM BLDLEVEL format)947 948 // if pszInfo is extended DESCRIPTION field, the following949 // are set as well:950 PSZ pszBuildDateTime,951 pszBuildMachine,952 pszASD,953 pszLanguage,954 pszCountry,955 pszRevision,956 pszUnknown,957 pszFixpak;958 959 // the following fields are set after doshLoadLXMaps960 BOOL fLXMapsLoaded; // TRUE after doshLoadLXMaps961 RESOURCETABLEENTRY *pRsTbl; // pLXHeader->ulResTblCnt962 OBJECTTABLEENTRY *pObjTbl; // pLXHeader->ulObjCount963 OBJECTPAGETABLEENTRY *pObjPageTbl; // pLXHeader->ulPageCount964 965 // the following fields are set after doshLoadOS2NEMaps966 BOOL fOS2NEMapsLoaded;967 POS2NERESTBLENTRY paOS2NEResTblEntry;968 POS2NESEGMENT paOS2NESegments;969 } EXECUTABLE, *PEXECUTABLE;970 971 APIRET doshExecOpen(const char* pcszExecutable,972 PEXECUTABLE* ppExec);973 974 APIRET doshExecQueryBldLevel(PEXECUTABLE pExec);975 976 /*977 *@@ FSYSMODULE:978 *979 *@@added V0.9.9 (2001-03-11) [lafaix]980 */981 982 typedef struct _FSYSMODULE983 {984 CHAR achModuleName[256];985 } FSYSMODULE, *PFSYSMODULE;986 987 APIRET doshExecQueryImportedModules(PEXECUTABLE pExec,988 PFSYSMODULE *ppaModules,989 PULONG pcModules);990 991 APIRET doshExecFreeImportedModules(PFSYSMODULE paModules);992 993 /*994 *@@ FSYSFUNCTION:995 *996 *@@added V0.9.9 (2001-03-11) [lafaix]997 */998 999 typedef struct _FSYSFUNCTION1000 {1001 ULONG ulOrdinal;1002 ULONG ulType;1003 CHAR achFunctionName[256];1004 } FSYSFUNCTION, *PFSYSFUNCTION;1005 1006 APIRET doshExecQueryExportedFunctions(PEXECUTABLE pExec,1007 PFSYSFUNCTION *ppaFunctions,1008 PULONG pcFunctions);1009 1010 APIRET doshExecFreeExportedFunctions(PFSYSFUNCTION paFunctions);1011 1012 #define WINRT_ACCELERATOR 91013 #define WINRT_BITMAP 21014 #define WINRT_CURSOR 11015 #define WINRT_DIALOG 51016 #define WINRT_FONT 81017 #define WINRT_FONTDIR 71018 #define WINRT_ICON 31019 #define WINRT_MENU 41020 #define WINRT_RCDATA 101021 #define WINRT_STRING 61022 1023 /*1024 *@@ FSYSRESOURCE:1025 *1026 *@@added V0.9.7 (2000-12-18) [lafaix]1027 */1028 1029 typedef struct _FSYSRESOURCE1030 {1031 ULONG ulID; // resource ID1032 ULONG ulType; // resource type1033 ULONG ulSize; // resource size in bytes1034 ULONG ulFlag; // resource flags1035 1036 } FSYSRESOURCE, *PFSYSRESOURCE;1037 1038 APIRET doshExecQueryResources(PEXECUTABLE pExec,1039 PFSYSRESOURCE *ppaResources,1040 PULONG pcResources);1041 1042 APIRET doshExecFreeResources(PFSYSRESOURCE paResources);1043 1044 APIRET doshLoadLXMaps(PEXECUTABLE pExec);1045 1046 VOID doshFreeLXMaps(PEXECUTABLE pExec);1047 1048 APIRET doshLoadOS2NEMaps(PEXECUTABLE pExec);1049 1050 VOID doshFreeNEMaps(PEXECUTABLE pExec);1051 1052 APIRET doshExecClose(PEXECUTABLE *ppExec);1053 1054 473 APIRET doshSearchPath(PCSZ pcszPath, 1055 474 PCSZ pcszFile, … … 1062 481 PCSZ *papcszExtensions, 1063 482 ULONG cExtensions); 1064 #endif1065 483 1066 484 /******************************************************************** -
trunk/include/helpers/standards.h
r123 r129 106 106 #define ARRAYITEMCOUNT(array) sizeof(array) / sizeof(array[0]) 107 107 108 /* 109 *@@ STRINGORNULL: 110 * helpful macro to avoid passing null strings 111 * to debugging printf calls. 112 * 113 *@@added V0.9.16 (2002-01-05) [umoeller] 114 */ 115 116 #define STRINGORNULL(s) (s) ? (s) : "NULL" 117 108 118 #endif 109 119 -
trunk/include/helpers/xstring.h
r113 r129 91 91 typedef XSTRINITSET *PXSTRINITSET; 92 92 93 void XWPENTRY xstrInitCopy(PXSTRING pxstr, const char *pcszSource, ULONG ulExtraAllocate); 94 typedef void XWPENTRY XSTRINITCOPY(PXSTRING pxstr, const char *pcszSource, ULONG ulExtraAllocate); 95 typedef XSTRINITCOPY *PXSTRINITCOPY; 93 #if defined(__DEBUG_MALLOC_ENABLED__) && !defined(DONT_REPLACE_XSTR_MALLOC) // setup.h, helpers\memdebug.c 94 #define xstrInitCopy(a, b, c) xstrInitCopyDebug((a), (b), (c), __FILE__, __LINE__, __FUNCTION__) 95 void XWPENTRY xstrInitCopyDebug(PXSTRING pxstr, 96 const char *pcszSource, 97 ULONG ulExtraAllocate, 98 const char *file, 99 unsigned long line, 100 const char *function); 101 typedef void XWPENTRY XSTRINITCOPYDEBUG(PXSTRING pxstr, 102 const char *pcszSource, 103 ULONG ulExtraAllocate, 104 const char *file, 105 unsigned long line, 106 const char *function); 107 typedef XSTRINITCOPYDEBUG *PXSTRINITCOPYDEBUG; 108 #else 109 void XWPENTRY xstrInitCopy(PXSTRING pxstr, const char *pcszSource, ULONG ulExtraAllocate); 110 typedef void XWPENTRY XSTRINITCOPY(PXSTRING pxstr, const char *pcszSource, ULONG ulExtraAllocate); 111 typedef XSTRINITCOPY *PXSTRINITCOPY; 112 #endif 96 113 97 114 void XWPENTRY xstrClear(PXSTRING pxstr);
Note:
See TracChangeset
for help on using the changeset viewer.