/* LdrLoadModule() declared in reactos includes */
struct captive_ModuleList_patchpoint *captive_ModuleList_patchpoint_find(gconstpointer ExportAddress);
G_CONST_RETURN gchar *captive_ModuleList_function_disable_find(gconstpointer ExportAddress);
+void *captive_Module_GetExportAddress(const gchar *ModuleName_utf8,const gchar *FunctionName);
/* reactos/ntoskrnl/ldr/loader.c file-scope global declaration: */
/* Newlines prevent their inclusion by gtk-doc. */
/* reactos/ntoskrnl/ldr/loader.c file-scope global declaration: */
NTSTATUS LdrProcessModule(PVOID ModuleLoadBase,PUNICODE_STRING ModuleName,PMODULE_OBJECT *ModuleObject);
+PVOID LdrGetExportAddress(PMODULE_OBJECT ModuleObject,char *Name,unsigned short Hint);
/* 'ntoskrnl/ldr/loader.c' file-scoped declaration: */
return g_hash_table_lookup(captive_ModuleList_function_disable_hash,ExportAddress); /* funcname */
}
+
+
+void *captive_Module_GetExportAddress(const gchar *ModuleName_utf8,const gchar *FunctionName)
+{
+MODULE_OBJECT *ModuleObject;
+void *r;
+
+ g_return_val_if_fail(ModuleName_utf8!=NULL,NULL);
+ g_return_val_if_fail(FunctionName!=NULL,NULL);
+
+ ModuleObject=LdrGetModuleObject(captive_utf8_to_UnicodeString_alloca(g_path_get_basename(ModuleName_utf8)));
+ g_return_val_if_fail(ModuleObject!=NULL,NULL);
+
+ r=LdrGetExportAddress(
+ ModuleObject, /* ModuleObject */
+ (/* de-const */char *)FunctionName, /* Name */
+ -1); /*Hint*/
+ g_return_val_if_fail(r!=NULL,NULL);
+
+ return r;
+}