Wieviele DLLs kann man mit LoadLibrary laden?
-
Ich hab in der MSDN nichts entsprechendes gefunden. Kann man unendlich DLLs mit LoadLibray laden?
-
@Glamdrink
sicher geht das... brauchst halt am besten für jede zu ladende DLL ein eigenes HINSTANCE Handle !!!
ciao veganza
-
OK, danke
-
unendlich mit sicherheit nicht. das gibt es schon begrenzungen.
-
Wie üblich ist die Anzahl durch die verfügbaren Ressourcen begrenzt.
Ich denke, das zuerst der virtuelle Adreßraum knapp wird - das hängt natürlich von den DLL's ab.
Die Anzahl der Handles ist meines Wissens nicht hart begrenzt - natürlich hält Windows für jede DLL und Prozeß ein wening "housekeeping"-Informationen, die auch etwas Speicher verbrauchen.
-
> Does anyone know what the limits are on the number of DLLs
> that can be loaded by LoadLibrary(Ex) and what in the system
> configuration determines that limit (if any)?The limit is usually the number of available TLS slots, which currently
is 64. As a rule of thumb, every copy of the C runtime needs one TLS
slot (meaning that linking all modules against a common DLL runtime is
preferable); every module with one or more __declspec(thread)
declarations occupies one more slot; plus a few for the system.