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 / conserve / conserve.h < prev    next >
Text File  |  1997-08-05  |  3KB  |  75 lines

  1. /*+==========================================================================
  2.   File:      CONSERVE.H
  3.  
  4.   Summary:   Include file for the CONSERVE.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 CONSERVE's contents
  10.              and offerings see the tutorial CONSERVE.HTM file. For
  11.              more specific technical details on the internal workings see
  12.              the comments dispersed throughout the CONSERVE source code.
  13.  
  14.   Classes:   none.
  15.  
  16.   Functions: DllRegisterServer, DllUnregisterServer.
  17.  
  18.   Origin:    12-10-96: atrent - Editor-inheritance from FRESERVE.H in
  19.                the FRESERVE 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(CONSERVE_H)
  37. #define CONSERVE_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 // CONSERVE_H
  75.