home *** CD-ROM | disk | FTP | other *** search
/ PC Press 1997 July / Sezamfile97_2.iso / windows / program / activex / axtsamp.exe / TSBRANCH.EXE / INC / COMOBJ.H < prev    next >
Text File  |  1996-12-29  |  4KB  |  103 lines

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