G
Guest
I get the following exception when it tries to run the GetWindowsAndDoors function in C
An unhandled exception of type 'System.Runtime.InteropServices.MarshalDirectiveException' occurred in WindowsApplication1.ex
Additional information: Can not marshal return value: The type definition of this type has no layout information
What is the correct way to do this. It's not like I have to marshall from one string type to another or anything. I get the sense that gc pointers to go through this mechanism. If this is the case, what would be a good way to handle this
Thanks
Inside of C+
extern "C
__declspec(dllexport) System::Collections::ArrayList* GetWindowsAndDoors(System::Int32 itemdefsClassID)
System::Collections::ArrayList* GetWindowsAndDoors(System::Int32 itemdefsClassID
System::Collections::ArrayList* al = new System::Collections::ArrayList()
// Do stuf
return al
Inside C
[DllImport("\\temp\\temp27\\output.dll")
public static extern System.Collections.ArrayList GetWindowsAndDoors(int itemdefsClassID)
... and Late
System.Collections.ArrayList al = GetWindowsAndDoors(1327)
An unhandled exception of type 'System.Runtime.InteropServices.MarshalDirectiveException' occurred in WindowsApplication1.ex
Additional information: Can not marshal return value: The type definition of this type has no layout information
What is the correct way to do this. It's not like I have to marshall from one string type to another or anything. I get the sense that gc pointers to go through this mechanism. If this is the case, what would be a good way to handle this
Thanks
Inside of C+
extern "C
__declspec(dllexport) System::Collections::ArrayList* GetWindowsAndDoors(System::Int32 itemdefsClassID)
System::Collections::ArrayList* GetWindowsAndDoors(System::Int32 itemdefsClassID
System::Collections::ArrayList* al = new System::Collections::ArrayList()
// Do stuf
return al
Inside C
[DllImport("\\temp\\temp27\\output.dll")
public static extern System.Collections.ArrayList GetWindowsAndDoors(int itemdefsClassID)
... and Late
System.Collections.ArrayList al = GetWindowsAndDoors(1327)