www.pudn.com > 17551_portion.rar > methoda.h
#include "stdafx.h" #include "GPIOCTL.h" #include#ifdef _DEBUG #define new DEBUG_NEW #undef THIS_FILE static char THIS_FILE[] = __FILE__; #endif class Cmethoda : public CObject { public: int readbitfromchar(unsigned char *value, int bitcount); HANDLE * htimer; int bit; int m_bitcounta; int powi(int a,int b); int twoTOten(int *a); void tenTotwo(int * a,int b); void not(int *bit); void bitTOchar(unsigned char *value, int bitcount,int bitvalue); GENPORT_WRITE_INPUT InputBuffer; BOOL IoctlResult; ULONG PortNumber; // The following parameters are used in the IOCTL call HANDLE hndFile; // Handle to device, obtain from CreateFile // Input buffer for DeviceIoControl LONG IoctlCode; ULONG DataLength; ULONG ReturnedLength; union { ULONG LongData; USHORT ShortData; UCHAR CharData; } DataBuffer; // Buffer received from driver (Data). };