home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / msdn_vcb / samples / vc98 / sdk / netds / rpc / yield / yieldc.h < prev    next >
C/C++ Source or Header  |  1995-11-14  |  2KB  |  53 lines

  1. #ifdef WIN16
  2. #define APIENTRY     PASCAL
  3. #define UNREFERENCED_PARAMETER
  4. #endif
  5.  
  6. #define IDM_ABOUT    100    /* menu */
  7. #define IDM_BIND     200    /* menu */
  8. #define IDM_WAIT     300    /* menu */
  9. #define IDM_YIELD    400    /* menu */
  10. #define IDM_EXIT     500    /* menu */
  11.  
  12. #define IDD_PROT_SEQ 201    /* control for Protocol Sequence */
  13. #define IDD_NET_ADDR 203    /* control for Network Address   */
  14. #define IDD_ENDPOINT 202    /* control for Endpoint          */
  15. #define IDD_WAITTIME 301    /* control for # seconds to wait */
  16.  
  17. #define IDD_CUSTOM   403    /* radio button selection */
  18. #define IDD_STD_USER 402    /* radio button selection */
  19. #define IDD_STD_RPC  401    /* radio button selection */
  20.  
  21. #define NETLEN        32    /* network address length       */
  22. #define PATHLEN      260    /* Path                         */
  23. #define MSGLEN       300    /* error message in display box */
  24. #define MAXPROTSEQ    20    /* protocol sequence "ncacn_np" */
  25.  
  26. #define DEFAULT_ENDPOINT    "\\pipe\\yield"
  27. #define DEFAULT_PROT_SEQ    "ncacn_np"
  28. #define DEFAULT_WAIT        15         /* # seconds to wait */
  29.  
  30. #define WM_RPC_YIELD_MESSAGE WM_USER+1 
  31.  
  32. #define YIELD_START_MSG      "Yield period start..."
  33. #define YIELD_END_MSG        "Yield period complete"
  34. #define YIELD_PAINT_MSG      "Paint during yield..."
  35.  
  36. #define EXCEPT_MSG          "The remote procedure call raised an exception. \
  37. Please make sure the server application is running and \
  38. that the network address and endpoint are correct."
  39.  
  40.  
  41. /* Function prototypes; same as Win SDK Generic sample */
  42. int WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int);
  43. BOOL InitApplication(HANDLE);
  44. BOOL InitInstance(HANDLE, int);
  45. LONG APIENTRY MainWndProc(HWND, UINT, UINT, LONG);
  46.  
  47. /* Function prototypes specific to this RPC Yield sample */
  48. BOOL APIENTRY About(HWND, UINT, UINT, LONG);        /* dialog function */
  49. BOOL APIENTRY GetBindInfo(HWND, UINT, UINT, LONG);  /* dialog function */
  50. BOOL APIENTRY GetYieldInfo(HWND, UINT, UINT, LONG); /* dialog function */
  51. BOOL APIENTRY GetWaitInfo(HWND, UINT, UINT, LONG);  /* dialog function */
  52. RPC_STATUS Bind(HWND); /* utility that calls RPC API functions */
  53.