C
campkd
I have run into some issues with COM objects in an application I am
working on, and am hoping for some help. The app I am working on is in
..NET 2.0, and I am trying to use a COM object written in FoxPro, which
will perform operations & write the transaction to a SQL database.
(Yes, i realize this is the most backward, fubar method ever, but it is
out of my hands)
On my development machine, the communication is established and the
entire app works great w/o any hitches whatsoever. Moving it to any
other machine creates major issues.
I am getting two main errors - on some machines, i get the following
System.Runtime.InteropServices.COMException (0x80040154): Retrieving
the COM class factory for component with CLSID
{B08DD0B3-2DA9-43D9-9E4F-831A96DFEC63} failed due to the following
error: 80040154.
On others, it makes it past retrieving the COM object, but then fails
with the following -
System.InvalidCastException: Unable to cast COM object of type 'X' to
interface type 'Y'. This operation failed because the QueryInterface
call on the COM component for the interface with IID
'{2B2189C1-D464-4E98-A3C1-EC9D5F897768}' failed due to the following
error: Bad variable type. (Exception from HRESULT: 0x80020008
(DISP_E_BADVARTYPE)).
permit registration using Regsvr32, and the machine is logged in as
Admin, so permissions shouldn't be an issue. I have since strong-named
the output of the project and been able to place the Interop.xxx.dll
ass'y in the GAC, but it still throws the Invalid Cast exception.
So.... I can't think of much more to try, especially since it works
fine in the development environment. Any suggestions would be greatly
appreciated. Thanks!
working on, and am hoping for some help. The app I am working on is in
..NET 2.0, and I am trying to use a COM object written in FoxPro, which
will perform operations & write the transaction to a SQL database.
(Yes, i realize this is the most backward, fubar method ever, but it is
out of my hands)
On my development machine, the communication is established and the
entire app works great w/o any hitches whatsoever. Moving it to any
other machine creates major issues.
I am getting two main errors - on some machines, i get the following
System.Runtime.InteropServices.COMException (0x80040154): Retrieving
the COM class factory for component with CLSID
{B08DD0B3-2DA9-43D9-9E4F-831A96DFEC63} failed due to the following
error: 80040154.
On others, it makes it past retrieving the COM object, but then fails
with the following -
System.InvalidCastException: Unable to cast COM object of type 'X' to
interface type 'Y'. This operation failed because the QueryInterface
call on the COM component for the interface with IID
'{2B2189C1-D464-4E98-A3C1-EC9D5F897768}' failed due to the following
error: Bad variable type. (Exception from HRESULT: 0x80020008
(DISP_E_BADVARTYPE)).
and/or permission issues - the interop assy, as output by VS2005 won'tFrom what I have read, the 80040154 error indicates registration issues
permit registration using Regsvr32, and the machine is logged in as
Admin, so permissions shouldn't be an issue. I have since strong-named
the output of the project and been able to place the Interop.xxx.dll
ass'y in the GAC, but it still throws the Invalid Cast exception.
So.... I can't think of much more to try, especially since it works
fine in the development environment. Any suggestions would be greatly
appreciated. Thanks!