Author Topic: Please Help me -> whitboard ERROR  (Read 3551 times)

Offline nms

  • *
  • Posts: 1
  • Karma: +0/-0
    • View Profile
on: March 16, 2008, 03:00:45 PM
I downloaded the C# source code from this board, and when I attempt to run the program in debug mode I get this error:

A call to PInvoke function 'WiimoteWhiteboard!WiimoteWhiteboard.Form1::mouse_event' has unbalanced the stack. This is likely because the managed PInvoke signature does not match the unmanaged target signature. Check that the calling convention and parameters of the PInvoke signature match the target unmanaged signature.

on this line:

mouse_event(MOUSEEVENTF_LEFTDOWN, 0, 0, 0, 0);

the first time I attempt to click with the ir pen when calibrating.

and if I uncheck the cursor option, and try it I get:

cross-thread operation not valid: Control 'CalibrationForm' accessed from a thread other than the thread it was created on.

on this line:

base.Dispose(disposing);

immediately after the last calibration point. I'm using visual c# 2005 express edition on a windows xp home machine. I can run the precompiled application, and my wiimote connects fine etc. Is there a certain configuration I need to be compiling in to get this to work or any additional files I need? I haven't put very much time into researching this problem, so it may be trivial to fix, but I figured it was worth posting anyways for anyone who might be as surprised as I was when the original source did not compile. Any help would be appreciated.