none
After debugging native calls on device, debugger doesn't start again!!

    Question

  • Dear,

    I wrote a little program that does some native calls from coredll.dll. If I start the debugger on the device, everything goes well. But, If I quit the debugger and start it again, I see the wait cursor for ever and nothing happens. This issue doesn't appear when I didn't hit any native calls yet.
    Do I maybe need to add some resource release code somewhere? Really no idea, I just cold boot the device after every debug. Help please!!
    Tuesday, February 03, 2009 10:09 AM

Answers

  • Hi
    Try to set the breakpoint in different place progressively (move it each time to next bloc or instruction) to localize the cause of the problem.
    Probably it is a wrong P/Invoke, or invalid input parameters...

    Regards 
    Tuesday, February 03, 2009 12:45 PM

All replies

  • Hi
    Try to set the breakpoint in different place progressively (move it each time to next bloc or instruction) to localize the cause of the problem.
    Probably it is a wrong P/Invoke, or invalid input parameters...

    Regards 
    Tuesday, February 03, 2009 12:45 PM
  • That's the whole weirdness of it. The P/Invokes all go well and they work as they should. It's just that, after executing a P/Invoke, exiting the debugger and restarting it after making some edits it all hangs. It looks like my executable is still active, so VS can't redeploy it. Only I really don't know if it is possible for the executable to remain active after a dllimport. Anyway, thanks for your reply.
    Grtz.
    Tuesday, February 03, 2009 1:10 PM
  • Yeh the executable remain running in background if you don't exit properly. Example by just closing the form; Instead of that call Application.Exit().

    Regards  
    Tuesday, February 03, 2009 2:03 PM
  • Hi p.v.berkel,

    If the application run in background, we can use following way to check
    Start--Settings--System--Memory--Running Programs

    If you see the application form name, stop it.



    Best regards,
    Guang-Ming Bian - MSFT


    Please remember to mark the replies as answers if they help and unmark them if they provide no help
    Thursday, February 05, 2009 9:12 AM