Grasshopper_NET Posted July 28, 2004 Posted July 28, 2004 (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 July 28, 2004 by PlausiblyDamp Quote
Hamburger1984 Posted July 28, 2004 Posted July 28, 2004 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 Quote
ThePentiumGuy Posted July 29, 2004 Posted July 29, 2004 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 Quote 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
Grasshopper_NET Posted July 31, 2004 Author Posted July 31, 2004 Thanks Pentium Guy, I'll try that and see if it works. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.