1- use winapi:: {
2- shared:: { guiddef:: * , minwindef:: * , windef:: * } ,
3- um:: {
4- minwinbase:: * ,
5- processthreadsapi:: * ,
6- winnt:: { INT , * } ,
7- } ,
8- } ;
1+ use winapi:: shared:: minwindef:: * ;
2+ use winapi:: um:: winnt:: * ;
3+ use winapi:: um:: winnt:: { INT } ;
4+ use winapi:: um:: minwinbase:: * ;
5+ use winapi:: um:: processthreadsapi:: * ;
6+ use winapi:: shared:: guiddef:: * ;
7+ use winapi:: shared:: windef:: * ;
98
109#[ repr( C ) ]
1110#[ derive( Debug , Copy , Clone ) ]
1211pub struct _DETOUR_TRAMPOLINE {
1312 _unused : [ u8 ; 0 ] ,
1413}
1514pub type PDETOUR_TRAMPOLINE = * mut _DETOUR_TRAMPOLINE ;
16- # [ doc = " Binary Typedefs." ]
15+ /// Binary Typedefs.
1716pub type PF_DETOUR_BINARY_BYWAY_CALLBACK = :: std:: option:: Option <
18- unsafe extern "system" fn ( pContext : PVOID , pszFile : LPCSTR , ppszOutFile : * mut LPCSTR ) -> BOOL ,
17+ unsafe extern "system" fn (
18+ pContext : PVOID ,
19+ pszFile : LPCSTR ,
20+ ppszOutFile : * mut LPCSTR ,
21+ ) -> BOOL ,
1922> ;
2023pub type PF_DETOUR_BINARY_FILE_CALLBACK = :: std:: option:: Option <
2124 unsafe extern "system" fn (
@@ -36,8 +39,9 @@ pub type PF_DETOUR_BINARY_SYMBOL_CALLBACK = ::std::option::Option<
3639 ppszOutSymbol : * mut LPCSTR ,
3740 ) -> BOOL ,
3841> ;
39- pub type PF_DETOUR_BINARY_COMMIT_CALLBACK =
40- :: std:: option:: Option < unsafe extern "system" fn ( pContext : PVOID ) -> BOOL > ;
42+ pub type PF_DETOUR_BINARY_COMMIT_CALLBACK = :: std:: option:: Option <
43+ unsafe extern "system" fn ( pContext : PVOID ) -> BOOL ,
44+ > ;
4145pub type PF_DETOUR_ENUMERATE_EXPORT_CALLBACK = :: std:: option:: Option <
4246 unsafe extern "system" fn (
4347 pContext : PVOID ,
@@ -67,7 +71,7 @@ pub type PF_DETOUR_IMPORT_FUNC_CALLBACK_EX = ::std::option::Option<
6771> ;
6872pub type PDETOUR_BINARY = * mut :: std:: os:: raw:: c_void ;
6973unsafe extern "system" {
70- # [ doc = " Transaction APIs." ]
74+ /// Transaction APIs.
7175 pub fn DetourTransactionBegin ( ) -> LONG ;
7276}
7377unsafe extern "system" {
@@ -110,7 +114,7 @@ unsafe extern "system" {
110114 pub fn DetourSetSystemRegionUpperBound ( pSystemRegionUpperBound : PVOID ) -> PVOID ;
111115}
112116unsafe extern "system" {
113- # [ doc = " Code Functions." ]
117+ /// Code Functions.
114118 pub fn DetourFindFunction ( pszModule : LPCSTR , pszFunction : LPCSTR ) -> PVOID ;
115119}
116120unsafe extern "system" {
@@ -138,7 +142,7 @@ unsafe extern "system" {
138142 pub fn DetourIsFunctionImported ( pbCode : PBYTE , pbAddress : PBYTE ) -> BOOL ;
139143}
140144unsafe extern "system" {
141- # [ doc = " Loaded Binary Functions." ]
145+ /// Loaded Binary Functions.
142146 pub fn DetourGetContainingModule ( pvAddr : PVOID ) -> HMODULE ;
143147}
144148unsafe extern "system" {
@@ -174,7 +178,11 @@ unsafe extern "system" {
174178 ) -> BOOL ;
175179}
176180unsafe extern "system" {
177- pub fn DetourFindPayload ( hModule : HMODULE , rguid : * const GUID , pcbData : * mut DWORD ) -> PVOID ;
181+ pub fn DetourFindPayload (
182+ hModule : HMODULE ,
183+ rguid : * const GUID ,
184+ pcbData : * mut DWORD ,
185+ ) -> PVOID ;
178186}
179187unsafe extern "system" {
180188 pub fn DetourFindPayloadEx ( rguid : * const GUID , pcbData : * mut DWORD ) -> PVOID ;
@@ -186,7 +194,7 @@ unsafe extern "system" {
186194 pub fn DetourFreePayload ( pvData : PVOID ) -> BOOL ;
187195}
188196unsafe extern "system" {
189- # [ doc = " Persistent Binary Functions." ]
197+ /// Persistent Binary Functions.
190198 pub fn DetourBinaryOpen ( hFile : HANDLE ) -> PDETOUR_BINARY ;
191199}
192200unsafe extern "system" {
@@ -213,7 +221,10 @@ unsafe extern "system" {
213221 ) -> PVOID ;
214222}
215223unsafe extern "system" {
216- pub fn DetourBinaryDeletePayload ( pBinary : PDETOUR_BINARY , rguid : * const GUID ) -> BOOL ;
224+ pub fn DetourBinaryDeletePayload (
225+ pBinary : PDETOUR_BINARY ,
226+ rguid : * const GUID ,
227+ ) -> BOOL ;
217228}
218229unsafe extern "system" {
219230 pub fn DetourBinaryPurgePayloads ( pBinary : PDETOUR_BINARY ) -> BOOL ;
@@ -238,7 +249,7 @@ unsafe extern "system" {
238249 pub fn DetourBinaryClose ( pBinary : PDETOUR_BINARY ) -> BOOL ;
239250}
240251unsafe extern "system" {
241- # [ doc = " Create Process & Load Dll." ]
252+ /// Create Process & Load Dll.
242253 pub fn DetourFindRemotePayload (
243254 hProcess : HANDLE ,
244255 rguid : * const GUID ,
@@ -402,8 +413,11 @@ unsafe extern "system" {
402413 ) -> BOOL ;
403414}
404415unsafe extern "system" {
405- pub fn DetourUpdateProcessWithDll ( hProcess : HANDLE , rlpDlls : * mut LPCSTR , nDlls : DWORD )
406- -> BOOL ;
416+ pub fn DetourUpdateProcessWithDll (
417+ hProcess : HANDLE ,
418+ rlpDlls : * mut LPCSTR ,
419+ nDlls : DWORD ,
420+ ) -> BOOL ;
407421}
408422unsafe extern "system" {
409423 pub fn DetourUpdateProcessWithDllEx (
@@ -440,5 +454,10 @@ unsafe extern "system" {
440454 pub fn DetourIsHelperProcess ( ) -> BOOL ;
441455}
442456unsafe extern "system" {
443- pub fn DetourFinishHelperProcess ( arg1 : HWND , arg2 : HINSTANCE , arg3 : LPSTR , arg4 : INT ) ;
457+ pub fn DetourFinishHelperProcess (
458+ arg1 : HWND ,
459+ arg2 : HINSTANCE ,
460+ arg3 : LPSTR ,
461+ arg4 : INT ,
462+ ) ;
444463}
0 commit comments