home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / msdn_vcb / samples / vc98 / sdk / netds / ras / winnt / rashost / rashost.h < prev    next >
Encoding:
C/C++ Source or Header  |  1997-10-05  |  2.2 KB  |  83 lines

  1. ///////////////////////////////////////////////////////////////////////////////
  2. //
  3. //  File Name 
  4. //      RASHOST.H
  5. //
  6. //  Description
  7. //      This file defines all the data structures used in the files and the
  8. //      appropiate constants.
  9. //      In this file we also define the function prototypes for all the
  10. //      methods used in the project files.
  11. //
  12. //  Author
  13. //      Irving De la Cruz
  14. //
  15. //  Revision: 1.1
  16. //
  17. // Written for Microsoft Developer Support
  18. // Copyright (c) 1995-1997 Microsoft Corporation. All rights reserved.
  19. //
  20. #ifndef _RASHOST_H
  21. #define _RASHOST_H
  22.  
  23. #pragma warning (disable : 4100)
  24. #pragma warning (disable : 4201)
  25. #pragma warning (disable : 4237)
  26. #pragma warning (disable : 4514)
  27. #pragma warning (disable : 4702)
  28. #pragma warning (disable : 4710)
  29.  
  30. #define STRICT
  31. #include <WINDOWS.H>
  32. #include <RASERROR.H>
  33. extern "C"
  34. {
  35.     #include "RASSHOST.H"
  36. };
  37.  
  38. // Constants
  39. #define CLIENT_RESPONSE_TIMEOUT     15000
  40.  
  41. // Private data structures
  42. typedef struct _WORK_THREAD_DATA
  43. {
  44.     HPORT  hPort;
  45.     PBYTE  pSendBuf;
  46.     DWORD  SendBufSize;
  47.     PBYTE  pRecvBuf;
  48.     DWORD  RecvBufSize;
  49.     VOID  (WINAPI *pfnSecurityDialogEnd)(SECURITY_MESSAGE*);
  50. } WORK_THREAD_DATA, *PWORK_THREAD_DATA;
  51.  
  52. typedef struct _RASHOST_DATA
  53. {
  54.     DWORD   dwSize;
  55.     TCHAR   szUserName[64];
  56.     TCHAR   szUserDomain[64];
  57.     BYTE    Buffer[512];
  58. } RASHOST_DATA, *PRASHOST_DATA;
  59.  
  60. // Function prototypes for dynamic bindings
  61. typedef DWORD (WINAPI * RASSECURITYDIALOGSENDPROC)(HPORT, PBYTE, WORD);
  62. typedef DWORD (WINAPI * RASSECURITYDIALOGRECEIVEPROC)(HPORT, PBYTE, PWORD, DWORD, HANDLE);
  63.  
  64. // Global variables
  65. extern RASSECURITYDIALOGSENDPROC    gpfnSendProc;
  66. extern RASSECURITYDIALOGRECEIVEPROC gpfnReceiveProc;
  67.  
  68. ///////////////////////////////////////////////////////////////////////////////
  69. // Function prototypes
  70.  
  71. // Data transmission functions
  72. void WINAPI CallWorkerThread
  73.                     (PWORK_THREAD_DATA          pCallData);
  74.  
  75. // User validation function
  76. DWORD WINAPI ValidateCallingUser
  77.                     (PRASHOST_DATA              pData,
  78.                      BOOL *                     pfAccessGranted);
  79.  
  80. #endif  // _RASHOST_H
  81.  
  82. // End of file for RASHOST.H
  83.