Thema: Delphi DLL starten

Einzelnen Beitrag anzeigen

Benutzerbild von sakura
sakura

Registriert seit: 10. Jun 2002
Ort: München
11.412 Beiträge
 
Delphi 11 Alexandria
 
#3
  Alt 28. Mär 2003, 08:43
Geht schon. Dazu liefert Windows die Programme rundll und rundll32 aus.

Zitat von MSDN:
Rundll vs. Rundll32
Rundll loads and runs 16-bit DLLs, whereas Rundll32 loads and runs 32-bit DLLs. If you pass the wrong type of DLL to Rundll or Rundll32, it may fail to run without indicating any error messages.
Rundll command line
The command line for Rundll is as follows:
RUNDLL.EXE <dllname>,<entrypoint> <optional arguments>
An example is as follows:
RUNDLL.EXE SETUPX.DLL,InstallHinfSection 132 C:\WINDOWS\INF\SHELL.INF
There are 3 issues to consider carefully in the above command line:
  1. Rundll or Rundll32 search for the given DLL filename in the standard places (see the documentation for the LoadLibrary() function for details). It is recommended that you provide a full path to the DLL to ensure that the correct one is found. For best results, use the short file name instead of the long file name to ensure that no illegal characters will appear. Note in particular that this means a DLL in the "C:\Program Files" folder should be converted to its short name.
  2. The <dllname> may not contain any spaces or commas or quotation marks. This is a limitation in the Rundll command line parser.
  3. In the above command line, the comma (,) between the <dllname> and the <entrypont> function name is extremely important. If the comma separator is missing, Rundll or Rundll32 will fail without indicating any errors. In addition, there cannot be any white spaces in between the <dllname>, the comma, and the <entrypoint> function.
......
Daniel W.
Ich bin nicht zurück, ich tue nur so
  Mit Zitat antworten Zitat