NO

Author Topic: Trying to convert console C program to Windows  (Read 3274 times)

tpekar

  • Guest
Trying to convert console C program to Windows
« on: January 11, 2012, 07:26:30 PM »
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

  • Guest
Re: Trying to convert console C program to Windows
« Reply #1 on: January 11, 2012, 08:28:37 PM »
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.



 

Offline Bitbeisser

  • Global Moderator
  • Member
  • *****
  • Posts: 772
Re: Trying to convert console C program to Windows
« Reply #2 on: January 11, 2012, 08:54:47 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