C# wrapper classes?

any question related to our SDK and driver

Moderators: yang, Support@ZWO

Post Reply
Rarius
Posts: 2
Joined: Tue Jul 23, 2019 9:21 pm

C# wrapper classes?

Post by Rarius » Wed Jul 24, 2019 8:18 am

Has anyone used the C# classes that come bundled in the include folder of the ASI SDK?

One (ASICameraDll2.cs) is supposed to be a simple wrapper on the DLL and the other (ASICameraObjectModel2.cs) a more object oriented wrapper over that. The issue is that they don't seem to be compatible, i.e. function names are wrong and the ASICameraObjectModel2.cs seems to call functions that aren't even there in the ASICameraDll2.cs!

Does anyone have any working C# code I can look at?

BTW I am using an ASI120MM in a homemade spectrograph and writing the software myself... after all I am a C# developer by trade!

User avatar
Support2@ZWO
Posts: 668
Joined: Thu Feb 09, 2017 4:58 am

Re: C# wrapper classes?

Post by Support2@ZWO » Thu Jul 25, 2019 1:18 am

Dear Sir,
Sorry for the problem。
This header file should be provided by other developers a long time ago. Very few people have feedback problems. We also don't use it. So here is just an example.
If you can tell us which functions have problems, or you can fix them and help us update them. We will be appreciated with that.
Thanks
Chad
ZWO Driver Engineer
Location:lon=120.6 lat=31.3
SuZhou China

Rarius
Posts: 2
Joined: Tue Jul 23, 2019 9:21 pm

Re: C# wrapper classes?

Post by Rarius » Thu Jul 25, 2019 11:16 am

I have fixed up the classes to get them working as far as I need, which is quite limited.

I can provide my code as a step forward. How best to upload them?

User avatar
Support2@ZWO
Posts: 668
Joined: Thu Feb 09, 2017 4:58 am

Re: C# wrapper classes?

Post by Support2@ZWO » Fri Jul 26, 2019 1:25 am

Dear Sir,
Appreciate for your work!
You can send an email to me: chad.cao(at)zwoptical.com, please upload the file as an attachment.
I think we will update it in our next release.
Thanks
Chad
ZWO Driver Engineer
Location:lon=120.6 lat=31.3
SuZhou China

MikeP
Posts: 30
Joined: Sat Sep 23, 2017 4:44 am

Re: C# wrapper classes?

Post by MikeP » Mon Sep 21, 2020 3:51 am

Hi Chad,

I have the same problem as described here. I've upgraded to the latest SDK and my code does not work anymore. The ASICameraObjectModel2.cs file that has been mentioned here is no longer included with the SDK download. Could you please post or send me the updated version that was created as mentioned above?

Thanks!

Mike

MikeP
Posts: 30
Joined: Sat Sep 23, 2017 4:44 am

Re: C# wrapper classes?

Post by MikeP » Mon Sep 21, 2020 6:09 am

Never mind :-)!

I've just done it myself, there wasn't much to change.

Mike

Post Reply