home *** CD-ROM | disk | FTP | other *** search
-
- /* ---------------------------------------------------
- TESTSFHT.C - Microsoft C ver 5.1
-
- A driver used to validate the assembly language
- functions max_sys_file_handles() and
- sys_handles_in_use().
-
- From the command line, executing this program
- will print the following line.
- Total system handles available: [n]
- System handles in use: [i]
- where n is the number of file handles specified
- in the CONFIG.SYS FILES=n directive and i is the
- number of system file information blocks which are
- active. If no CONFIG.SYS file was found at boot
- time, or there was no FILES=n statement, or the
- FILES=n statement had n < 8, n will equal 8. If
- run from the DOS command line without redirection,
- i will equal 3. Output redirected to a file will
- increase i by 1.
-
- Test the driver with varying values n in the
- CONFIG.SYS FILES=n statement. Remember to reboot
- after changing the CONFIG.SYS.
-
- Commands to produce an executable from the code as
- shown in the listings:
- masm sfht; (listing 1)
- cl -c testsfht.c (listing 2)
- link testsfht sfht;
- -------------------------------------------------- */
-
- #include <stdio.h>
-
- extern int max_sys_file_handles(void);
- extern int sys_handles_in_use(void);
-
- main()
- {
- printf("Total system handles available: [%d]\n",
- max_sys_file_handles());
- printf("System handles in use: [%d]\n",
- sys_handles_in_use() );
- }
-
-