| 1 | /* $Id: os2newapi.h,v 1.3 2000-03-11 00:00:04 sandervl Exp $ */ | 
|---|
| 2 | /* | 
|---|
| 3 | * | 
|---|
| 4 | * Project Odin Software License can be found in LICENSE.TXT | 
|---|
| 5 | * | 
|---|
| 6 | */ | 
|---|
| 7 | #ifndef __OS2NEWAPI_H__ | 
|---|
| 8 | #define __OS2NEWAPI_H__ | 
|---|
| 9 |  | 
|---|
| 10 | #ifdef INCL_WIN | 
|---|
| 11 | #ifdef INCL_WINMESSAGEMGR | 
|---|
| 12 | BOOL APIENTRY WinThreadAssocQueue(HAB hab, HMQ hmq); | 
|---|
| 13 | BOOL APIENTRY WinWakeThread(HMQ hmq); | 
|---|
| 14 | BOOL APIENTRY WinReplyMsg(HAB hab, HMQ hmqSender, HMQ hmqReceiver, MRESULT mresult); | 
|---|
| 15 | HMQ  APIENTRY WinQueueFromID(HAB hab, PID pid, TID tid); | 
|---|
| 16 | BOOL APIENTRY WinQueryQueueInfo(HMQ hmq, PMQINFO pmqi, ULONG cbCopy); | 
|---|
| 17 | HMQ  APIENTRY WinQuerySendMsg(HAB hab, HMQ hmqSender, HMQ hmqReceiver, PQMSG pqmsg); | 
|---|
| 18 | BOOL APIENTRY WinLockInput(HMQ hmq, ULONG fLock); | 
|---|
| 19 | #endif | 
|---|
| 20 | #endif | 
|---|
| 21 |  | 
|---|
| 22 | #ifdef INCL_DOSSEL | 
|---|
| 23 | /* Segment attribute flags (used with DosAllocSeg) */ | 
|---|
| 24 |  | 
|---|
| 25 | #define SEG_NONSHARED       0x0000 | 
|---|
| 26 | #define SEG_GIVEABLE        0x0001 | 
|---|
| 27 | #define SEG_GETTABLE        0x0002 | 
|---|
| 28 | #define SEG_DISCARDABLE     0x0004 | 
|---|
| 29 |  | 
|---|
| 30 | #define DosAllocSeg     Dos16AllocSeg | 
|---|
| 31 | #define DosFreeSeg      Dos16FreeSeg | 
|---|
| 32 | #define DosGetSeg       Dos16GetSeg | 
|---|
| 33 | #define DosGiveSeg      Dos16GiveSeg | 
|---|
| 34 | #define DosReallocSeg   Dos16ReallocSeg | 
|---|
| 35 | #define DosSizeSeg      Dos16SizeSeg | 
|---|
| 36 |  | 
|---|
| 37 | USHORT APIENTRY16 DosAllocSeg(USHORT cbSize, PSEL pSel, USHORT fsAlloc); | 
|---|
| 38 | USHORT APIENTRY16 DosFreeSeg(SEL sel); | 
|---|
| 39 | USHORT APIENTRY16 DosGetSeg(SEL sel); | 
|---|
| 40 | USHORT APIENTRY16 DosGiveSeg(SEL sel, PID pid, PSEL pSelRecipient); | 
|---|
| 41 | USHORT APIENTRY16 DosReallocSeg(USHORT cbNewSize, SEL sel); | 
|---|
| 42 | USHORT APIENTRY16 DosSizeSeg(SEL sel, PULONG pcbSize); | 
|---|
| 43 |  | 
|---|
| 44 | #define DosSelToFlat Dos32SelToFlat | 
|---|
| 45 | ULONG _Optlink DosSelToFlat(ULONG seladdr); | 
|---|
| 46 |  | 
|---|
| 47 | #define DosFlatToSel Dos32FlatToSel | 
|---|
| 48 | ULONG _Optlink DosFlatToSel(ULONG lin); | 
|---|
| 49 |  | 
|---|
| 50 | #endif | 
|---|
| 51 |  | 
|---|
| 52 | //undocumented OS/2 api to read data from an executable image | 
|---|
| 53 |  | 
|---|
| 54 | #define QHINF_EXEINFO       1 /* NE exeinfo. */ | 
|---|
| 55 | #define QHINF_READRSRCTBL   2 /* Reads from the resource table. */ | 
|---|
| 56 | #define QHINF_READFILE      3 /* Reads from the executable file. */ | 
|---|
| 57 | #define QHINF_LIBPATHLENGTH 4 /* Gets the libpath length. */ | 
|---|
| 58 | #define QHINF_LIBPATH       5 /* Gets the entire libpath. */ | 
|---|
| 59 | #define QHINF_FIXENTRY      6 /* NE only */ | 
|---|
| 60 | #define QHINF_STE           7 /* NE only */ | 
|---|
| 61 | #define QHINF_MAPSEL        8 /* NE only */ | 
|---|
| 62 |  | 
|---|
| 63 | APIRET APIENTRY DosQueryHeaderInfo(HMODULE hmod, | 
|---|
| 64 | ULONG   ulIndex, | 
|---|
| 65 | PVOID   pvBuffer, | 
|---|
| 66 | ULONG   cbBuffer, | 
|---|
| 67 | ULONG   ulSubFunction); | 
|---|
| 68 |  | 
|---|
| 69 | #endif //__OS2SEL_H__ | 
|---|