CLIENT.H
上传用户:bangxh
上传日期:2007-01-31
资源大小:42235k
文件大小:3k
源码类别:

Windows编程

开发平台:

Visual C++

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