   C++: Calling DLL
  I'm attempting to call functions from a DLL. How would I go about doing this in Visual Studio 2005 with C++ (Win32 console Application)? After some reading I'm under the impression that I can't use the same method for calling a DLL with a Win32 Console application as with a CLR Console application. Is this actually the case? All of the example I've found seem to only work with the CLR Console method.Any guidance would be appreciated!   
  What kind of DLL are you intending to call? Native? CLR? CLR? COM? Mixed?It's possible to call any of those from either C++ or C++/CLR, but we'll need to know which combination you're using.   ;  You're probably looking for LoadLibrary and GetProcAddress. At the top of my head, the most simple usage would be:typedef int (*AwesomeFunction)(int);int WINAPI WinMain(...){  HMODULE awesomeLibrary = LoadLibrary("AwesomeLibrary.dll");  AwesomeFunction function = GetProcAddress(awesomeLibrary, "FunctionName");  int x = function(55);}That code is untested though, but I think it would work.   ;Quote:Original post by NitageWhat kind of DLL are you intending to call? Native? CLR? CLR? COM? Mixed?It's possible to call any of those from either C++ or C++/CLR, but we'll need to know which combination you're using.My plan is to port a Delphi class to a DLL. My original class has property accessor methods and functions. This means that the DLL will have to do more than function calls. Probably instantiation too. Could this be limited by DLLs?   ;  If you use static linking then it is very simple but my guess is you need to load the dll dynamically, i.e. LoadLibrary.There is no limitation. In short what you need to do is define abstract interface classes for the classes that need to be instantiated. Then you define and export a function that creates an instance. The interface definitions are included in both the dll as well as the executable project. Now it sounds as though you want a Delphi dll and use it in C++. I don't know if this can be done in as nice a fashion as stated above.;  Thanks! Yes that's exactly what I'm doing your spot on! My original Delphi application supports writing to a file (because its a logging class) so I'm hoping that I can do the same when I convert it to a DLL. My main goal is to be able to call this Logging DLL from other languages (C/C++, Java, C#...)   