mercredi 6 juillet 2016

Using a C++ API in C#

I'm working with a C++ API and trying to work it into C#. So far, most of my testing is working and returning what I expected. However, I am having issues getting data from the following code:

NCIHelperLib.Application p = new NCIHelperLib.Application();
object s = new object();

p.GetCardHoldersByAccountName("testAccount",out s);

Here is the documentation for the API call

As far as I understand, the returned value is a collection of CardHolder objects. I have read that the referenced variant type is equivalent to an object type in C#, and that's why I am delcaring 's' as an object. Not to mention, the complier will only execpt the object type for the GetCardHoldersByAccountName out.

When I watch what is returned, I see the expected number of results as simply objects. How can I interpret the data as CardHolder objects?

Aucun commentaire:

Enregistrer un commentaire