![]() |
China DOS Union-- Unite DOS · Advance DOS · Grow DOS --Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum |
| Guest | Log in | Register | Members | Search | China DOS Union |
|
中国DOS联盟论坛 The time now is 2026-09-15 02:59 |
47,812 topics / 349,917 posts / today 0 new / 48,268 members |
| DOS开发编程 & 发展交流 (开发室) » There are also limits on the number of files that can be opened simultaneously in DOS under WinXP command line! |
| Printable Version 2,541 / 10 |
| Floor1 firstsail | Posted 2010-01-28 09:40 |
| 高级用户 Posts 295 Credits 668 From 广东深圳 | |
|
I did an experiment using the following code and found that DOS under WinXP command line also has a limit on the number of simultaneously opened files! My XP can only open 15 files simultaneously.
If under pure DOS or Win9X, you can solve it by modifying the FILES=?? in the c:\Config.Sys file. How to solve it under XP! void MyDebug() { int i; char buf; FILE* psFile; for (i = 0; i < 20; i++) { sprintf(buf, "Abcde-%02d.Txt", i + 1); psFile = fopen(buf, "a+b"); } for (i = 0; i < 20; i++) { printf("\nFile%02d::%08lX", i + 1, (unsigned long)psFile); if (NULL != psFile) { ::fclose( psFile ); psFile= NULL; } } getch(); return; } Execution result is: File01::75BF71CE File02::75BF71E2 File03::75BF1F6 ..... File14::75BF72D2 File15::75BF72E6 File16::00000000 File17::00000000 File18::00000000 File19::00000000 File20::00000000 [ Last edited by firstsail on 2010-1-28 at 19:13 ] |
|
| Floor2 DOSforever | Posted 2010-01-28 18:45 |
| 金牌会员 Posts 2,239 Credits 4,639 | |
|
Try modifying windows\system32\config.nt?
|
|
| Floor3 firstsail | Posted 2010-01-28 19:07 |
| 高级用户 Posts 295 Credits 668 From 广东深圳 | |
|
Modify my c:\WindowXP\System32\Config.NT file
After I changed Files=40 to Files=60 in the file and restarted the computer, executing the same code still gave the original result, which did not achieve the expected purpose! Execution result is: File01::75BF71CE File02::75BF71E2 File03::75BF1F6 ..... File14::75BF72D2 File15::75BF72E6 File16::00000000 File17::00000000 File18::00000000 File19::00000000 File20::00000000 |
|
| Floor4 firstsail | Posted 2010-01-28 19:15 |
| 高级用户 Posts 295 Credits 668 From 广东深圳 | |
|
Why is the post display abnormal?
It is clearly like this: for (i = 0; i < 20; i++) { printf("\nFile%02d::%08lX", i + 1, (unsigned long)psFile); if (NULL != psFile) { ::fclose( psFile); psFile= NULL; } } How did it display as: for (i = 0; i < 20; i++) { printf("\nFile%02d::%08lX", i + 1, (unsigned long)psFile); if (NULL != psFile) { ::fclose( psFile); psFile= NULL; } } Copying "the first-floor post" into the "Notepad" program, the situation seen is normal, but the situation seen with the eyes is the second situation. Could it be that there is a virus??? [ Last edited by firstsail on 2010-1-28 at 19:18 ] |
|
| Floor5 firstsail | Posted 2010-01-28 19:20 |
| 高级用户 Posts 295 Credits 668 From 广东深圳 | |
|
It clearly is like this
for (i = 0; i < 20; i++) { printf("\nFile%02d::%08lX", i + 1, (unsigned long)psFile[i]); if (NULL != psFile[i]) { ::fclose( psFile[i]); psFile[ i ]= NULL; } } How it shows as for (i = 0; i < 20; i++) { printf("\nFile%02d::%08lX", i + 1, (unsigned long)psFile); if (NULL != psFile) { ::fclose( psFile); psFile[ i ]= NULL; } } Found that after modifying the post, there will be such a phenomenon, strange! |
|
| Floor6 DOSforever | Posted 2010-01-28 19:35 |
| 金牌会员 Posts 2,239 Credits 4,639 | |
|
It is estimated that it is caused by the conflict between the [i] variable in your code and the [i] code in Discuz! code, resulting in font deformation.
Solution Method 1: Check "Disable Discuz! Code" when posting Method 2: Add [code][/code] Discuz! code at both ends of the code you post |
|
| Floor7 DOSforever | Posted 2010-01-28 19:43 |
| 金牌会员 Posts 2,239 Credits 4,639 | |
|
Are you under CMD or COMMAND? It seems that config.nt and autoexec.nt are only effective for COMMAND.
|
|
| Floor8 firstsail | Posted 2010-01-30 18:27 |
| 高级用户 Posts 295 Credits 668 From 广东深圳 | |
|
I'm under my XP, there's only CMD, no COMMAND
|
|
| Floor9 DOSforever | Posted 2010-02-03 18:47 |
| 金牌会员 Posts 2,239 Credits 4,639 | |
|
Could it be that you're also using that modified version of Windows? A lot of things have been streamlined?
|
|
| Floor10 firstsail | Posted 2010-02-06 11:55 |
| 高级用户 Posts 295 Credits 668 From 广东深圳 | |
|
The WinXP I installed was installed using a genuine software that I bought for 300 yuan!
|
|
| Floor11 DOSforever | Posted 2010-02-06 22:51 |
| 金牌会员 Posts 2,239 Credits 4,639 | |
|
Haha! If that's the case, then you can go to the person who sold you the software to settle the account: Why doesn't my Windows XP have COMMAND? What kind of XP did you sell me!
|
|
|
[ Contact the Union admin team -
中国DOS联盟 -
Standard version ] Sponsored by ifanr Inc | © 2001–2023 |