c# - 'The parameter is incorrect' while attempting to use PInvoke DirectDraw in WinCE5.0 -
i've been having issue while in regards getting directdraw function on ce5.0 system. found code involved getting working on windows moblie, , through messing about, i've got code compiling properly.
it runs through creating instance handle windows form, when gets checking capabilities of system via:
ddcaps halcaps = new ddcaps(), helcaps = new ddcaps(); halcaps.dwsize = (uint)marshal.sizeof(typeof(ddcaps)); helcaps.dwsize = halcaps.dwsize; result = ddraw.getcaps(out halcaps, out helcaps);
i exception of 'the parameter incorrect'. exception on later functions if comment 1 out leads me believe there problem pinvoke somewhere, don't know search information on ce5.0 directdraw seems limited. importing functions
[dllimport("ddraw.dll", callingconvention = callingconvention.winapi)]
however error seems come interfaces lead
[guid("9c59509a-39bd-11d1-8c4a-00c04fd930c5"), interfacetype(cominterfacetype.interfaceisiunknown)]
the article i've been following best results far (and 1 i've been using code attempted baseline) here. code used different, i've been steadily changing more , more see if in code problem @ point it's practically same.
any assistance on causing issue, else should info on directdraw via ce5.0, or pointers on else i'm doing horribly wrong appreciated.
extra info: device working on custom framework d3d not option though have information board manufacturer directdraw supported , 2d hardware acceleration available, shouldn't issue.
putting here others having similar problems. after looking c++ code while, looks ce5.0 uses different variables , functions 6.0+, therefor must use things idirectdraw4 rather idirectdraw , idirectdrawsurface5 has converted idirectdrawsurface4.
i hope useful information else has similar problem. have not fixed issues code it's place start.
Comments
Post a Comment