ticksrv.h

来自「windows ce 程序设计书 的源代码」· C头文件 代码 · 共 48 行

H
48
字号
//======================================================================
// Header file
//
// Written for the book Programming Windows CE
// Copyright (C) 2003 Douglas Boling
//======================================================================
#define dim(a)  (sizeof (a)/sizeof(a[0]))
//
// Declare the external entry points here. Use declspec so we don't 
// need a .def file. Bracketed with extern C to avoid mangling in C++.
//
#ifdef __cplusplus
extern "C" {
#endif //__cplusplus
__declspec(dllexport) DWORD TCK_Init (DWORD dwContext);
__declspec(dllexport) BOOL  TCK_Deinit (DWORD dwContext);
__declspec(dllexport) DWORD TCK_IOControl (DWORD dwOpen, DWORD dwCode, 
                                           PBYTE pIn, DWORD dwIn,
                                           PBYTE pOut, DWORD dwOut, 
                                           DWORD *pdwBytesWritten);
__declspec(dllexport) void TCK_PowerDown (DWORD dwContext);
__declspec(dllexport) void TCK_PowerUp (DWORD dwContext);
#ifdef __cplusplus
} // extern "C"
#endif //__cplusplus

// Suppress warnings by declaring the undeclared.
#ifndef GetCurrentPermissions
DWORD GetCurrentPermissions(void);
DWORD SetProcPermissions (DWORD);
DWORD GetCallerProcess(void);
PVOID MapPtrToProcess (PVOID, DWORD);
#endif //GetCurrentPermissions

int RegisterService (void);
int DeregisterService (void);
DWORD WINAPI AcceptThread (PVOID pArg);

//
// Service state structure  
//
typedef struct {
    DWORD dwSize;               // Size of structure
    CRITICAL_SECTION csData;    // Crit Section protecting this struct
    int servState;              // Service state
} SRVCONTEXT, *PSRVCONTEXT;

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?