TESTDDK.H
上传用户:heseme
上传日期:2009-12-23
资源大小:228k
文件大小:2k
开发平台:

Visual C++

  1. // testddk.h : main header file for the TESTDDK application
  2. //
  3. #if !defined(AFX_TESTDDK_H__CFFDA486_82CD_11D4_9E49_0050BAF35242__INCLUDED_)
  4. #define AFX_TESTDDK_H__CFFDA486_82CD_11D4_9E49_0050BAF35242__INCLUDED_
  5. #if _MSC_VER >= 1000
  6. #pragma once
  7. #endif // _MSC_VER >= 1000
  8. #ifndef __AFXWIN_H__
  9. #error include 'stdafx.h' before including this file for PCH
  10. #endif
  11. //#include <winbase.h>
  12. #include "resource.h"       // main symbols
  13. VOID ReadOutThread(VOID);
  14. VOID ReadInThread(VOID);
  15. VOID WriteThread(VOID);
  16. //UINT WriteThread(LPVOID lparam);
  17. /*
  18. HANDLE global_handle;
  19. OVERLAPPED myoverlap;
  20. */
  21. #define MAX_PACKET_SIZE  8192
  22. #define        MAX_LINK_NAME_LENGTH   500
  23. typedef struct _PACKET {
  24.     HANDLE       hEvent;
  25.     OVERLAPPED   OverLappedread;
  26. OVERLAPPED   OverLappedwrite;
  27.     PVOID        Buffer;
  28.     UINT         Length;
  29. } PACKET, *LPPACKET;
  30. typedef struct _CONTROL_BLOCK
  31. {
  32.     PVOID           hFile;
  33.     HANDLE          hEvent;
  34.     TCHAR           AdapterName[128];
  35.     ULONG           PacketLength;
  36.     ULONG           LastReadSize;
  37.     UINT            BufferSize;
  38.     BYTE            PacketBuffer[MAX_PACKET_SIZE];
  39. } CONTROL_BLOCK, *PCONTROL_BLOCK;
  40. typedef struct _global_var{
  41. BYTE Buffer[1600];
  42. HANDLE  hMutex;
  43. OVERLAPPED  overlap;
  44. int Flag;
  45. }global_var,*pglobal_var;
  46. /////////////////////////////////////////////////////////////////////////////
  47. // CTestddkApp:
  48. // See testddk.cpp for the implementation of this class
  49. //
  50. class CTestddkApp : public CWinApp
  51. {
  52. public:
  53. CTestddkApp();
  54. // Overrides
  55. // ClassWizard generated virtual function overrides
  56. //{{AFX_VIRTUAL(CTestddkApp)
  57. public:
  58. virtual BOOL InitInstance();
  59. //}}AFX_VIRTUAL
  60. // Implementation
  61. //{{AFX_MSG(CTestddkApp)
  62. afx_msg void OnAppAbout();
  63. // NOTE - the ClassWizard will add and remove member functions here.
  64. //    DO NOT EDIT what you see in these blocks of generated code !
  65. //}}AFX_MSG
  66. DECLARE_MESSAGE_MAP()
  67. };
  68. /////////////////////////////////////////////////////////////////////////////
  69. //{{AFX_INSERT_LOCATION}}
  70. // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
  71. #endif // !defined(AFX_TESTDDK_H__CFFDA486_82CD_11D4_9E49_0050BAF35242__INCLUDED_)