Jump to content
Xtreme .Net Talk

Recommended Posts

Posted (edited)

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!

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[]'

Edited by PlausiblyDamp
Posted

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

Posted

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

My VB.NET Game Programming Tutorial Site (GDI+, Direct3D, Tetris [coming soon], a full RPG.... you name it!)

vbprogramming.8k.com

My Project (Need VB.NET Programmers)

http://workspaces.gotdotnet.com/ResolutionRPG

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...