File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -198,9 +198,13 @@ mod impl_ {
198
198
}
199
199
200
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.
201
+ /// # SAFETY
202
+ ///
203
+ /// The caller must ensure that the function signature matches the actual function.
202
204
/// The easiest way to do this is to add an entry to windows_sys_no_link.list and use the
203
205
/// generated function for `func_signature`.
206
+ ///
207
+ /// The function returned cannot be used after the handle is dropped.
204
208
unsafe fn get_proc_address < F > ( & self , name : & [ u8 ] ) -> Option < F > {
205
209
let symbol = unsafe { GetProcAddress ( self . 0 , name. as_ptr ( ) as _ ) } ;
206
210
symbol. map ( |symbol| unsafe { mem:: transmute_copy ( & symbol) } )
You can’t perform that action at this time.
0 commit comments