We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent abf67d7 commit 77a54a9Copy full SHA for 77a54a9
src/windows/find_tools.rs
@@ -198,9 +198,13 @@ mod impl_ {
198
}
199
200
/// Get a function pointer to a function in the library.
201
- /// SAFETY: The caller must ensure that the function signature matches the actual function.
+ /// # SAFETY
202
+ ///
203
+ /// The caller must ensure that the function signature matches the actual function.
204
/// The easiest way to do this is to add an entry to windows_sys_no_link.list and use the
205
/// generated function for `func_signature`.
206
207
+ /// The function returned cannot be used after the handle is dropped.
208
unsafe fn get_proc_address<F>(&self, name: &[u8]) -> Option<F> {
209
let symbol = unsafe { GetProcAddress(self.0, name.as_ptr() as _) };
210
symbol.map(|symbol| unsafe { mem::transmute_copy(&symbol) })
0 commit comments