-
May 1st, 2004, 04:49 PM
#1
Senior Member
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?
-
May 1st, 2004, 05:03 PM
#2
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
-
May 2nd, 2004, 10:11 PM
#3
Junior Member
You may use TTimer component do this
-
May 3rd, 2004, 10:44 AM
#4
Why not open a local logfile (simple txt file) and write debug messages to it?
Oliver's Law:
Experience is something you don't get until just after you need it.
-
May 4th, 2004, 07:46 PM
#5
Senior Member
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;(((
-
May 5th, 2004, 01:52 PM
#6
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
If you spend more on coffee than on IT security, you will be hacked. What\'s more, you deserve to be hacked.
-- former White House cybersecurity adviser Richard Clarke
-
May 5th, 2004, 01:52 PM
#7
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
If you spend more on coffee than on IT security, you will be hacked. What\'s more, you deserve to be hacked.
-- former White House cybersecurity adviser Richard Clarke
-
October 30th, 2004, 11:17 PM
#8
Senior Member
I tried to use Hwinterface.ocx(Inpout.dll), but i need an event OnRead etc. or something else. How can I do it ?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|