API Support Forum
OEC API > API Support > COM API:
Author Topic: COM API:
(3 messages, Page 1 of 1)
Moderators: VPfau
WWatson2582
Posts: 43
Joined: May 03, 2018


Posted: Sep 07, 2020 @ 02:05 PM             Msg. 1 of 3
For COM API users, ISymbolLookupExpressionBuilder appears to be broken. For example,

GF_Api_COM::ISymbolLookupExpressionBuilderPtr expressionBuilder;
expressionBuilder.CreateInstance(__uuidof(GF_Api_COM::SymbolLookupExpressionBuilder));
CComSafeArray kinds(10);
kinds.Add(GF_Api_COM::ContractKind_Future);
expressionBuilder = expressionBuilder->WithContractKinds(kinds);

...will cause an exception to be thrown. This appears to be a known bug since this sort of operation has been commented out in the CppCOMSample project in the file CppCOMSampleDlg.cpp around line 671.

Is there a fix coming from this soon or is there an alternate method to limit the kinds of contracts returned by GFAPI()->Contracts->Lookup->ByCriteria?

Scott Watson
WWatson2582
Posts: 43
Joined: May 03, 2018


Posted: Sep 07, 2020 @ 03:01 PM             Msg. 2 of 3
To be clear - it appears that it's only the WithContractKinds method that's broken.

S.W.
JSmith5611
Posts: 187
Joined:


Posted: Sep 15, 2020 @ 12:56 PM             Msg. 3 of 3
We now see that this is a problem, and are working on it.
Jason Smith