日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當(dāng)前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

Rundll32

發(fā)布時(shí)間:2023/12/18 编程问答 28 豆豆
生活随笔 收集整理的這篇文章主要介紹了 Rundll32 小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.

Rundll32
這個(gè)運(yùn)行DLL的實(shí)用工具(Rundll32.exe)是包含在Windows中的,它能讓你去調(diào)用從一個(gè)32位DLL中導(dǎo)出的函數(shù)。但是那些被調(diào)用的函數(shù)必須遵循以下語法規(guī)則:

void CALLBACK EntryPoint(
? HWND hwnd,??????? // 父窗口的句柄
? HINSTANCE hinst,? // DLL的實(shí)例句柄
? LPTSTR lpCmdLine, // DLL將要解析的字符串
? int nCmdShow????? // 顯示狀態(tài)
);
請注意那個(gè)EntryPoint僅僅是一個(gè)為了表示真實(shí)函數(shù)名的一個(gè)占位符。對于一系列可能的顯示狀態(tài),請參見WinMain。

下面是Rundll32在命令行下的語法:
rundll32 DllName,FunctionName [Arguments]
DllName?
指定這個(gè)DLL的名字。這個(gè)名字不能包含空格,逗號,或引號。這個(gè)實(shí)用工具為了LoadLibrary這個(gè)函數(shù),將會(huì)用搜索標(biāo)準(zhǔn)文件記錄的方式來搜索這個(gè)DLL。因此,對于這個(gè)DLL,最好使用短文件名并且提供一個(gè)完整路徑。
FunctionName?
指定這個(gè)在DllName中被調(diào)用的函數(shù)的名字。要求在DllName和FunctionName之間有一個(gè)逗號(不帶任何空格)。
Arguments?
對于FunctionName的可選參數(shù)。
Rundll32使用LoadLibrary來載入這個(gè)指定的DLL,使用GetProcAddress函數(shù)來獲取函數(shù)地址,然后帶著這個(gè)指定的參數(shù)(如果有這個(gè)參數(shù)的話)去調(diào)用函數(shù)。當(dāng)這個(gè)函數(shù)返回時(shí),Rundll32將卸載這個(gè)DLL并退出。

Windows NT/2000:為這個(gè)函數(shù)創(chuàng)建一個(gè)Unicode版本是可能的。Rundll32首先嘗試去查找一個(gè)命名為EntryPointW的函數(shù)。如果無法找到該函數(shù),則會(huì)接著嘗試EntryPointA,再然后是EntryPoint。為了創(chuàng)建一個(gè)在Windows 95/98/Me上支持ANSI和Unicode的DLL,需要導(dǎo)出兩個(gè)函數(shù):EntryPointW和EntryPoint。

?

---------------------------------------------------以下是原文---------------------------------------------------

?

Rundll32
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.

?

總結(jié)

以上是生活随笔為你收集整理的Rundll32的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網(wǎng)站內(nèi)容還不錯(cuò),歡迎將生活随笔推薦給好友。