mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-08 19:48:20 +02:00
LibraryLoadCallback
This commit is contained in:
parent
2e40bab705
commit
e478462487
1 changed files with 14 additions and 2 deletions
|
@ -234,8 +234,20 @@ namespace System
|
|||
public static extern void BfDelegateTargetCheck(void* target);
|
||||
[CallingConvention(.Cdecl), AlwaysInclude]
|
||||
public static extern void* LoadSharedLibrary(char8* filePath);
|
||||
[CallingConvention(.Cdecl), AlwaysInclude]
|
||||
public static extern void LoadSharedLibraryInto(char8* filePath, void** libDest);
|
||||
[AlwaysInclude, LinkName("Beef_LoadSharedLibraryInto")]
|
||||
public static void LoadSharedLibraryInto(char8* filePath, void** libDest)
|
||||
{
|
||||
if (*libDest == null)
|
||||
{
|
||||
if (Runtime.LibraryLoadCallback != null)
|
||||
*libDest = Runtime.LibraryLoadCallback(filePath);
|
||||
}
|
||||
if (*libDest == null)
|
||||
{
|
||||
*libDest = LoadSharedLibrary(filePath);
|
||||
}
|
||||
}
|
||||
|
||||
[CallingConvention(.Cdecl), AlwaysInclude]
|
||||
public static extern void* GetSharedProcAddress(void* libHandle, char8* procName);
|
||||
[CallingConvention(.Cdecl), AlwaysInclude]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue