Usb pinvoke issue..was previously working.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Enrique Romero
    New Member
    • Oct 2010
    • 3

    Usb pinvoke issue..was previously working.

    hi,
    I previously had C#2008 express + SQL2008 + USB drivers installed, working. I switched laptops and upgraded to C# 2010 with the same SQL 2008 and same USB drivers. I'm now getting the following error:

    PInvokeStackImb alance was detected
    Message: A call to PInvoke function 'Central_xxxxxx !usb_api.usb_in terface::_MPUSB Open' 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.

    I don't see what's changed..could it be something in C#2010? or perhaps .NET 4.0?

    Thanks in advance,
    Enrique
  • Plater
    Recognized Expert Expert
    • Apr 2007
    • 7872

    #2
    The error message sounds like a driver or DLL is a different version then it thinks it should be using

    Comment

    • Enrique Romero
      New Member
      • Oct 2010
      • 3

      #3
      Hi Plater,
      I've doubled checked the .dll versions and they both are identical. Something is being satisfied on the USB end. I have a couple of LED alternating on/off. I'm thinking, maybe dl C# 2008 and trying,just to match apples to apples. If anyone has any other suggestions please advise.

      Tks,
      ER

      Comment

      • Enrique Romero
        New Member
        • Oct 2010
        • 3

        #4
        Hi Guys,
        Ok I installed C# 2008 express on the new laptop.
        Ran my program and all is working fine. It's has
        to be something in C# 2010 express! How does one
        notify MSN with these type of issues?

        Cheers,
        ER

        Comment

        Working...