How can I fix this 'bug'

Grasshopper_NET

Newcomer
Joined
Jul 27, 2004
Messages
6
I tried to compile my project in Visual studio .NET with managed c++ and I get this compile error when I try to create my device.
I have checked all the parameters and made sure they are in the correct place. What is wrong?

Thanks, in advance!
Code:
Form1.h(100): error C2664: 'Device (int, DeviceType, System::IntPtr, CreateFlags, PresentParameters __gc * __gc[])' : cannot convert parameter 5 from 'Microsoft::DirectX::Direct3D::PresentParameters __gc *' to 'Microsoft::DirectX::Direct3D::PresentParameters __gc * __gc[]'
 
Last edited by a moderator:
I've little to no knowledge of C++, but I guess the Method expects an PresentParameters Array instead of a single PresentParameters-Pointer/Object.. Hope this somehow helps.. otherwise there will hopefully be someone else who can and will solve this!

Andreas
 
I don't think that it requires an array, based on my understanding of Managed DirectX.

Grasshopper: When you create the PresentParameters object, create your PresentParameters object like so:
PresentParamers *pp = new pp();

Iin the argument, (based on my limited knowledge of C++),
device = new Microsoft.DirectX.Direct3D.Device(int,devicetype,intptr,createflags, &pp);

Hope that helps,
-The Pentium Guy
 
Back
Top