Add semi-public wxDynamicLibrary::MSWGetModuleHandle().

Rename old private wxGetModuleHandle() function to wxDynamicLibrary::
MSWGetModuleHandle() to allow its use in the dll sample.

This fixes the sample compilation with VC6 which lacks GetModuleHandleEx()-
related declarations.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62801 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2009-12-07 03:04:33 +00:00
parent 0530434efc
commit c118a47691
3 changed files with 67 additions and 58 deletions

View File

@@ -357,6 +357,19 @@ public:
static wxString GetPluginsDirectory();
#ifdef __WXMSW__
// return the handle (HMODULE/HINSTANCE) of the DLL with the given name
// and/or containing the specified address: for XP and later systems only
// the address is used and the name is ignored but for the previous systems
// only the name (which may be either a full path to the DLL or just its
// base name, possibly even without extension) is used
//
// the returned handle reference count is not incremented so it doesn't
// need to be freed using FreeLibrary() but it also means that it can
// become invalid if the DLL is unloaded
static HINSTANCE MSWGetModuleHandle(const char *name, void *addr);
#endif // __WXMSW__
protected:
// common part of GetSymbol() and HasSymbol()
void *DoGetSymbol(const wxString& name, bool *success = 0) const;