?????: Windows Rundll ?? Rundll32 ???????

???? ?????? ???? ??????
???? ID: 164787 - ?? ???????? ?? ?????? ??? ?? ?? ???? ???? ???? ??.
??? ?? ??????? ???? | ??? ?? ??????? ????

?? ????? ??

??????

Microsoft Windows 95, Windows 98, ?? Windows Millennium Edition (Me) ??? ?? ????-?????? ?????? ????????? rundll.exe ?? Rundll32.exe ??? ?? ?? ???? ??? DLL, 16-??? ?? 32-??? ?? ??????? ???? ??? ??? ?????? ?? ??????? ???? ?? ?????? ??? ???????, Rundll ?? Rundll32 ????????? ??? DLL ??? ?? ???? ?? ????????? ?????? ?? ??? ???? ?? ??? ???? ?????? ????? ?????? ?? ???, ?? ?? ???? ??? ???? ?? ?????? ??????????? ?? ????? ?????? DLL ?? ??????? (????????? ???????????? ???????) Win32 API ??? ??? ???? ?? ???? ??????????? ???? ???? ?? ??? DLL, ?? ?????? ??? ?? ?????? ?????? ??? ???? ?? ??? ???? ?????? ?? ??? ???? ?? ???? ?? ???? ?? ??? ???????? Windows ???????? ?????? ?? ??????? Rundll ?? Rundll32 ????????? ?? ????? ???? ?? ?? ???? ????? ?????? ????? ???

MIcrosoft Windows NT 4.0, Windows 2000 ?? Windows XP ???? Rundll32 ?? ??? ??? ?? ?? ?????????? ?? Rundll (Win16 ??????) ?? ??? ??? ?????? ???

??? ??? ?? Rundll ?? Rundll32 ???????? ????????? ???? Microsoft ?? ?????? ????? ?? ??? ??????? ??? ?? ??? ????? ?????? ?????? ?????? ?? ?? ??????????? ???????? ??????? ?? ?? ?? ??????? ????? ?? ??? ?????? ??? ??? ???? ?? Windows NT 4.0 ???? Rundll32 ???????? ????????? ?? ??? ???? ?? ???? Rundll32 ?? ?????? ???? ???

???? ???????

Rundll vs. Rundll32

Rundll ??? ?? ???? ?? ?? 16-??? DLL, whereas Rundll32 ??? ?? ???? ?? ?? ????? ?? 32-??? DLL ????? ??? Rundll ?? Rundll32 ???? ?? ??? ??? ?????? DLL ?? ???, ??? ?? ?????? ????? ?? ????? ??? ???? ????? ?? ??? ???? ?? ???? ???

Rundll ???? ??????

Rundll ?? ??? ???? ?????? ??????????? ??:
   RUNDLL.EXE <dllname>,<entrypoint> <optional arguments>
				
?? ?????? ??????????? ??:
   RUNDLL.EXE SETUPX.DLL,InstallHinfSection 132 C:\WINDOWS\INF\SHELL.INF
				
??? ???? ?????? ??? ????????????? ?? ????? ???? ?? ??? 3 ???????? ???:
  1. ??? ?? DLL ??? ???? ??? (????? ?? ??? LoadLibrary() ?????? ?? ??? ???????? ?????) ???? ??????? ?? ??? rundll ?? Rundll32 ?????? ?? ??????? ?? ???? ?? ?? ??? ?? ????? ?? ?? ????????? ???? ?? ??? DLL ???? ?? ??? ??? ????? ?? ???? ??????? ???????? ?? ??? ??? ?????? ???? ????? ???? ????????? ???? ?? ??? ???? ???? ??? ?? ????? ?? ???? ???? ??? ?? ????? ????? ??? particular ??? ???? ???? ?? ?? ?? ?? ???? ???? ??? ?? ??? "C:\Program ?????" ??????? ??? ??? DLL ??? ?????? ???? ???? ??????
  2. ???? ?? ????????? ?? ????????? ?? ?????? ????? <dllname>??? ???? ?? ???? ???? ?? Rundll ???? ?????? ??????. ??? ??? ??</dllname>
  3. ??? ???? ?????? ???, ??? ????????? (,) <dllname>?? <entrypont>?????? ??? ?? ??? ???????? ?????????? ??? ????????? ?????? ???????? ??, ??? Rundll ?? Rundll32 ??????? ?? ???? ??? ?? ?????? ????? ???? ??? ???? ?????, ???? ???? ???? ?? ???? <dllname>, ?????????, ?? <entrypoint>??????.</entrypoint></dllname> ?? ??? ??? ???? ?????? ???? ??</entrypont></dllname>

Rundll ???? ??? ????

Rundll ????????? ???? ?? ????? ????? ?? ???? ????:
  1. ?? ?????? ???? ?????? ???
  2. ?? LoadLibrary() ?????? ????????? DLL ?? ??? ???? ???
  3. ?? obtains <entrypoint>?????? ??????</entrypoint> ?? ??? GetProcAddress().
  4. ?? ??? <entrypoint>???? ?????? tail ?? ????? ??? ?? ??? ??, ?? ?????? <optional arguments="">.</optional></entrypoint>
  5. ?? <entrypoint>?????? ???? ??, ?? rundll.exe unloads DLL ?? exits.</entrypoint>

???? DLL ????? ???? ????

???? DLL ??? ????? <entrypoint>????? ?????????? ?? ??? ?????:</entrypoint>

16-??? DLL:

  void FAR PASCAL __loadds
  EntryPoint(HWND hwnd, HINSTANCE hinst, LPSTR lpszCmdLine, int nCmdShow);
				
32-??? DLL:
  void CALLBACK
  EntryPoint(HWND hwnd, HINSTANCE hinst, LPSTR lpszCmdLine, int nCmdShow);
				
???, ??? EntryPoint ?????? ?? ??? ?? ????? ???? ?? ??? ???????? ?? 3:
  1. Obviously, ???? ????????? ????? ?????? ?? ???????? ??? ?? ??? "EntryPoint" ???????????? ???? ???? ?????? ??? Rundll32 ????????? ?? ????? ???? ?? ??? ??? ?? ????? ????????? ?? ????? ??????? ????/??? ??????? 32-??? DLL ??? ?????? DllEntryPoint unrelated ???? ??? ?? ???
  2. Rundll32 ?? ??? ????????? ????? ?????? _stdcall ????? (_stdcall ??????? ?? ????? ???? ?? ??? ??????? ??????) ??? ?? ??? ????????? ???? ?????? ??? _stdcall ??????? ?? ???????? ??, ?? _cdecl ????? ??? ???? ?? ??? ?????? defaults ?? ??? ???? Rundll32 ?? ????? abnormally ?????? ?? ??? ???? ?? ????
  3. ??? ???? ?????? ????? ?? ??? _stdcall ?? ?????? ????? ???? ?????? ??, ??????? ?? ???????? ?? ????? C++ ??????? ????? ?????? ??? ??????? ??? _EntryPoint@16 ?? ??? ??? ??? DLL C ??? ???? ???? ?? ?? ????? ????? ?? ??? decoration ??? DLL C++ ??? ???? ??? ?????, Rundll ?? Rundll32 ?? ??? ???? ?????? ??? ??? ?? ?????? ??? ?? ????? ???? ?? ??? careful ?? ????? ??? ?? decorated ?? ????? ? ???? ????? ???, ??? .def ????? ?? ????? ???? ?? ????????? ????? ?????? ?? ??? ?? ??????? ????? ????? ?? ?????? ?????? ?? ???????? ?? ??? decoration ?? ???? ??????? ?? ??? ????? ???? ????? C++ compilers ?? ????? ???? ???:
    14048532-??? DLL ??? PASCAL Like ?????? ?? ??????? ????
Rundll ????????? ????? ???????? ??????????? ???:
   hwnd - window handle that should be used as the owner window for
          any windows your DLL creates
   hinst - your DLL's instance handle
   lpszCmdLine - ASCIIZ command line your DLL should parse
   nCmdShow - describes how your DLL's windows should be displayed
				
????? ?????? ??:
     RUNDLL.EXE SETUPX.DLL,InstallHinfSection 132 C:\WINDOWS\INF\SHELL.INF
				
Rundll Setupx.dll ??? InstallHinfSection() entrypoint ?????? ?? ??? ???? ?? ?? ????? ???????? ??? ????:
   hwnd = (parent window handle)
   hinst = HINSTANCE of SETUPX.DLL
   lpszCmdLine = "132 C:\WINDOWS\INF\SHELL.INF"
   nCmdShow = (whatever the nCmdShow was passed to CreateProcess)
				
????? ??? ?? ?? ?? <entrypoint>?????? (?? ??? ?????? ??? InstallHinfSection()) ?? ????? ???? ?????? (lpszCmdLine ???????? ???) ?? ????? ???? ?? ?????? ?? ??? ??? ???-??? ???????? ?? ????? ???? ?? ??? ??? Rundll.exe ?????? ???? ?? ???????? ???? ???? ???? ?????? ?? ??? ???? ??? ??? ???????? ?? ??? ??? <entrypoint>?????? ?? ??? ????? ??? </entrypoint></entrypoint>

Windows 95 ?? Windows NT ?? ??? ?? ???? ?? ????? ???

Windows NT, Windows 2000 ?? Windows XP ?? Rundll32.exe ?? ??????? ???? ????? ??, ?? ??????? ???? ????????? ???????? ???? ?? ????

Windows NT GetProcAddress <entrypoint>?? ??? ?????? ?? ??? ?????? ???? ??? ?? ????????? ????? ????? ??, ?? ?????????? assumed ???? ???? ??:</entrypoint>
   void CALLBACK
   EntryPointW(HWND hwnd, HINSTANCE hinst, LPWSTR lpszCmdLine,
               int nCmdShow);
				
?? ?? ???? ??, ANSI EntryPoint ?????? ?? lpszCmdLine ???????? ?? ??????? ???????? ?? ???

??? <entrypoint>W ????????? ????? ???? ???? ??, ?? Windows NT <entrypoint>?? ?? ??? GetProcAddress ???? ?? <entrypoint>?? ???? ??? ?? ?? ????? ??, ?? ?? ANSI ????????? ????? ???? ???? ?? ?? ??? ?????? Windows 95/98/Me. ?? ??? ??? ???? ?? ?????, ??? ?? ???? DLL ?? ????? ?? ??? Windows 95 ANSI ?????? ?? ??? ?? Windows NT/2000/XP ??????? ?????? ?? ??? ????? ???, ???? ????? ??????? ?? ??????: EntryPointW ?? EntryPoint. Windows NT/2000/????, ?? ?? ??????? ???? ?????? ?? EntryPointW ?????? ??? ???? ?? ?????; Windows 95/98/????, ?? EntryPoint ?????? ????? ?? ??? ???? ANSI ????? ???? ?? ???? </entrypoint></entrypoint></entrypoint>

???

???? ID: 164787 - ????? ???????: 03 ?????? 2010 - ??????: 3.0
???? ???? ???? ??:
  • Microsoft Win32 Application Programming Interface, ?? ???? ??? ?????? ???? ???:
    • Microsoft Windows 98 Standard Edition
    • Microsoft Windows Millennium Edition
??????: 
kbdll kbFAQ kbinfo kbkernbase kbprogramming kbusage kbmt KB164787 KbMthi
???? ?????? ????????
??????????: ?? ???? ?? ???? ??????? ?? ????? ?? Microsoft ????-?????? ?????????? ?????? ?????? ???? ??? ??. Microsoft ???? ??? ????-???????? ?? ????-???????? ????? ?????? ?? ???? ???????? ???? ?? ???? ????? ????? ??? ?? ??? ?????? ?? ???? ???? ???? ??? ????? ??. ???????, ????-???????? ???? ????? ???? ???? ???? ???. ?????, ????????, ?????-???? ?? ??????? ?? ???????? ?? ???? ???, ???? ?? ??? ?????? ???? ???? ??? ????? ??? ?? ???? ??. Microsoft ??????? ??? ???? ?? ?????? ?? ??????????, ????????? ?? ??? ?????? ?? ???? ????? ?? ???? ???????? ?? ??? ???? ????? ?? ??? ????????? ???? ??. Microsoft ????-?????? ?????????? ?? ????? ?????? ?? ?? ??? ??.
?????????? ?? ??????? ????????? ??????? ??:164787

??????????? ???

 

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