G
Guest
Hi,
I've got the following problem: I need to create a special Dll that is based
on MFC, but also includes also managed code (which works fine and isn't a
problem). The problem occurrs in the following:
struct TRANSFER {
BYTE data;
__int64 hits;
};
void MyTestFunc(ArrayList* list)
{
TRANSFER a;
a.data = 12; //just some test data
a.hits = 13;
list->Add(a); //compiler error
}
Now, when I try to compile this I receive the following error:
C:\Interface.cpp(24): error C2664: 'System::Collections::ArrayList::Add' :
cannot convert parameter 1 from 'TRANSFER' to 'System::Object __gc *'
But how can I marshal this correctly? Any ideas?
Thanks,
Peter
I've got the following problem: I need to create a special Dll that is based
on MFC, but also includes also managed code (which works fine and isn't a
problem). The problem occurrs in the following:
struct TRANSFER {
BYTE data;
__int64 hits;
};
void MyTestFunc(ArrayList* list)
{
TRANSFER a;
a.data = 12; //just some test data
a.hits = 13;
list->Add(a); //compiler error
}
Now, when I try to compile this I receive the following error:
C:\Interface.cpp(24): error C2664: 'System::Collections::ArrayList::Add' :
cannot convert parameter 1 from 'TRANSFER' to 'System::Object __gc *'
But how can I marshal this correctly? Any ideas?
Thanks,
Peter