home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / msdn_vcb / samples / vc98 / sdk / com / tutsamp / licserve / licserve.h < prev    next >
Encoding:
C/C++ Source or Header  |  1997-08-05  |  2.6 KB  |  75 lines

  1. /*+==========================================================================
  2.   File:      LICSERVE.H
  3.  
  4.   Summary:   Include file for the LICSERVE.DLL dynamic link library.
  5.              Intended primarily for external users of this DLL who exploit
  6.              it via static linkage to the DllRegisterServer and
  7.              DllUnregisterServer exported service calls.
  8.  
  9.              For a comprehensive tutorial code tour of LICSERVE's contents
  10.              and offerings see the tutorial LICSERVE.HTM file. For
  11.              more specific technical details on the internal workings see
  12.              the comments dispersed throughout the LICSERVE source code.
  13.  
  14.   Classes:   none.
  15.  
  16.   Functions: DllRegisterServer, DllUnregisterServer.
  17.  
  18.   Origin:    12-10-96: atrent - Editor-inheritance from DLLSERVE.H in
  19.                the DLLSERVE Tutorial Code Sample. [Revised]
  20.  
  21. ----------------------------------------------------------------------------
  22.   This file is part of the Microsoft COM Tutorial Code Samples.
  23.  
  24.   Copyright (C) Microsoft Corporation, 1997.  All rights reserved.
  25.  
  26.   This source code is intended only as a supplement to Microsoft
  27.   Development Tools and/or on-line documentation.  See these other
  28.   materials for detailed information regarding Microsoft code samples.
  29.  
  30.   THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY
  31.   KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
  32.   IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
  33.   PARTICULAR PURPOSE.
  34. ==========================================================================+*/
  35.  
  36. #if !defined(LICSERVE_H)
  37. #define LICSERVE_H
  38.  
  39. #if !defined(RC_INCLUDE)
  40.  
  41. #if !defined(_DLLEXPORT_)
  42.  
  43. // If _DLLEXPORT_ is NOT defined then the default is to import.
  44. #if defined(__cplusplus)
  45. #define DLLENTRY extern "C" __declspec(dllimport)
  46. #else
  47. #define DLLENTRY extern __declspec(dllimport)
  48. #endif
  49. #define STDENTRY DLLENTRY HRESULT WINAPI
  50. #define STDENTRY_(type) DLLENTRY type WINAPI
  51.  
  52. // Here is the list of server APIs offered by the DLL (using the
  53. // appropriate entry API declaration macros just #defined above).
  54.  
  55. STDENTRY DllRegisterServer(void);
  56.  
  57. STDENTRY DllUnregisterServer(void);
  58.  
  59. #else  // _DLLEXPORT_
  60.  
  61. // Else if _DLLEXPORT_ is indeed defined then we've been told to export.
  62. #if defined(__cplusplus)
  63. #define DLLENTRY extern "C" __declspec(dllexport)
  64. #else
  65. #define DLLENTRY __declspec(dllexport)
  66. #endif
  67. #define STDENTRY DLLENTRY HRESULT WINAPI
  68. #define STDENTRY_(type) DLLENTRY type WINAPI
  69.  
  70. #endif // _DLLEXPORT_
  71.  
  72. #endif // RC_INCLUDE
  73.  
  74. #endif // LICSERVE_H
  75.