المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : Managed c++ dll struct members not visible in c#



C# Programming
03-24-2013, 03:04 AM
In the c++-cli dll which is referenced in my c# project, I have

namespace MatsWrapper { public struct MatsContact { public: char* contactName; char* fileName; float lat; float lng; float heading; int numContact; };
In my c# project I'm trying to access the members but they don't show up in the intellisense.

unsafe{ MatsWrapper.Class1 oMats = newMatsWrapper.Class1(); MatsWrapper.MatsContact** contacts; contacts = oMats.CallMats(x);int numContacts = oMats.m_numContacts; for (int k = 0; k < numContacts; ++k){ Contact newCtc; newCtc = Contact.Create(contacts[k]->contactName, ac.Latitude, ac.Longitude);}
contactName doesn't show up when I do contacts[k]->contactName.
Why is this and how do I fix it?
Many thanks,
sb