Ambiera ForumDiscussions, Help and Support. |
|
|
|||||
|
Hi, I'm trying to make my game.exe load a premade dll ( a registered active x ,visual studio compiled) and use its public functions. ActiveXObject is not working and raise err as undefined function in the immediate debug window. Help!
|
||||
|
ActiveXObject is an Internet Explorer API, it won't work in CopperCube. |
||||
|
wrote: ActiveXObject is an Internet Explorer API, it won't work in CopperCube. Thank you for your kind replay, Is there any way to call a dll from the engine? |
||||
|
From the way DLLs work, no it's not possible. The only way I could think of is by editing the source code to add a function that registers a DLL for use with the engine but that'd be kinda dangerous unless you took over how the DLL unloaded by yourself... plus you cant redistribute your custom build, since the studio license prohibits that... |
||||
|
wrote: From the way DLLs work, no it's not possible. The only way I could think of is by editing the source code to add a function that registers a DLL for use with the engine but that'd be kinda dangerous unless you took over how the DLL unloaded by yourself... plus you cant redistribute your custom build, since the studio license prohibits that... Inspired by your suggestion, I'm thinking of editing the source code of the exported exe (which is written in c++, and supplied within the pro edition). Is that possible? |
||||
|
I do not know C++ (which I assume CopperCube is coded in). However, I do know that programs can "register" a DLL and then use its functions, and then unregister it whenever they are told to. I also know libraries have to have exported functions as a "managed DLL" if you want to use one externally without registering it as a COM object. If you're trying to use a third party dll, make sure it has documentation (especially how to implement it into your project, like CopperCube) and that it makes a managed C++ DLL (calling .NET DLLs from C++ is possible but you must enable the Cross-Language Runtime (CLR) command-line option via Solution Options if you want to do this. This will let you import .NET classes in C++ code and let you use .NET dlls... however, I don't know how this will affect CopperCube's compile-time---like it may cause compile-time errors) with exported functions. As far as the code goes, I can't help you. My expertise now is within CopperCube's JavaScript engine... which is severely limited... |
||||
|
wrote: I do not know C++ (which I assume CopperCube is coded in). However, I do know that programs can "register" a DLL and then use its functions, and then unregister it whenever they are told to. I also know libraries have to have exported functions as a "managed DLL" if you want to use one externally without registering it as a COM object. If you're trying to use a third party dll, make sure it has documentation (especially how to implement it into your project, like CopperCube) and that it makes a managed C++ DLL (calling .NET DLLs from C++ is possible but you must enable the Cross-Language Runtime (CLR) command-line option via Solution Options if you want to do this. This will let you import .NET classes in C++ code and let you use .NET dlls... however, I don't know how this will affect CopperCube's compile-time---like it may cause compile-time errors) with exported functions. As far as the code goes, I can't help you. My expertise now is within CopperCube's JavaScript engine... which is severely limited... great details, bro .. thank you |
||||
|
I hope you are using Coppercube for Windows Platform. You should make an external app with communication to DLL File. After, this external app will unload a file with results as text file. Your project of Coppercube will make a text file to external app and external app will return the result of Dll file as text file to Coppercube. And Coppercube will read the result of text file. To create an external app you can use Visual Studio C. |
|