Thread: interrupt handler functions in Visual C++ 6.0

  1. #1
    Registered User
    Join Date
    Jan 2002
    Posts
    3

    Question interrupt handler functions in Visual C++ 6.0

    I am writing a DOS program using Microsoft's Visual C++ 6.0 compiler. The program is set up to read the keyboard whenever a key is pressed.
    To do this I wrote a function that is designed to be an interrupt handler.
    I originlly wrote this function using the Borland C++ 3.1 compiler. In this compiler you can designate a C function to be an interrupt handler by inserting the 'interrupt' keyword between the function's return type and the name of the function, in the function's signature. However, I don't see anything in the Microsoft documentation that allows for functions to be defined as interrupt handlers. Additionally, the 'interrupt' keyword does not exist in the Microsoft complier's vocabulary, as the Borland code will not compile under Visual C++ 6.0.
    Does anyone know how to define a function as an interrupt handler using the Microsoft Visual C++ 6.0 compler? I am running Windows 98.

  2. #2
    Registered User VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,607
    Interrupts are not allowed within the Windows environment. Microsoft Visual C++ does not support DOS programs nor does it support interrupts. Everything you do in Windows must be via the API, 3rd party library, or for games - DirectX.

    Also, Borland code and Microsoft code will absolutely not mix unless you make significant changes in their headers, and I do mean *significant* changes. Both support different extensions in their headers. Personally, I would not try to combine the two as it will only result in mass confusion. Same goes for Borland and DirectX. You will have to make very significant changes to its headers in order to use DirectX with it.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Visual C++ 6.0
    By pythonusr in forum Windows Programming
    Replies: 10
    Last Post: 04-26-2007, 02:13 AM
  2. ras.h errors
    By Trent_Easton in forum Windows Programming
    Replies: 8
    Last Post: 07-15-2005, 10:52 PM
  3. Learning OpenGL
    By HQSneaker in forum C++ Programming
    Replies: 7
    Last Post: 08-06-2004, 08:57 AM
  4. Erros in Utility Header File
    By silk.odyssey in forum C++ Programming
    Replies: 4
    Last Post: 12-22-2003, 06:17 AM
  5. Stupid compiler errors
    By ChrisEacrett in forum C++ Programming
    Replies: 9
    Last Post: 11-30-2003, 05:44 PM