Dynamic Link Library, lossis DLL cov ntaub ntawv, yog lub hauv paus tseem ceeb ntawm kev ua haujlwm Windows ib txwm muaj. Cov ntaub ntawv no tau siv los ntawm txoj haujlwm kom tau txais cov haujlwm ntxiv thiab cov tsev qiv ntawv yam tsis tas yuav tsum tau teeb tsa hauv qhov program nws tus kheej. Feem ntau, DLL cov ntaub ntawv tau sib qhia ntawm cov haujlwm sib txawv. Rau cov neeg siv feem ntau, DLLs khiav hauv keeb kwm yav dhau, thiab koj tsis tshua muaj kev cuam tshuam nrog cov ntaub ntawv no. Txawm li cas los xij, qee zaum koj yuav xav tau sau npe DLL txhawm rau txhawm rau txhim kho koj li program kom ua haujlwm tau zoo. Yog tias koj txaus siab rau coding, tshawb nrhiav yuav ua li cas thiaj tsim DLLs kuj tseem tuaj yeem piav qhia koj qhov kev nkag siab.
Kauj ruam
Txoj Kev 1 ntawm 2: Siv DLL Cov Ntaub Ntawv
Kauj Ruam 1. Nkag siab tias DLL cov ntaub ntawv yog dab tsi
DLL (lub tsev qiv ntawv txuas txuas txuas) yog Windows cov ntaub ntawv uas siv los ntawm cov haujlwm los hu ua haujlwm tam sim no. Yeej, lawv tso cai rau Windows thiab lwm cov haujlwm los ua lawv txoj haujlwm yam tsis tas yuav muaj cov haujlwm ntawd.
DLL cov ntaub ntawv yog ib feem tseem ceeb ntawm Windows lub cajmeem, thiab ua cov haujlwm kom zoo dua qub thiab ua haujlwm tau zoo dua
Kauj Ruam 2. Nco ntsoov tias tus neeg siv nruab nrab tsis tas yuav qhib lossis cuam tshuam nrog DLL cov ntaub ntawv
Rau cov neeg siv feem ntau, cov ntaub ntawv DLL yuav nyob hauv keeb kwm yav dhau. Qhov kev zov me nyuam yuav teeb tsa thiab hu lawv ncaj qha, thiab txav cov ntaub ntawv tuaj yeem ua teeb meem loj hauv lub khoos phis tawj.
- Qee zaum thaum txhim kho cov phiaj xwm tsim hauv zej zog, koj yuav raug hais kom muab cov ntawv DLL tso rau hauv ib qho chaw tshwj xeeb. Nco ntsoov tias koj ntseeg txoj haujlwm ua ntej ua raws cov lus qhia no, vim DLL cov ntaub ntawv tuaj yeem ua rau muaj kev phom sij.
- Yog tias koj xav kawm paub yuav tsim DLL cov ntaub ntawv li cas, saib ntu tom ntej.
Kauj Ruam 3. Sau npe DLL tshiab
Yog tias koj yuav tsum luam theej tawm DLL cov ntaub ntawv rau hauv daim nplaub tshev lossis cov haujlwm kom siv, koj yuav tsum sau npe nws hauv Windows Registry ua ntej siv cov ntawv. Xa mus rau cov lus qhia hauv qhov program txhawm rau txiav txim siab seb koj puas yuav tsum ua cov kauj ruam no (qhov no tsis tshua muaj tshwm sim rau feem ntau cov khoos phis tawj Windows).
- Qhib Command Prompt. Koj tuaj yeem pom nws hauv Start menu lossis los ntawm nias Win+R thiab ntaus cmd. Nkag mus rau qhov chaw ntawm koj cov ntaub ntawv DLL tshiab.
- Yog tias koj tab tom siv Windows 7 lossis tom qab, qhib lub nplaub tshev uas muaj cov ntaub ntawv DLL tshiab, tuav Shift thiab nyem-nyem rau hauv daim nplaub tshev, thiab xaiv "Qhib qhov rai hais kom ua ntawm no". Command Prompt yuav qhib tam sim ntawd hauv cov ntawv ntawd.
- Ntaus regsvr32 dllname.dll thiab nias Enter. Qhov no yuav ntxiv cov ntaub ntawv DLL rau Windows Registry.
- Ntaus regsvr32 -u dllname.dll kom tshem DLL cov ntaub ntawv los ntawm Windows Registry.
Txoj Kev 2 ntawm 2: Decompile DLL File
Kauj Ruam 1. Rub tawm thiab teeb tsa lub decompiler
"Decompiler" yog ib qhov program uas tso cai rau koj saib cov cai siv los tsim cov ntaub ntawv lossis cov haujlwm, qhov no yog DLL cov ntaub ntawv. Txhawm rau pom cov cai uas ua rau DLL cov ntaub ntawv ua haujlwm, koj yuav tsum siv lub decompiler tig cov ntaub ntawv rov qab rau hauv cov lej nyeem tau. Qhib DLL cov ntaub ntawv yam tsis muaj tus decompiler (xws li qhib nws nrog Notepad) yuav tso tawm qhov tsis txaus ntseeg ntawm cov cim uas nyeem tsis tau.
dotPeek yog ib qho ntawm cov neeg nyiam decompilers dawb. Qhov no tuaj yeem pom ntawm jetbrains.com/decompiler/
Kauj Ruam 2. Qhib DLL cov ntaub ntawv hauv koj lub decompiler
Yog tias koj siv dotPeek, nyem "Cov Ntaub Ntawv" → "Qhib" tom qab ntawv xaub mus rau DLL cov ntawv koj xav decompile. Koj tuaj yeem tshawb xyuas cov ntsiab lus ntawm DLL cov ntaub ntawv yam tsis cuam tshuam rau koj li kab ke.
Kauj Ruam 3. Siv "Assembly Explorer" los tshawb nrhiav cov nodes ntawm DLL cov ntaub ntawv
DLL cov ntaub ntawv yog ua los ntawm "nodes," lossis cov qauv ntawm cov cai uas ua haujlwm ua ke los ua tag nrho cov ntaub ntawv DLL. Koj tuaj yeem nthuav tawm txhua lub node kom pom dab tsi subnodes nws yuav muaj.
Kauj Ruam 4. Nyem ob npaug rau ntawm qhov kom pom nws cov cai
Cov cai rau ntawm qhov koj tau xaiv yuav tshwm nyob rau hauv kab sab xis ntawm dotPeek. Koj tuaj yeem xauj cov cai los tshuaj xyuas nws. dotPeek yuav tso tawm cov cai hauv C#, lossis nws yuav rub cov tsev qiv ntawv ntxiv yog li koj tuaj yeem pom cov cai los ntawm thawj qhov chaw.
Yog tias lub node xav tau cov tsev qiv ntawv ntxiv los saib, dootPeek yuav sim rub lawv ncaj qha
Kauj Ruam 5. Tau txais kev qhia meej rau cov lej sib txawv
Yog tias koj hla tus lej ntu uas koj tsis nkag siab, koj tuaj yeem siv Cov Ntawv Cuam Tshuam Ntiag Tug kom pom tias cov lus txib ua li cas.
- Muab koj tus cursor hla tus lej kab ntawv koj xav nrhiav kab lus rau hauv Code Code tus ncej.
- Nias Ctrl+Q kom thauj cov ntaub ntawv ceev qhov rai.
- Ua raws cov kab txuas kom paub ntau ntxiv txog txhua yam ntawm txoj cai koj tab tom tshawb fawb.
Kauj Ruam 6. Export cov cai rau Visual Basic
Yog tias koj xav tswj hwm, kho, thiab tsim koj tus kheej cov ntaub ntawv, koj tuaj yeem xa lawv mus rau Visual Studio. Cov lej xa tawm yuav nyob hauv C#, txawm hais tias nws tau xub sau ua lwm hom lus.
- Right-click DLL cov ntaub ntawv hauv Assembly Explorer.
- Xaiv "Export rau Project"
- Xaiv koj qhov kev xaiv xa tawm. Koj tuaj yeem muaj txoj haujlwm qhib tam sim ntawd hauv Visual Studio yog tias koj xav kom cov ntaub ntawv khiav hauv qhov haujlwm tam sim ntawd.
Kauj Ruam 7. Kho qhov chaws hauv Visual Studio
Thaum koj qhov project tau rub tawm hauv Visual Studio, koj yuav muaj kev tswj hwm tag nrho kev kho thiab tsim DLL cov ntaub ntawv ntawm koj tus kheej tsim. Nyem rau qhov no kom ntxaws qhia yuav siv Visual Studio li cas.