- Home /
Problem with dll plugin
Hi, I'm trying to create a plugin to use in Unity3d, my plugin is importing another dll from the provider.
When i use the dll of the provider on a win32 application works fine, so something i'm doing wrong, on the win32 app the documentation from the provider says that i need to call CoInitialize before initializing the variables on my app then once initialized i can call the methods of the dll.
Now i'm trying to use this dll on unity so i create a dll like on the documentation of unity3d says, but without success, my two questions: First: Is ok to use CoInitialize on my dll, or i need to handle that different?
Second: Once how can i manage global variables on a dll, because on the win32 app first i declare my variables, then i call CoInitialize, then i initialize my variables with "__uuidof" because the documentation of the provider says that i need to initialize the variables like this. Then i use the methods of this variables on differents methods that i declare on the app.
The provider no longer exist, so i can't contact them, so if any one knows how i need to proceed to make this work on unity3d, i will thankful.
So, just to clarify: Are you talking about a native, win32 dll? How are you trying to use it / where did you call CoInitialize()?
i´m talking about a win32 dll, the CoInitialize i used on a example console app to initialize CO$$anonymous$$ before using the dll (the dll of the provider)functions, but i want to use the dll from unity, so i think i need to make a another dll to wrap the methods of the dll that the provider gave to me.
Your answer
![](https://koobas.hobune.stream/wayback/20220613084016im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
How to link to scripts in the Package Manager when building a dll. 0 Answers
"DllNotFoundException: htmlTexture" How to let Unity find the DLL? 0 Answers
How do you use a class from a .dll file? 1 Answer
EntryPointNotFoundException, when trying to import DLL. Help please :) 1 Answer
introducing "safe" DLL causes internal compiler error 0 Answers