-
Write your event
Hello,
I'm programming in Borland C++ Builder 6.0 and I need to write my own event. Because I must read from the LPT, but with "while(1)" the program freezes. I can't do it with somekind of timer, because if I miss something it is fatal!!! Can anyone help me?
-
I don't use Borland C++, but from my experience, I would assume that there would be an Event class (BEvent maybe?). If there is, you could easily derive a class from that class and work from there.
Cheers,
cgkanchi
-
You may use TTimer component do this
-
Why not open a local logfile (simple txt file) and write debug messages to it?
-
I can't use TTimer, because it is not sure, but this go logfile is smart - but i must use while(1) too and that freezes the program;(((
-
I'm not familar with Borland 6 but I have written a lot of programs with while (1) in them. I've done this visual studio 6, HP-UX, Solaris and Linux. I've also done it in multiple languages, scripts (C/C++, Perl, sh, csh and Java). My experiance with programs that hang it because of something in the loop. Have you tried stepping through the code to determine the hang point? Have tried a different IDE to see if the problem exist there too? If the problem does not exist when compiled via a different compiler then the issue is specific to Borland and I would advise looking for a patch. If the problem does exist with a different compiler then I would step through the code.
Cheers,
-D
-
I'm not familar with Borland 6 but I have written a lot of programs with while (1) in them. I've done this visual studio 6, HP-UX, Solaris and Linux. I've also done it in multiple languages, scripts (C/C++, Perl, sh, csh and Java). My experiance with programs that hang it because of something in the loop. Have you tried stepping through the code to determine the hang point? Have tried a different IDE to see if the problem exist there too? If the problem does not exist when compiled via a different compiler then the issue is specific to Borland and I would advise looking for a patch. If the problem does exist with a different compiler then I would step through the code.
Cheers,
-D
-
I tried to use Hwinterface.ocx(Inpout.dll), but i need an event OnRead etc. or something else. How can I do it ?