Trying to convert console C program to Windows

Started by tpekar, January 11, 2012, 07:26:30 PM

Previous topic - Next topic

tpekar

I have noticed when my attempt to test my "Windowized" version crashes, I get a "POLINK: fatal error: Access is denied." message that I can't clear without logging out and back into Windows(7).  I use MessageBox to track how far the program gets before it "crashes" much like I did with console versions using the printf followed by the getchar.  Is there an easier way to recover from this without logging off and logging back in?

CommonTater

That's probably because your application is still running... check in task manager -> processes.
You may have to shut it down manually.

FWIW... console programs don't usually "windowize" very gracefully... most often you end up doing a complete rewrite to get it to work.




Bitbeisser

Quote from: CommonTater on January 11, 2012, 08:28:37 PM
FWIW... console programs don't usually "windowize" very gracefully... most often you end up doing a complete rewrite to get it to work.
I would have to concur on this 100%

The logic of program flow, as far as any user interaction goes is simply different in a threaded Windows system than it is in a more "linear" console/DOS environment...

And as far as finding out why and where your program crashes, you should take a serious look at the build-in debugging features of Pelle's C, like setting breakpoints and watches on variables...

Ralf