IDirectDraw

  • Thread starter Thread starter jcak77
  • Start date Start date
J

jcak77

Hi,

I'm quite new to .Net development. So far I have been able to to what
I wanted, but now I just can't figure out how I can get an IDirectDraw
object.

I have found this method somewhere on the web:

[DllImport("ddraw.dll")]
public static extern Int32 DirectDrawCreate(IntPtr NO_GUID, Object
lplpDD, IntPtr pUnkOuter);

....but I don't want an "Object", I really would like an "IDirectDraw"
instead :-(
By browsing the assemblies in the "Add reference" dialog, I could find
"Microsoft.WindowsMobile.DirectX", but it doesn't contain IDirectDraw.

I'm using the Windows Mobile 6 Professional SDK with CF 3.5.

Can anyone help me?
Thank you very much.
 
It's in no way, shape or form that simple. You need to use COM interop and
it requires whole articles to describe that. Add to that that DDraw is
confusing as hell anyway, so then you need to figure that thing out. I'd
recommend starting on the desktop, looking at the stuff already done for
that, then porting that knowledge to the device.


--

Chris Tacke, Embedded MVP
OpenNETCF Consulting
Giving back to the embedded community
http://community.OpenNETCF.com
 
It's in no way, shape or form that simple.  You need to use COM interopand
it requires whole articles to describe that.  Add to that that DDraw is
confusing as hell anyway, so then you need to figure that thing out.  I'd
recommend starting on the desktop, looking at the stuff already done for
that, then porting that knowledge to the device.

Thank you for your answer, Chris.
This is what I was thinking :-(
I'm very surprised by the lack of support of .Net from Microsoft.
Documentation is almost nonexistent if you want to create more than a
text button inside a form....

All I want to do is to sync with the vertical signal, since my current
code flickers with or without double-buffering (but when I enable
double buffering, the framerate drops from 20fps to 5fps at best). I
have read that IDirectDraw::WaitForVerticalBlank() was the only
option, but is it true?

What about D3DM (I have seen a CopyVSync value in the SwapEffect enum,
but if I use this then an IllegalCallException gets triggered when I
create the Device object :-( )

Thanks
 
Back
Top