Who can tell how in the console application to open the dll, in which there are some methods.
- oneopen dll is always possible through fopen :) or you just need to use the functions that are in dll? Then through LoadLibrary, as usual. - KoVadim
- The library of the StreamingMediaPlayer program is UMediaControl.dll, it has methods to manage, you need to open the library and perform a console connection and check whether the connection works without displaying messages as MSGBOX, and if not, a signal like \ a. - johnfelix
- .h or .lib file to UMediaControl.dll is there? - KoVadim
- No, but the builder opens it and you can see all the methods, the developers describe how to use it through Activex, but I don’t imagine how to do it in c ++. - johnfelix
- Stop. Is this the usual activeX? Imported to the builder? so who prevents to include in register and to create as normal object. - KoVadim
|
1 answer
In Visual C ++, this is done like this:
#include <windows.h> #include <stdio.h> typedef int (__cdecl *CALLABLE)(); int main(void) { if (HINSTANCE instance = LoadLibrary(TEXT("SomeDLL.dll"))) { if (CALLABLE callable = (CALLABLE)GetProcAddress(instance, "SomeFunc")) (callable)(); FreeLibrary(instance); } return 0; }
I think that in Borland C ++ is similar.
- Can I comment on the code? - johnfelix pm
|