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

  1. /*+==========================================================================
  2.   File:      DLLSKEL.H
  3.  
  4.   Summary:   Include file for the DLLSKEL.DLL dynamic link library.  This
  5.              include file is meant to serve double duty as providing
  6.              general set of macros that (1) when included in a DLLSKEL
  7.              implementation file wherein it provides a DLLENTRY
  8.              designation for the definition of exported functions and (2)
  9.              when included in an app that uses these function calls it
  10.              provides a DLLENTRY designation for the declaration of
  11.              imported functions.  The default behavior is to serve
  12.              consumer apps that import the functions in the providing
  13.              DLLSKEL.DLL.  Prior to the #include of this DLLSKEL.H if
  14.              _DLLEXPORT_ is #defined, the bahavior is to serve the DLLSKEL
  15.              itself in defining the functions as exported.
  16.  
  17.              For a comprehensive tutorial code tour of DLLSKEL's contents
  18.              and offerings see the tutorial DLLSKEL.HTM file. For more
  19.              specific technical details on the internal workings see the
  20.              comments dispersed throughout the DLLSKEL source code.
  21.  
  22.   Classes:   none
  23.  
  24.   Functions: none
  25.  
  26.   Origin:    12-9-96: atrent - Revised.
  27.  
  28. ----------------------------------------------------------------------------
  29.   This file is part of the Microsoft COM Tutorial Code Samples.
  30.  
  31.   Copyright (C) Microsoft Corporation, 1997.  All rights reserved.
  32.  
  33.   This source code is intended only as a supplement to Microsoft
  34.   Development Tools and/or on-line documentation.  See these other
  35.   materials for detailed information regarding Microsoft code samples.
  36.  
  37.   THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY
  38.   KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
  39.   IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
  40.   PARTICULAR PURPOSE.
  41. ==========================================================================+*/
  42.  
  43. #if !defined(DLLSKEL_H)
  44. #define DLLSKEL_H
  45.  
  46. #if !defined(RC_INCLUDE)
  47.  
  48. #if !defined(_DLLEXPORT_)
  49.  
  50. // If _DLLEXPORT_ is not defined then the default is to import.
  51. #if defined(__cplusplus)
  52. #define DLLENTRY extern "C" __declspec(dllimport)
  53. #else
  54. #define DLLENTRY extern __declspec(dllimport)
  55. #endif
  56. #define STDENTRY DLLENTRY HRESULT WINAPI
  57. #define STDENTRY_(type) DLLENTRY type WINAPI
  58.  
  59. // Here is the list of service APIs offered by the DLL (using the
  60. // appropriate entry API declaration macros just #defined above).
  61. STDENTRY_(BOOL) DllHelloBox (HWND);
  62. STDENTRY_(BOOL) DllAboutBox (HWND);
  63.  
  64. #else  // _DLLEXPORT_
  65.  
  66. // Else if _DLLEXPORT_ is defined then we've been told to export.
  67. #if defined(__cplusplus)
  68. #define DLLENTRY extern "C" __declspec(dllexport)
  69. #else
  70. #define DLLENTRY __declspec(dllexport)
  71. #endif
  72. #define STDENTRY DLLENTRY HRESULT WINAPI
  73. #define STDENTRY_(type) DLLENTRY type WINAPI
  74.  
  75. #endif // _DLLEXPORT_
  76.  
  77. #endif // RC_INCLUDE
  78.  
  79. #endif // DLLSKEL_H
  80.