Author |
Topic: GAIN API COM interface bugs (5 messages, Page 1 of 1) |
||||
---|---|---|---|---|---|
Moderators: VPfau | |||||
WWatson2582 Posts: 43 Joined: May 03, 2018 |
Good afternoon:
I am having some problems getting the CppCOMSample application to compile using the GAIN API COM interface: 1) In stdafx.h, the type lib id is incorrect. It appears to reference the typelib id of the old OEC API and should replaced with: #import "libid:20A98AD2-2C0F-4192-A53D-0F6189ED5B2B" 2) The bug I cannot correct here is that in the typelib, the reserved C++ keyword "template" is used as a variable name causing the following warning to be emitted: >d:\devel\gfapi\cppcomsample\stdafx.h(74): warning C4279: 'template': identifier in type library '20A98AD2-2C0F-4192-A53D-0F6189ED5B2B' is a keyword; use the 'rename' qualifier and many compilation errors to occur for the file gf.api.com.tlh: 1>d:\devel\gfapi\cppcomsample\debugx64\gf.api.com.tlh(11560): error C2143: syntax error : missing ')' before 'template' 1>d:\devel\gfapi\cppcomsample\debugx64\gf.api.com.tlh(11560): error C2143: syntax error : missing ';' before 'template' 1>d:\devel\gfapi\cppcomsample\debugx64\gf.api.com.tlh(11560): error C2059: syntax error : ')' 1>d:\devel\gfapi\cppcomsample\debugx64\gf.api.com.tlh(11560): error C2059: syntax error : ';' 1>d:\devel\gfapi\cppcomsample\debugx64\gf.api.com.tlh(11574): error C2143: syntax error : missing ')' before 'template' 1>d:\devel\gfapi\cppcomsample\debugx64\gf.api.com.tlh(11574): error C2143: syntax error : missing ';' before 'template' 1>d:\devel\gfapi\cppcomsample\debugx64\gf.api.com.tlh(11574): error C2059: syntax error : ',' 1>d:\devel\gfapi\cppcomsample\debugx64\gf.api.com.tlh(11575): error C2059: syntax error : ')' 1>d:\devel\gfapi\cppcomsample\debugx64\gf.api.com.tlh(13029): error C2143: syntax error : missing ')' before 'template' 1>d:\devel\gfapi\cppcomsample\debugx64\gf.api.com.tlh(13029): error C2143: syntax error : missing ';' before 'template' 1>d:\devel\gfapi\cppcomsample\debugx64\gf.api.com.tlh(13029): error C2059: syntax error : ')' 1>d:\devel\gfapi\cppcomsample\debugx64\gf.api.com.tlh(13029): error C2059: syntax error : ';' Your assistance with this would be greatly appreciated! Scott Watson |
||||
VPfau Moderator Posts: 164 Joined: |
Hello Scott,
One of our developers is working on this topic right now. We will update you as soon as we get any result. Thank you for you patience. Vitaliy Pfau
|
||||
RBduov Posts: 6 Joined: |
Scott Watson,
1) In stdafx.h, the type lib id is incorrect. It appears to reference the typelib id of the old OEC API and should replaced with: You are right, the current GUID for importing GF.API.COM into your own project is "20A98AD2-2C0F-4192-A53D-0F6189ED5B2B". 2) The bug I cannot correct here is that in the typelib, the reserved C++ keyword "template" is used as a variable name causing the following warning to be emitted: We are aware of this problem and going to roll out the fix soon. At the moment, I can recommend using the #import directive with the 'rename' attribute. https://docs.microsoft.com/en-us/cpp/preprocessor/rename-hash-import?view=vs-2019 #import "libid:20A98AD2-2C0F-4192-A53D-0F6189ED5B2B" rename("max","maximum") rename("min","minimum") rename("template","tmplt")// OEC API Thanks for your patience. |
||||
WWatson2582 Posts: 43 Joined: May 03, 2018 |
Those lines certainly allow me to compile the "stdafx.h" file, but the contents of the "OECAPIEvents.h" file again relate back to the old OEC API COM interface and cannot possibly compile with the GF API.
Has someone neglected to post the GF API compatible version of the CppCOMSample code or has no one ever tried to actually use the GF API COM interface? Please let me know how to proceed. Thanks! |
||||
CMicciche902 Posts: 367 Joined: |
I have requested a new COM sample be built. Stay tuned.
Chris M
|
||||