rundll32.exe传入参数
2019獨角獸企業重金招聘Python工程師標準>>>
procedure test1(hwnd:THandle; // handle to owner windowhinst:THandle; // instance handle for the DLLlpCmdLine:PChar; // string the DLL will parsenCmdShow:Integer // show state);stdcall; beginMessageBoxA(0,lpCmdLine,'fdsfds',MB_OK); end;exportstest1;運行命令:
rundll32 test.dll,test1 123Rundll32
The Run DLL utility (Rundll32.exe) included in Windows enables you to call functions exported from a 32-bit DLL. These functions must have the following syntax:
void CALLBACK EntryPoint(
? HWND hwnd,??????? // handle to owner window
? HINSTANCE hinst,? // instance handle for the DLL
? LPTSTR lpCmdLine, // string the DLL will parse
? int nCmdShow????? // show state
);
Note that EntryPoint is a placeholder for the actual function name. For a list of possible show states, see WinMain.
The following is the command-line syntax for Rundll32:
rundll32 DllName,FunctionName [Arguments]
DllName
Specifies the name of the DLL. The name cannot contain spaces, commas, or quotation marks. The utility searches for the DLL using the search criteria documented for the LoadLibrary function. Therefore, it is best to use the short name and provide a full path for the DLL.
FunctionName
Specifies the name of the function to call in DllName. Requires a comma (without no spaces) between DllName and FunctionName.
Arguments
Optional arguments for FunctionName.
Rundll32 loads the specified DLL using LoadLibrary, obtains the address of the function using the GetProcAddress function, and calls the function with the specified arguments, if any. When the function returns, Rundll32 unloads the DLL and exits.
Windows NT/2000: It is possible to create a Unicode version of the function. Rundll32 first tries to find a function named EntryPointW. If it cannot find this function, it tries EntryPointA, then EntryPoint. To create a DLL that supports ANSI on Windows 95/98/Me and Unicode otherwise, export two functions: EntryPointW and EntryPoint.
?
轉載于:https://my.oschina.net/u/1777508/blog/1924367
總結
以上是生活随笔為你收集整理的rundll32.exe传入参数的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: Clouda试玩
- 下一篇: 你无法访问计算机,计算机无法访问,您可能