Author |
Topic: IPrice exceptions (8 messages, Page 1 of 1) |
||||
---|---|---|---|---|---|
Moderators: VPfau | |||||
WWatson2582 Posts: 43 Joined: May 03, 2018 |
Using the COM interface API for version 4.15.726.321, in the OnPriceTick callback, when I try to do anything with the "Fields" member of the funtion's "price" parameter, I get an immediate _com_issue_errorex exception thrown.
For example, if I do the following immediately in this function, the exception occurs: GF_Api_COM::PriceFields pf = price->Fields; The Visual Studio Debugger traces this exception to GF_Api_COM::PriceFields GF_Api_COM::IPrice::GetFields( ) in the file GF.Api.COM.tli - there is no stack trace attached to the exception. Is this something I'm doing wrong (it worked in previous versions)? Edited by WWatson2582 on Aug 28, 2024 12:52 PM |
||||
JHyatt8720 Posts: 9 Joined: |
Is there more information you can give? what is your surrounding code, ex what was your price variable set to?
|
||||
WWatson2582 Posts: 43 Joined: May 03, 2018 |
This is immediately upon entry to the OnPriceTick method (see line 251 in GFAPIEvents.h included with your CppCOMSample), so a minimalist example would look like:
void __stdcall CDPBridge::OnPriceTick(GF_Api_COM::IGFComClientPtr client, GF_Api_COM::IContractPtr contract, GF_Api_COM::IPricePtr price) { GF_Api_COM::PriceFields pf = price->Fields; } |
||||
WWatson2582 Posts: 43 Joined: May 03, 2018 |
However, you don't need to reference my code at all - just insert the following at line 282 in CppCOMSampleDlg.cpp in your CppCOMSample project, put a breakpoint there, and once connected, checkmark the "Show price updates" and click on the "Subscribe Prices" button and select an active contract, like "ESZ24". When your breakpoint is hit, just single-step to see the exception thrown:
(at line 282:) GF_Api_COM::PriceFields pf = price->Fields; Edited by WWatson2582 on Aug 29, 2024 05:32 PM |
||||
JHyatt8720 Posts: 9 Joined: |
We are activly looking into this issue.
|
||||
WWatson2582 Posts: 43 Joined: May 03, 2018 |
Any updates on this? We have a client eager to use the newest API release.
|
||||
JHyatt8720 Posts: 9 Joined: |
Yes, this problem has been fixed and a newer version will be available for download. Please let us know if anything else comes up.
Edited by JHyatt8720 on Sep 13, 2024 10:18 AM |
||||
JHyatt8720 Posts: 9 Joined: |
I will update you when It is available.
|
||||