home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / msdn_vcb / samples / vc98 / com / freethrd / server / freserve.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-04-03  |  2.5 KB  |  67 lines

  1. /*+==========================================================================
  2.   File:      FRESERVE.H
  3.  
  4.   Summary:   Include file for the FRESERVE.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 FRESERVE's contents
  10.              and offerings see the accompanying FRESERVE.TXT file. For
  11.              more specific technical details on the internal workings see
  12.              the comments dispersed throughout the FRESERVE source code.
  13.  
  14.   Classes:   none.
  15.  
  16.   Functions: DllRegisterServer, DllUnregisterServer.
  17.  
  18.   Origin:    4-5-96: atrent - Editor-inheritance from DLLSERVE.H in
  19.                the DLLSERVE OLE Tutorial Code Sample.
  20.  
  21. ----------------------------------------------------------------------------
  22.   This file is part of the Microsoft OLE Tutorial Code Samples.
  23.  
  24.   Copyright (C) Microsoft Corporation, 1996.  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(FRESERVE_H)
  37. #define FRESERVE_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. #define DLLENTRY EXTERN_C __declspec(dllimport)
  45. #define STDENTRY EXTERN_C __declspec(dllimport) HRESULT STDAPICALLTYPE
  46. #define STDENTRY_(type) EXTERN_C __declspec(dllimport) type STDAPICALLTYPE
  47.  
  48. // Here is the list of server APIs offered by the DLL (using the
  49. // appropriate entry API declaration macros just #defined above).
  50.  
  51. STDENTRY DllRegisterServer(void);
  52.  
  53. STDENTRY DllUnregisterServer(void);
  54.  
  55. #else  // _DLLEXPORT_
  56.  
  57. // Else if _DLLEXPORT_ is indeed defined then we've been told to export.
  58. #define DLLENTRY EXTERN_C __declspec(dllexport)
  59. #define STDENTRY EXTERN_C __declspec(dllexport) HRESULT STDAPICALLTYPE
  60. #define STDENTRY_(type) EXTERN_C __declspec(dllexport) type STDAPICALLTYPE
  61.  
  62. #endif // _DLLEXPORT_
  63.  
  64. #endif // RC_INCLUDE
  65.  
  66. #endif // FRESERVE_H
  67.