GetCodeForDllCanUnloadNow
更新:2007 年 11 月
取得卸載 DLL 的正確程式碼。
function GetCodeForDllCanUnloadNow( nLineStart, nLineEnd );
參數
nLineStart
函式的起始行號 (行號以零開始)。nLineEnd
函式的結束行號 (行號以零開始)。
傳回值
包含卸載 DLL 程式碼的字串。
備註
呼叫此成員函式以取得卸載 DLL 的正確程式碼。呼叫這個函式會串連您所指定的陣列元素來建立一個單一字串。
下表顯示卸載 DLL 的程式碼。
行號 |
程式碼 |
---|---|
0 |
|
1 |
|
2 |
|
3 |
|
GetCodeForDllCanUnloadNow 會在傳回的每一行加上前置定位鍵 (\t) 和結尾的 "CR-LF" (歸位換行) 字元組 (\r\n)。
範例
// Get the lines numbered 1 and 2 above
GetCodeForDllCanUnloadNow(1, 2)
// returns the following string
// "\tif (_AtlModule.GetLockCount() > 0)\r\n\t\treturn S_FALSE;\r\n"