serial.h
资源名称:shell.rar [点击查看]
上传用户:xhy777
上传日期:2007-02-14
资源大小:24088k
文件大小:2k
源码类别:
系统编程
开发平台:
Visual C++
- /*
- * serial.h - Access serialization routines description.
- */
- /* Types
- ********/
- typedef struct _serialcontrol
- {
- BOOL (*AttachProcess)(HMODULE);
- BOOL (*DetachProcess)(HMODULE);
- BOOL (*AttachThread)(HMODULE);
- BOOL (*DetachThread)(HMODULE);
- }
- SERIALCONTROL;
- DECLARE_STANDARD_TYPES(SERIALCONTROL);
- typedef struct _nonreentrantcriticalsection
- {
- CRITICAL_SECTION critsec;
- #ifdef DEBUG
- DWORD dwOwnerThread;
- #endif /* DEBUG */
- BOOL bEntered;
- }
- NONREENTRANTCRITICALSECTION;
- DECLARE_STANDARD_TYPES(NONREENTRANTCRITICALSECTION);
- /* Prototypes
- *************/
- /* serial.c */
- #ifdef DEBUG
- extern BOOL SetSerialModuleIniSwitches(void);
- #endif /* DEBUG */
- extern void ReinitializeNonReentrantCriticalSection(PNONREENTRANTCRITICALSECTION);
- extern BOOL EnterNonReentrantCriticalSection(PNONREENTRANTCRITICALSECTION);
- extern void LeaveNonReentrantCriticalSection(PNONREENTRANTCRITICALSECTION);
- #ifdef DEBUG
- extern BOOL NonReentrantCriticalSectionIsOwned(PCNONREENTRANTCRITICALSECTION);
- #endif
- extern BOOL BeginExclusiveAccess(void);
- extern void EndExclusiveAccess(void);
- #ifdef DEBUG
- extern BOOL AccessIsExclusive(void);
- #endif /* DEBUG */
- extern HMODULE GetThisModulesHandle(void);
- /* functions to be provided by client */
- extern BOOL InitializeDLL(void);
- extern BOOL TerminateDLL(void);
- #ifdef DEBUG
- extern BOOL SetAllIniSwitches(void);
- #endif
- /* Global Variables
- *******************/
- /* serialization control structure */
- extern CSERIALCONTROL g_cserctrl;
English
