question

Upvotes
Accepted
3 2 0 3

Error when Creating Dex2Mgr

Hihi, I tried to use the tutorial in the link below but I got the following error at the line in BOLD below.

System.Runtime.InteropServices.COMException: 'Error HRESULT E_FAIL has been returned from a call to a COM component.'

I would appreciate it if anyone can advice how to resolve this? Thanks.

https://developers.refinitiv.com/en/api-catalog/eikon/com-apis-for-use-in-custom-applications/tutorials#tutorial-3-fundamental-and-reference-data

public void CreateDex2Mgr() {

// Create the Dex2 manager BUT ERROR occurs

MyDex2Mgr = MyEikonDesktopDataAPI.CreateDex2Mgr();

MyDex2MgrADC = (IDex2Mgr2)MyDex2Mgr;

// Initialize the Dex2 manager and retrieve a session cookie

if (MyDex2Mgr != null)

MyDex2Cookie = MyDex2MgrADC.Initialize(DEX2_MetadataCaller.DE_MC_ADC_POWERLINK);

}



eikoneikon-com-api
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

1 Answer

Upvotes
Accepted
3 2 0 3

Ok I solved it. This is due to Eikon waiting for connection and not yet connected when the CreateDex2Mgr was called. Thanks.

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Click below to post an Idea Post Idea