Ignore:
Timestamp:
Jul 6, 2004, 6:57:53 PM (21 years ago)
Author:
sandervl
Message:

update

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/custombuild.h

    r10490 r10616  
    404404
    405405
    406 /** Enter odin context with this thread. */
     406/** @defgroup   odin32_threadctx    Odin32 Thread Context
     407 * @{ */
     408#pragma pack(1)
     409/** Saved odin/os2 thread context.
     410 * (This structure is 32 bytes, there is assembly workers which depends on this size.)
     411 */
     412typedef struct _ODINTHREADCTX
     413{
     414    /** Flags. */
     415    unsigned        fFlags;
     416    /** Saved fs selector. */
     417    unsigned short  fs;
     418    /** FPU control word. */
     419    unsigned short  cw;
     420    /** Exception registration record. */
     421    unsigned        XctpRegRec[2];
     422    /** Reserved for future use. */
     423    unsigned        aReserved[4];
     424} ODINTHREADCTX, *PODINTHREADCTX;
     425#pragma pack()
     426
     427/** @defgroup odin32_threadctx_flags    Odin32 Thread Context Flags
     428 * These flags are used to direct what is done and saved on a switch. The flags
     429 * passed to the save function will be stored in fFlags of ODINTHREADCTX.
     430 * @{ */
     431/** Default switch from OS/2 to Odin32 context. */
     432#define OTCTXF_DEF_TO_OS2       (OTCTXF_ENTER_OS2 | OTCTXF_LOAD_OS2 | OTCTXF_MAYBE_NESTED | OTCTXF_SAVE_FPU)
     433/** Default switch from OS/2 to Odin32 context. */
     434#define OTCTXF_DEF_TO_ODIN32    (OTCTXF_ENTER_ODIN32 | OTCTXF_LOAD_ODIN32 | OTCTXF_MAYBE_NESTED | OTCTXF_SAVE_FPU)
     435
     436/** Perhaps this is a nested enter and/or leave. (advisory only) */
     437#define OTCTXF_MAYBE_NESTED     0x0001
     438/** Enter OS/2 context from Odin32 context. */
     439#define OTCTXF_ENTER_OS2       (0x0002 | OTCTXF_SAVE_FS | OTCTXF_SAVE_FPU)
     440/** Enter Odin32 context from OS/2 context. */
     441#define OTCTXF_ENTER_ODIN32    (0x0004 | OTCTXF_SAVE_FS | OTCTXF_SAVE_FPU)
     442/** Load Default OS/2 context. */
     443#define OTCTXF_LOAD_OS2        (0x0008 | OTCTXF_LOAD_FS_OS2    | OTCTXF_LOAD_FPU_OS2    | OTCTXF_LOAD_XCPT_OS2)
     444/** Load Default Odin32 context. */
     445#define OTCTXF_LOAD_ODIN32     (0x0010 | OTCTXF_LOAD_FS_ODIN32 | OTCTXF_LOAD_FPU_ODIN32 | OTCTXF_LOAD_XCPT_ODIN32)
     446
     447/** Save FS. */
     448#define OTCTXF_SAVE_FS          0x0100
     449/** Load OS/2 FS. */
     450#define OTCTXF_LOAD_FS_OS2      0x0200
     451/** Load Odin32 FS. */
     452#define OTCTXF_LOAD_FS_ODIN32   0x0400
     453/** Save FPU control word. */
     454#define OTCTXF_SAVE_FPU         0x0800
     455/** Load OS/2 FPU control word. */
     456#define OTCTXF_LOAD_FPU_OS2     0x1000
     457/** Load Odin32 FPU control word. */
     458#define OTCTXF_LOAD_FPU_ODIN32  0x2000
     459/** Install OS/2 exception handler. (not implemented) */
     460#define OTCTXF_LOAD_XCPT_OS2    0x4000
     461/** Install Odin32 exception handler. */
     462#define OTCTXF_LOAD_XCPT_ODIN32 0x8000
     463/** @} */
     464
     465/** Save thread context and/or load other thread context.
     466 * @param   pCtx    Where to save the current thread context.
     467 * @param   fFlags  Flags telling what to do.
     468 */
     469void    WIN32API ODIN_ThreadContextSave(PODINTHREADCTX pCtx, unsigned fFlags);
     470
     471/** Restore saved thread context and/or do additional loads.
     472 * @param   pCtx    Where to save the current thread context.
     473 *                  (This will be zero'ed.)
     474 * @param   fFlags  Flags telling extra stuff to load.
     475 *                  Only CTCTXF_LOAD_* flags will be evaluated.
     476 */
     477void    WIN32API ODIN_ThreadContextRestore(PODINTHREADCTX pCtx, unsigned fFlags);
     478
     479
     480/** Enter odin context with this thread.
     481 * @deprecated */
    407482USHORT WIN32API ODIN_ThreadEnterOdinContext(void *pExceptionRegRec, BOOL fForceFSSwitch);
    408 /** Leave odin context with this thread. */
     483/** Leave odin context with this thread.
     484 * @deprecated */
    409485void   WIN32API ODIN_ThreadLeaveOdinContext(void *pExceptionRegRec, USHORT selFSOld);
    410486
    411 /** Leave odin context to call back into OS/2 code. */
     487/** Leave odin context to call back into OS/2 code.
     488 * @deprecated */
    412489USHORT WIN32API ODIN_ThreadLeaveOdinContextNested(void *pExceptionRegRec, BOOL fRemoveOdinExcpt);
    413 /** Re-enter Odin context after being back in OS/2 code. */
     490/** Re-enter Odin context after being back in OS/2 code.
     491 * @deprecated */
    414492void   WIN32API ODIN_ThreadEnterOdinContextNested(void *pExceptionRegRec, BOOL fRestoreOdinExcpt, USHORT selFSOld);
     493
     494/** @} */
    415495
    416496void   WIN32API ODIN_SetExceptionHandler(void *pExceptionRegRec);
     
    426506
    427507void WIN32API ODIN_SetPostscriptPassthrough(BOOL fEnable);
     508BOOL WIN32API ODIN_QueryPostscriptPassthrough();
    428509
    429510//PE headers of system dlls
     
    469550extern IMAGE_FILE_HEADER nt_urlmon_header;
    470551extern IMAGE_FILE_HEADER nt_netapi32_header;
     552extern IMAGE_FILE_HEADER nt_winscard_header;
     553extern IMAGE_FILE_HEADER nt_shdocvw_header;
    471554#ifdef __cplusplus
    472555}
Note: See TracChangeset for help on using the changeset viewer.