dllaccesserver.h
Upload User: zhongxx05
Upload Date: 2007-06-06
Package Size: 33641k
Code Size: 4k
Category:

Symbian

Development Platform:

C/C++

  1. /* ***** BEGIN LICENSE BLOCK ***** 
  2.  * Version: RCSL 1.0/RPSL 1.0 
  3.  *  
  4.  * Portions Copyright (c) 1995-2002 RealNetworks, Inc. All Rights Reserved. 
  5.  *      
  6.  * The contents of this file, and the files included with this file, are 
  7.  * subject to the current version of the RealNetworks Public Source License 
  8.  * Version 1.0 (the "RPSL") available at 
  9.  * http://www.helixcommunity.org/content/rpsl unless you have licensed 
  10.  * the file under the RealNetworks Community Source License Version 1.0 
  11.  * (the "RCSL") available at http://www.helixcommunity.org/content/rcsl, 
  12.  * in which case the RCSL will apply. You may also obtain the license terms 
  13.  * directly from RealNetworks.  You may not use this file except in 
  14.  * compliance with the RPSL or, if you have a valid RCSL with RealNetworks 
  15.  * applicable to this file, the RCSL.  Please see the applicable RPSL or 
  16.  * RCSL for the rights, obligations and limitations governing use of the 
  17.  * contents of the file.  
  18.  *  
  19.  * This file is part of the Helix DNA Technology. RealNetworks is the 
  20.  * developer of the Original Code and owns the copyrights in the portions 
  21.  * it created. 
  22.  *  
  23.  * This file, and the files included with this file, is distributed and made 
  24.  * available on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER 
  25.  * EXPRESS OR IMPLIED, AND REALNETWORKS HEREBY DISCLAIMS ALL SUCH WARRANTIES, 
  26.  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, FITNESS 
  27.  * FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. 
  28.  * 
  29.  * Technology Compatibility Kit Test Suite(s) Location: 
  30.  *    http://www.helixcommunity.org/content/tck 
  31.  * 
  32.  * Contributor(s): 
  33.  *  
  34.  * ***** END LICENSE BLOCK ***** */ 
  35. #ifndef _DLLACCESSERVER_H_
  36. #define _DLLACCESSERVER_H_
  37. /************************************************************************
  38.  *  Includes
  39.  */
  40. #include "hxcom.h"
  41. #include "hxdllaccess.h"
  42. #include "dllacces.h"
  43. class DLLAccessServer : public IHXDllAccess
  44. {
  45. public:
  46.     /*
  47.      * Constructor/Destructor
  48.      */
  49.     DLLAccessServer();
  50.     ~DLLAccessServer();
  51.     /*
  52.      * IUnknown methods
  53.      */
  54.     STDMETHOD(QueryInterface) (THIS_
  55. REFIID riid,
  56. void** ppvObj);
  57.     STDMETHOD_(ULONG32,AddRef) (THIS);
  58.     STDMETHOD_(ULONG32,Release) (THIS);
  59.     /*
  60.      * IHXDllAccess methods
  61.      */
  62.     /************************************************************************
  63.      * Method:
  64.      *     IHXDllAccess::Open()
  65.      * Purpose:
  66.      *     Open a Dll of the specified name and type.  
  67.      */
  68.     STDMETHOD(Open) (THIS_
  69. const char* pDllName,
  70. UINT16 uLibType
  71. );
  72.     /************************************************************************
  73.      * Method:
  74.      *     IHXDllAccess::Close()
  75.      * Purpose:
  76.      *     Close opened Dll.
  77.      */
  78.     STDMETHOD(Close) (THIS);
  79.     /************************************************************************
  80.      * Method:
  81.      *     IHXDllAccess::GetSymbol()
  82.      * Purpose:
  83.      *     Obtain pointer to symbol in opened Dll.
  84.      */
  85.     STDMETHOD_(void*, GetSymbol) (THIS_
  86. const char* pSymbolName
  87. );
  88.     /************************************************************************
  89.      * Method:
  90.      *     IHXDllAccess::GetError()
  91.      * Purpose:
  92.      *     Get service specific error code (0 = no error).
  93.      */
  94.     STDMETHOD_(ULONG32,GetError) (THIS);
  95.     /************************************************************************
  96.      * Method:
  97.      *     IHXDllAccess::GetErrorString()
  98.      * Purpose:
  99.      *     Get last error string.
  100.      */
  101.     STDMETHOD_(const char*, GetErrorString) (THIS);
  102.     /************************************************************************
  103.      * Method:
  104.      *     IHXDllAccess::GetDllName()
  105.      * Purpose:
  106.      *     Get opened Dll name
  107.      */
  108.     STDMETHOD_(const char*, GetDllName) (THIS);
  109.     /************************************************************************
  110.      * Method:
  111.      *     IHXDllAccess::GetDllVersion()
  112.      * Purpose:
  113.      *     Get opened Dll vesion
  114.      */
  115.     STDMETHOD_(const char*, GetDllVersion) (THIS);
  116.     
  117.     /************************************************************************
  118.      * Method:
  119.      *     IHXDllAccess::IsOpen()
  120.      * Purpose:
  121.      *     Tells if Dll is opened:
  122.      * TRUE  = dll is opened
  123.      * FALSE = dll is not opened
  124.      */
  125.     STDMETHOD_(BOOL,IsOpen) (THIS);
  126.     
  127. private:
  128.     INT32 m_lRefCount;
  129.     DLLAccess mDllAccess;
  130. };
  131. #endif // _DLLACCESSERVER_H_