I'm trying to create a camera driver using C++. So far everything is good, and it works properly in Conform, except that I get the following error:
12:39:17.458 AccessChecks ERROR Error creating driver
using early binding to ICamera interface: Unable to cast COM object of type
'System.__ComObject' to class type 'ASCOM.DriverAccess.Camera'. Instances of
types that represent COM components cannot be cast to types that do not
represent COM components; however they can be cast to interfaces as long
as the underlying COM component supports QueryInterface calls for the IID
of the interface.
I used import with AscomMasterInterfaces.tlb to get the ICamera and related types, and I created a class that derives from CComOjbectRootEx<>, CComCoClass<>, IDispatchImpl<>. I also have a COM_MAP that includes COM_INTERFACE_ENTRY(ICamera). I also tried CoCreateInstance with the GUIDs for my driver and for ICamera. So I would think early binding should work.
What does the Conform error mean? How can I fix this?
