Add wxDynamicLibrary::GetModuleFromAddress().
Use dladdr() under Unix, if available, to provide the same functionality as we get from GetModuleHandleEx() under MSW and export it in a new public function. Closes #15248. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76114 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -195,6 +195,21 @@ public:
|
||||
*/
|
||||
static wxDynamicLibraryDetailsArray ListLoaded();
|
||||
|
||||
/**
|
||||
Returns the load address of the module containing the specified address
|
||||
or @NULL if not found.
|
||||
|
||||
If the second argument @a path is not @NULL, it is filled with the full
|
||||
path to the file the module was loaded from upon a successful return.
|
||||
|
||||
This method is implemented under MSW and Unix platforms providing
|
||||
`dladdr()` call (which include Linux and various BSD systems) and
|
||||
always returns @NULL elsewhere.
|
||||
|
||||
@since 3.1.0
|
||||
*/
|
||||
static void* GetModuleFromAddress(const void* addr, wxString* path = NULL);
|
||||
|
||||
/**
|
||||
Loads DLL with the given @a name into memory. The @a flags argument can
|
||||
be a combination of the styles outlined in the class description.
|
||||
|
Reference in New Issue
Block a user