I have a Visual Basic DLL, I used it in a Windows User Control Application. It works fine, but when I HOST this Windows User Control in another Windows Forms application, it gives me the following error.
An error occurred creating the form. See Exception.InnerException for details. The error is: Creating an instance of the COM component with CLSID {66DF4F1A-E3E2-43D3-92BC-D56E9DDCB8AC} from the IClassFactory failed due to the following error: 800a005b.
When I run the User Control it works fine with me, ONLY when I host it in another Windows application this error occurs.
I'm using Visual Studio 2008 & Windows Server 2003
when I add the User Control, the DLL path is "C:\Documents and Settings\USERNAME\My Documents\Visual Studio 2008\Projects\HMS_WF4\HMS_WF4\obj\Release\Interop.DLLNAME.dll"
Notes. it's in Release, but when I compile the application it puts the output in the Debug
folder. Even if I select the Release
folder for debugging and compilation, when the application is run, it searches for the DLL in the Release
folder, but it's in the Debug
folder.