Lm th? no ? t?i ph? thu?c dll trong Internet Explorer v?i m?t INF File

D?ch tiu ? D?ch tiu ?
ID c?a bi: 165075 - Xem s?n ph?m m bi ny p d?ng vo.
Bung t?t c? | Thu g?n t?t c?


Ng?i ta th?ng c?n thi?t ? t?i ph? thu?c DLLs cng v?i m?t ActiveX Ki?m sot. i?u khi?n MFC v Visual Basic c yu c?u ny. Bi vi?t ny s? gi?i thch ba cch m b?n c th? lm i?u ny.


C ba cch ? bao g?m ph? thu?c dll trong t?i cho m?t ki?m sot. Cch th? nh?t l bao g?m cc DLL(s) trong t?p CAB cho cc ki?m sot cng v?i OCX v INF t?p tin. Nh?c i?m c?a i?u ny l r?ng cc DLL s? ?c t?i xu?ng b?t c? lc no i?u khi?n s? ?c t?i v?. Trong m?t s? tr?ng h?p, i?u ny l thch h?p. Cch ti?p theo l ? gi DLL(s) ph? thu?c trong m?t tch t?p tin CAB v ? c?p ?n trong t?p INF cho s? ki?m sot. Cc Th? ba cch c?ng gi DLL trong m?t t?p CAB ring bi?t nhng t?p CAB g?i trong t?p INF c?a i?u khi?n v?i m?t mc. S? d?ng m?t mc cho php cc t?i v? qu tr?nh ? th?c hi?n m?t t?p INF ho?c EXE ch?a trong ph? thu?c CAB t?p.

? thm m?t ph? thu?c cho m?t OCX (Simpdll.dll trong v d? ny), m?t ph?n tng t? nh ph?n cho b? i?u khi?n s? ?c thm b? ph?n [AddCode] T?p INF:
M?t ph?n sau ?c thm vo t?p INF ? ki?m sot vi?c ci ?t cc DLL:
y l cch ?u tin ? c?p ?n bao g?m m?t s? ph? thu?c c?a DLL trong m?t download.

Bao g?m DLL trong m?t t?p tin ring bi?t CAB, t?t c? nh?ng g? l c?n thi?t l ? thay ?i v? tr t? "thiscab" vo URL m ph? thu?c vo CAB s? ?c v? tr:
Trong tr?ng h?p ny, Simpdll.cab ch?a ch? simpdll.dll.

Nhi?u DLLs c th? ?c thm vo t?p INF v CAB ? trn n?u c?n thi?t.

Cch th? ba ? gi ph? thu?c DLLs l ? ch? ph? thu?c c?a DLL CAB t?p tin b?ng cch s? d?ng m?t mc. V?i k? thu?t ny, m?t INF ho?c EXE file trong cc CAB ph? thu?c c th? ?c th?c hi?n vo t?i v?.

Cc ph?n sau y t? m?t t?p tin Inf. ki?m sot t?i DLL ph? thu?c cho MFC i?u khi?n:



Trong tr?ng h?p ny, MFC DLLs ?c ng gi trong m?t file exe self-extracting, m ?c ch?a trong t?p tin .cab (mfc42.cab). Tuy nhin, cc cng c? ? lm cho self-Extracting exe t?p ny khng c s?n t? Microsoft. V? v?y, b?n s? ho?c l c?n thi?t ? gi ph? thu?c DLLs v?i t?p inf ho?c tham kh?o t?p inf mc ci ?t:
Ho?c, b?n s? c?n ph?i xy d?ng m?t t? gi?i nn file EXE s? d?ng bn th? ba cng c?.

? minh h?a, sau y l t?p inf dng ? ci ?t ph? thu?c MFC DLLs. B?n c th? s?a ?i ny ? ci ?t DLLs ring c?a b?n trong cng m?t cch r?ng MFC DLLs ?c ci ?t.
   ; ========================= Mfc42.inf =========================

   ; This file will control the download of the MFC 4.2 DLLs

   ; version signature (same for both NT and Win95) do not remove

   ; This section specifies that all sources are in the "default"
   ; location.

   ; Default section to process and copy all files under the section
   ; mfcdllsx.files and Register DLLs under the section mfcdllsx.register.

   ; Destination Directories for CopyFiles Sections.
   ; 11 indicates LDID_SYS - system directory

   ; ,,,32 - Suppress version conflict dialog and don't overwrite newer
   ; DLLs

   ; msvcrt.dll is not self registering

   ; ====================== Mfc42.inf ======================
M?t DLL c?n ph?i ?c li?t k trong ph?n .register n?u n xu?t kh?u m?t EFS ch?c nng. i?u ny c th? ?c xc ?nh b?ng cch ki?m tra DLL v?i tr?nh bin d?ch Visual C Dumpbin.exe ti?n ch. B?n c?ng c th? ch?y Regsvr32 ngy DLL, c? g?ng ? ng k? DLL. Regsvr32 t?i DLL, xc minh r?ng DllRegisterServer ng ?c xu?t kh?u b?ng cch g?i GetProcAddress() vo ch?c nng DLLRegisterServer. N?u n ? thnh cng, cc ch?c nng DllRegisterServer xu?t kh?u v sau ?c g?i l.

H?y c?n th?n, tuy nhin, r?ng ch?y Regsvr32 trn DLL c th? undesirable tc d?ng ph?. Khi DllRegisterServer ?c g?i l, n lm cho thch h?p m?c ng k? ch? t?i v? tr DLL trn my tnh ny. V d?, g? nh sau trong m?t d?u nh?c MS-DOS, cho cc m?c ch ki?m tra, c th? gy v?n ?:
   copy mfc42.dll C:\Test
   run "D:\msdev\bin\REGSVR32.EXE C:\Test\mfc42.dll"
   delete mfc42.dll
Sau khi h? th?ng c? g?ng t?m Mfc42.dll, n trng cc c quan ng k?, th?y r?ng t?p tin l nh x? t?i C:\Test\Mfc42.dll, v khng t?m th?y n ? . Ch?y Regsvr32 vo m?t t?p tin ? ?c ci ?t trn m?t my khng gy ra v?n ?.

Ci ?t m?t DLL v?i m?t mc v m?t t? extracting EXE l h?u ch cho cc l? do sau y: N?u m?t DLL c?n ph?i ?c nng c?p ? ?c n?p trong nh?, t?i v? s? khng thnh cng. y l m?t v?n ? ?c bi?t ?n, m ? c? ?nh trong Internet Explorer phin b?n 4.0. Internet Explorer 4.0 s? ? ngh? m?t kh?i ?ng l?i v n?p DLL m?i trong th?i gian kh?i ?ng l?i.


? bi?t thm chi ti?t, xin vui l?ng xem cc bi vi?t sau trong c s? ki?n th?c Microsoft:
167158 Lm th? no ? gi MFC Controls ? s? d?ng trn Internet
167597 Ch? ?nh FileVersion v #Version ? t?i v? thnh ph?n

? bi?t thm chi ti?t, xem Webcast sau y:
Internet thnh ph?n t?i v? lm vi?c nh th? no?

Thu?c tnh

ID c?a bi: 165075 - L?n xem xt sau cng: 28 Thang Chin 2011 - Xem xt l?i: 3.0
p d?ng
  • Windows Internet Explorer 8
  • Windows Internet Explorer 8 on Windows Server
T? kha:
kbcode kbdownload kbfaq kbhowto kbmt KB165075 KbMtvi
My d?ch
QUAN TRONG: Bi vi?t ny ?c d?ch b?ng ph?n m?m d?ch my c?a Microsoft ch? khng ph?i do con ng?i d?ch. Microsoft cung c?p cc bi vi?t do con ng?i d?ch v c? cc bi vi?t do my d?ch ? b?n c th? truy c?p vo t?t c? cc bi vi?t trong C s? Ki?n th?c c?a chng ti b?ng ngn ng? c?a b?n. Tuy nhin, bi vi?t do my d?ch khng ph?i lc no c?ng hon h?o. Lo?i bi vi?t ny c th? ch?a cc sai st v? t? v?ng, c php ho?c ng? php, gi?ng nh m?t ng?i n?c ngoi c th? m?c sai st khi ni ngn ng? c?a b?n. Microsoft khng ch?u trch nhi?m v? b?t k? s? thi?u chnh xc, sai st ho?c thi?t h?i no do vi?c d?ch sai n?i dung ho?c do ho?t ?ng s? d?ng c?a khch hng gy ra. Microsoft c?ng th?ng xuyn c?p nh?t ph?n m?m d?ch my ny.
Nh?p chu?t vo y ? xem b?n ti?ng Anh c?a bi vi?t ny:165075

Cung cp Phan hi


Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com