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 / wintyp / client.h < prev    next >
Encoding:
Text File  |  1996-07-23  |  2.8 KB  |  59 lines

  1. //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  2. //                  Copyright Microsoft Corp. 1992-1996
  3. //                      Remote Machine WinTyp sample
  4. //
  5. // FILE     :   client.h
  6. //
  7. // PURPOSE  :   Definitions and function prototypes used on client side
  8. //
  9. //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  10.  
  11. //------------------------------------------------------------------------
  12. //      Global variables used on the client side
  13. //------------------------------------------------------------------------
  14. HWND        g_hWnd;                 // Handle to the window
  15. HINSTANCE   g_hInstance;            // Handle to the instance
  16. LPTSTR      g_szClassName =         // The class name on client side
  17.         TEXT("ClientClassName");    
  18. LPTSTR      g_szWindowCaption =     // The caption shown in the window
  19.         TEXT("WinTyp RPC sample program -- Client side");    
  20. BITMAP      g_Bitmap;               // A bitmap structure
  21. HBITMAP     g_hBitmap;              // Handle to the bitmap stucture
  22. HPALETTE    g_hPalette;             // A handle to the palette used
  23. BOOL        BITMAP_READ = FALSE;    // Indicates if bitmap is read
  24. BOOL        EDGE_FOUND = FALSE;     // Indicates if edges is found
  25. BOOL        g_bBound = FALSE;       // Indicates is binding has been done
  26. TCHAR       g_szFileName[100];      // Name of file with bitmap
  27. UINT        g_BitsPerPixel;         // Number of bits per pixel
  28.  
  29.  
  30. //------------------------------------------------------------------------
  31. //      Function prototyping 
  32. //------------------------------------------------------------------------
  33. int WINAPI          WinMain (HINSTANCE, HINSTANCE, LPSTR, int);
  34. LRESULT CALLBACK    ClientProc(HWND, UINT, WPARAM, LPARAM);
  35. BOOL                Init(void);
  36. BOOL CALLBACK       AboutDlgProc(HWND, UINT, WPARAM, LPARAM);
  37. BOOL CALLBACK       BindingDlgProc(HWND, UINT, WPARAM, LPARAM);
  38. BOOL                GetBitmapFileName(void);
  39. void                RedrawClientArea(HDC);
  40. BOOL                ReadBitmapFromFile(void);
  41. void                CleanUp();
  42. HPALETTE            LoadPaletteFromFile(LPTSTR lpszFileName);
  43. RPC_STATUS          Bind(HWND hWnd);
  44.  
  45.  
  46.  
  47. //------------------------------------------------------------------------
  48. //      Variables used for finding the binding with the server
  49. //      Since the variables uses definitions from the COMMON.H file
  50. //      remember to include "common.h" before this file
  51. //------------------------------------------------------------------------
  52. RPC_STATUS      status;
  53. _TUCHAR         *pszUuid                    = NULL;
  54. _TUCHAR         pszProtocolSequence[100];    
  55. _TUCHAR         pszNetworkAddress[100];      
  56. _TUCHAR         pszEndpoint[100];            
  57. _TUCHAR         *pszOptions                 = NULL;
  58. _TUCHAR         *pszStringBinding           = NULL;
  59.