summaryrefslogtreecommitdiff
path: root/ace/adapter/ace/DLL.h
blob: 89aa59367a8860d7747618bfdf4e97200f3db6a6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
// $Id$

#ifndef ACE_ADAPTER_DLL_H
#define ACE_ADAPTER_DLL_H
#include "ace/pre.h"

#include "ace/ACE.h"
#include "../../DLL.h"

class ACE_DLL_W : public ACE_DLL
{
public:
  ACE_DLL_W (int close_on_destruction = 1)
    : ACE_DLL (close_on_destruction)
  {}

  ACE_DLL_W (const wchar_t *dll_name,
             int open_mode = ACE_DEFAULT_SHLIB_MODE,
             int close_on_destruction = 1)
    : ACE_DLL (ACE_TEXT_WCHAR_TO_CHAR (dll_name), open_mode, close_on_destruction)
  {}

  int open (const wchar_t *dll_name,
            int open_mode = ACE_DEFAULT_SHLIB_MODE,
            int close_on_destruction = 1)
  { return ACE_DLL::open (ACE_TEXT_WCHAR_TO_CHAR (dll_name), open_mode, close_on_destruction); }

  ~ACE_DLL_W (void)
  {}

  void *symbol (const wchar_t *symbol_name)
  { return ACE_DLL::symbol (ACE_TEXT_WCHAR_TO_CHAR (symbol_name)); }

  wchar_t *error (void)
  { return ACE::strnew (ACE_TEXT_CHAR_TO_WCHAR (ACE_DLL::error ())); }
};

#include "ace/post.h"
#endif /* ACE_ADAPTER_DLL_H */