Thread: System Files

  1. #1
    & the hat of GPL slaying Thantos's Avatar
    Join Date
    Sep 2001
    Posts
    5,681

    System Files

    Does anyone know of a way to load certin sys files whenever a program executes?

    Example: I want to use some of the ANSI.SYS escape features. But I don't want to depend on the user to make sure that it is added to config.sys.

    Anyway to load it into the program's memory?

    Thanks,

    Thantos

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,659
    > Anyway to load it into the program's memory?
    Not usually.

    As far as I know, .sys files loaded by config.sys can only be loaded at system startup.

    But you can tell whether it has been loaded or not
    http://www.ctyme.com/intr/rb-4654.htm
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  3. #3
    Hamster without a wheel iain's Avatar
    Join Date
    Aug 2001
    Posts
    1,385
    why dont you add ansi.sys to the config file in your installation procedure? THis would probably be the best way to make sure it is available. remember if it is critical for a user to do something - they wont!
    Monday - what a way to spend a seventh of your life

  4. #4
    & the hat of GPL slaying Thantos's Avatar
    Join Date
    Sep 2001
    Posts
    5,681
    The main reason I don't want to have to worry about it having it be loaded by config.sys is because I would like it to be able to run on different OS. For instance windows NT doesn't use the config.sys file. The file is there but it is empty.
    Anyway to still use the functions even if it wasn't loaded?

  5. #5
    Skunkmeister Stoned_Coder's Avatar
    Join Date
    Aug 2001
    Posts
    2,572
    ansi.sys is a very deprecated way of doing things and maybe you should look into conditional compilation if you want to maintain a single source.
    Free the weed!! Class B to class C is not good enough!!
    And the FAQ is here :- http://faq.cprogramming.com/cgi-bin/smartfaq.cgi

  6. #6
    & the hat of GPL slaying Thantos's Avatar
    Join Date
    Sep 2001
    Posts
    5,681
    True it is. But it is the only way I remember to change the color of the text without going into graphic mode.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Working with muliple source files
    By Swarvy in forum C++ Programming
    Replies: 1
    Last Post: 10-02-2008, 08:36 AM
  2. system command not executing with format specifier
    By ridhamshah in forum C Programming
    Replies: 6
    Last Post: 11-08-2006, 05:58 AM
  3. Operating system construction
    By AdamLAN in forum Tech Board
    Replies: 7
    Last Post: 03-05-2005, 01:31 PM
  4. files
    By Raven Arkadon in forum C++ Programming
    Replies: 2
    Last Post: 02-26-2005, 02:18 PM
  5. reinserting htm files into chm help files
    By verb in forum Windows Programming
    Replies: 0
    Last Post: 02-15-2002, 09:35 AM