Results 1 to 8 of 8

Thread: Write your event

  1. #1
    Senior Member
    Join Date
    Jul 2003
    Posts
    166

    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?

  2. #2
    Antionline Herpetologist
    Join Date
    Aug 2001
    Posts
    1,165
    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
    Buy the Snakes of India book, support research and education (sorry the website has been discontinued)
    My blog: http://biology000.blogspot.com

  3. #3
    Junior Member
    Join Date
    May 2004
    Posts
    1
    You may use TTimer component do this

  4. #4
    Just Another Geek
    Join Date
    Jul 2002
    Location
    Rotterdam, Netherlands
    Posts
    3,401
    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.

  5. #5
    Senior Member
    Join Date
    Jul 2003
    Posts
    166
    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;(((
    BGDevS
    [gloworange]www.peaksoft.info [/gloworange]

  6. #6
    Senior Member
    Join Date
    Jul 2001
    Posts
    420
    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

  7. #7
    Senior Member
    Join Date
    Jul 2001
    Posts
    420
    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

  8. #8
    Senior Member
    Join Date
    Jul 2003
    Posts
    166
    I tried to use Hwinterface.ocx(Inpout.dll), but i need an event OnRead etc. or something else. How can I do it ?
    BGDevS
    [gloworange]www.peaksoft.info [/gloworange]

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •