NativeLibrary.TryGetExport(IntPtr, String, IntPtr) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets the address of an exported symbol and returns a value that indicates whether the method call succeeded.
public:
static bool TryGetExport(IntPtr handle, System::String ^ name, [Runtime::InteropServices::Out] IntPtr % address);
public static bool TryGetExport (IntPtr handle, string name, out IntPtr address);
static member TryGetExport : nativeint * string * nativeint -> bool
Public Shared Function TryGetExport (handle As IntPtr, name As String, ByRef address As IntPtr) As Boolean
Parameters
- handle
-
IntPtr
nativeint
The native library OS handle.
- name
- String
The name of the exported symbol.
- address
-
IntPtr
nativeint
When the method returns, contains the symbol address, if it exists.
Returns
true
if the address of the exported symbol was found successfully; otherwise, false
.
Exceptions
handle
is Zero or name
is null
.
Remarks
This is a simple wrapper around OS calls and does not perform any name mangling.
Calling this method with a invalid handle
parameter other than IntPtr.Zero is not supported and will result in undefined behaviour.
Applies to
משוב
https://aka.ms/ContentUserFeedback.
בקרוב: במהלך 2024, נפתור בעיות GitHub כמנגנון המשוב לתוכן ונחליף אותו במערכת משוב חדשה. לקבלת מידע נוסף, ראה:שלח והצג משוב עבור