China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --

Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
DOS stands for freedom, openness and progress. Let us work hard, learn from the openness and GNU spirit of FreeDOS and Linux, and together build and grow a free GNU GPL world!

中国DOS联盟论坛
The time now is 2026-08-01 11:00
中国DOS联盟论坛 » DOS开发编程 & 发展交流 (开发室) » Help with DOS network programming (winsail) View 3,839 Replies 34
Floor 31 Posted 2008-01-16 20:08 ·  中国 江苏 南京 电信
初级用户
Credits 100
Posts 41
Joined 2007-12-06 15:52
18-year member
UID 104858
Gender Male
Status Offline
Then what function is used for formatted output? Look at my such a program: (the modification to sail2000.cpp in the sail3000 project)

if( !::InitSystem(argc,argv))
{
::CloseSystem();
::printf("\nSystem Source Not Enough!");
return(0);
}
ChPrintf(40,0, WHITE, DARKGRAY, 1, 1,
"*********温馨提示********* "
"用户名--- super 密 码--- ( 空 )");
printf("OK!\n");//Should it be usable under DOS?

::CloseSystem();
printf("before return\n");
return(1);
There are only some necessary frameworks for others, however after this function runs only the screen outputs before return ????
Floor 32 Posted 2008-01-16 20:16 ·  中国 广东 深圳 电信
高级用户
★★
Credits 668
Posts 295
Joined 2005-07-26 00:00
21-year member
UID 41110
Gender Male
From 广东深圳
Status Offline
After running Sail3000, you can "Ping" the IP address of the "lower computer" from the "host computer" to see if there is a response.

ping 169.254.82.133
Floor 33 Posted 2008-01-16 20:22 ·  中国 广东 深圳 电信
高级用户
★★
Credits 668
Posts 295
Joined 2005-07-26 00:00
21-year member
UID 41110
Gender Male
From 广东深圳
Status Offline

What function is used for formatted output? Look at this piece of program: (modifications to sail2000.cpp in the sail3000 project)
if( !::InitSystem(argc,argv))
{
::CloseSystem();
::printf("\nSystem Source Not Enough!");
return(0);
}
ChPrintf(40,0, WHITE, DARKGRAY, 1, 1,
"********* Friendly Reminder ********* "
"Username --- super Password --- ( Empty )");
printf("OK!\n");//Should be usable under DOS
::CloseSystem();
printf("before return\n");
return(1);
There are only some necessary frameworks in other parts, however, after this function runs, only "before return" is output on the screen????


This is because the program executes too fast. You can add "getch()" or AfxMessageBox() function to pause for a

if( !::InitSystem(argc,argv))
{
::CloseSystem();
::printf("\nSystem Source Not Enough!");
return(0);
}
ChPrintf(40,0, WHITE, DARKGRAY, 1, 1,
"********* Friendly Reminder ********* "
"Username --- super Password --- ( Empty )");
printf("OK!\n");//Should be usable under DOS
AfxMessageBox("Debug", "Long live the People's Republic of China", MB_OK); // Add this line

::CloseSystem();
printf("before return\n");
return(1);

========================================
The Sail3000 downloaded from the website has been configured for 256 colors. If you want to use the printf function, please use 16 colors.
The display segment of config.sys can be modified



device = 0
mode = 0
Floor 34 Posted 2008-01-16 20:23 ·  中国 广东 深圳 电信
高级用户
★★
Credits 668
Posts 295
Joined 2005-07-26 00:00
21-year member
UID 41110
Gender Male
From 广东深圳
Status Offline
I'm going off work to eat. I'll be at work at 9:00 tomorrow. GoodByte!
Floor 35 Posted 2008-01-16 20:32 ·  中国 江苏 南京 电信
初级用户
Credits 100
Posts 41
Joined 2007-12-06 15:52
18-year member
UID 104858
Gender Male
Status Offline
Goodbye, thank you very much for your help
Forum Jump: