CGXNetCore, creating objects
RobertCram
Posts: 15
The .NET documentation says "Each thread should have it's own CGX_NET or CGXNETCore context object which will be the first argument passed to static methods and object creation methods."
But as far as I can see none of the calls in the Examples solution provided on this site seem to follow this pattern. For example, the static calls to create and alter DBs don't use the context object.
This is an issue for me because those calls fail. Is there another example that follows this pattern, or is this pattern no longer the case?
Thanks,
Bob
But as far as I can see none of the calls in the Examples solution provided on this site seem to follow this pattern. For example, the static calls to create and alter DBs don't use the context object.
This is an issue for me because those calls fail. Is there another example that follows this pattern, or is this pattern no longer the case?
Thanks,
Bob
0
Comments
-
Hi Bob,
Check out https://github.com/GeosoftInc/gxdotnet/blob/master/examples/chanadd/ChannelAdd.cs.
On line 45 it creates its own CGX_NET. Once this is created you should be able to use the GX API.
I hope this helps.
Regards,
Joseph0 -
Thank you, Joseph. I needed to copy some of the dependency information from ChanAdd into my project (the reference to System.Windows.Forms in particular) to make my program work. My comment still stands that the documentation (saying that the handle will be the first argument....) is incorrect.0