Hello everybody,

What is the method commonly used to pass initialization info to a 16 bit dos program? The system registry is used for windows programs but this is not accessable for 16 bit programs.

I want to determine the path, file name and file size while running windows 98 then re-start computer in dos and be able to pass this info to the dos program. Should I write a file and put the info on 100 byte boundaries in order to know what information the dos program is retrieving for example, then have the dos program open and read it, or is there another way? Any links or suggestions appreciated.

best regards,

Posted on 2002-11-17 15:26:55 by czDrillard
Well, if I wanted to pass parameters to a 16B-DOS apllication I would
probably do one of the following.

Open the 'autoexec.bat' file and add: yourprogram.exe %commandline parameters%.
That way your application would start and get the info automatically passed to it.

Open the 'autoexec.bat' file and set an environment variable like this: SET PARAM=BLAHBLAH
and just read the environment variable when the program executes.

Write the information to a seperate file and make your application read the parameters

Warning! not for the faint of heart, but if you really want to use the registry you could manually
parse the 'user/system.dat' to access the regisry. :alright:
Posted on 2002-11-17 19:39:55 by natas
Thanx natas,

I don't want my program to run everytime the autoexec.bat is executed and I guess I am 'faint of heart' :) So I go with number three.

best regards,

Posted on 2002-11-18 21:38:37 by czDrillard