[CBuilder]DLL´s einbinden

Nun ja da gibts zwei methoden Laufzeit und Entwicklung (oder so änlich)
Für Laufzeit benötigt man Loadlibrary, aber wie man das benutzen muss weiß ich nicht. :confused:
und für Entwieklung hab ich auch nur das hier gefunden:

A Windows DLL can be used in a C++Builder application just as it would be in any C++ application.
To statically load a DLL when your C++Builder application is loaded, link the import library file for that DLL into your C++Builder application at link time. To add an import library to a C++Builder application, choose Project|Add to Project and select the .LIB file you want to add.
The exported functions of that DLL then become available for use by your application. Prototype the DLL functions your application uses with the __declspec (dllimport) modifier:

__declspec(dllimport) return_type imported_function_name(parameters);

To dynamically load a DLL during the run of a C++Builder application, include the import library, just as you would for static loading, and set the delay load linker option on the Project|Options|Advanced Linker tab. You can also use the Windows API function LoadLibrary() to load the DLL, then use the API function GetProcAddress() to obtain pointers to the individual functions you want to use.
Additional information on using DLLs can be found in the Microsoft¨ Win32 SDK Reference.
 
Zuletzt bearbeitet:
Wenn du die DLL nicht mit LoadLibrary laden willst:

Es kommt darauf an, ob die Dll mit C++Builder oder
mit Visual C++ compiliert wurde. Zweiteres erfordert
einen zusätzlichen Schritt. Du mußt dir mit dem Borland-
Tool IMPLIB ein .lib bauen, näheres findest du in der Hilfe.

Diese kannst du dann ganz normal zu deinem Programm
linken.

Greets
BadMourning
 
Zurück