S
Steven Blair
Hi,
I have a requirement to use an ocx file in my c#.
If I add the registered control through the toolbar in a Windows form, i
can easily use the object. Visual Studio creates a File in the
References called AxNameLib and I use this like any other object.
However, I need to be able to do the same thing from a dll.
I added the newly created file into a DLL but when I attempt to run the
library I get the following error:
ActiveX control 'b92e478a-add0-40b5-895e-f0d95c81609c' cannot be
instantiated because the current thread is not in a single-threaded
apartment.
If this is not possible to be run in a dll, do you think it would be
possible for me create an instance of the form from my DLL (not
displaying) and access it this way?
Thanks in advance,
Steven
I have a requirement to use an ocx file in my c#.
If I add the registered control through the toolbar in a Windows form, i
can easily use the object. Visual Studio creates a File in the
References called AxNameLib and I use this like any other object.
However, I need to be able to do the same thing from a dll.
I added the newly created file into a DLL but when I attempt to run the
library I get the following error:
ActiveX control 'b92e478a-add0-40b5-895e-f0d95c81609c' cannot be
instantiated because the current thread is not in a single-threaded
apartment.
If this is not possible to be run in a dll, do you think it would be
possible for me create an instance of the form from my DLL (not
displaying) and access it this way?
Thanks in advance,
Steven