![]() |
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-10-31 06:55 |
47,815 topics / 349,930 posts / today 0 new / 48,290 members |
| DOS开发编程 & 发展交流 (开发室) » The Terminator of DOS Interface Development |
| Printable Version 100,783 / 290 |
| Floor271 firstsail | Posted 2008-11-20 11:18 |
| 高级用户 Posts 295 Credits 668 From 广东深圳 | |
Originally posted by godai at 2008-7-17 12:00: Regarding the situation where the mouse jumps randomly in an industrial environment with vibration, it may be due to using a "photoelectric mouse". It is suggested to try using a "mechanical scroll mouse" in an industrial strong - vibration environment. |
|
| Floor272 windowsvesta | Posted 2009-03-05 00:45 |
| 初级用户 Posts 67 Credits 138 From 云南 | |
|
It seems that there hasn't been an update for a long time!
|
|
| Floor273 andyond | Posted 2009-03-15 10:05 |
| 新手上路 Posts 8 Credits 16 | |
|
Come and study a bit
|
|
| Floor274 firstsail | Posted 2009-04-02 23:36 |
| 高级用户 Posts 295 Credits 668 From 广东深圳 | |
|
Window control supports "command shortcut key" function
void CWindow::AddCommandKey(WORD wKey, void far (*pMyFc)(CObject *)); Function: Add keyboard shortcut key (no need for control host) Input parameters: wKey ------ Virtual key value. For example, F1 key is VK_F1, F2 key is VK_F2,..., F10 key is VK_F10 pMyFc ---- Callback function. The prototype is void far MyFc(CObject* pObject) { CWindow* pWindow = (CWindow *)pObject; //Add your own code below //...... } Output parameters: None Return value: None [ Last edited by firstsail on 2009-4-2 at 23:39 ] |
|
| Floor275 firstsail | Posted 2009-05-06 08:12 |
| 高级用户 Posts 295 Credits 668 From 广东深圳 | |
|
Discovery Process:
Some customers reported that when the program did not shut down normally, it often caused data loss in the database file, and the database file was illegal! Check the Program: In my own program, every time I write a data record, I have already called the "CFoxpro::Flush()" function, whose function is to truly write the data to the disk. If the situation mentioned above occurs, it should be that there is a problem with this function. BOOL CFoxpro::Flush() { //Check the validity of the file pointer if (NULL == m_pFile) { return(FALSE); } //Flush the disk buffer ::fflush(m_pFile); return(TRUE); } Initially, it was suspected that the fflush() function provided by the C function library did not completely write the data in the disk buffer to the disk. After using the help file of BC31, it was found that this was indeed the case! The correct modification should be as follows Solve the Problem: Modify CFoxpro::Flush() as shown below, which has been solved BOOL CFoxpro::Flush() { //Check the validity of the file pointer if (NULL == m_pFile) { return(FALSE); } //Flush the disk buffer ::fflush(m_pFile); int duphandle = ::dup(fileno(m_pFile)); ::close(duphandle); return(TRUE); } |
|
| Floor276 firstsail | Posted 2009-05-16 01:11 |
| 高级用户 Posts 295 Credits 668 From 广东深圳 | |
|
In order to let everyone know how WINSAIL schedules TCP/IP in a single-task system, the following explanations are made!
(1) In the CWindow::OnIdle(CObject* pObj) function of the window, the socket loop function pointed to by the TCP/IP loop processing entry function pointer pSocketLoopFc is called. The source code of CWindow::OnIdle(CObject* pObj) is as follows extern BOOL bAfxNetcard; // Flag indicating whether a network card is configured in the CONFIG.Sys file extern BOOL bAfxInitSocket; // Flag indicating whether the socket is successfully initialized extern BOOL (*__pSocketInitFc)(); // Socket initialization function pointer extern BOOL (*__pSocketCloseFc)();// Socket closing function pointer extern BOOL (*__pSocketLoopFc)(BOOL, BOOL, BOOL);// Socket loop function pointer void CWindow::OnIdle() { // Here, it is judged whether the TCP/IP stack needs to be executed if (bAfxNetcard && bAfxInitSocket && __pSocketLoopFc != NULL) { __pSocketLoopFc(TRUE, TRUE, TRUE); } // Here, the "idle function pointer" registered by the void CWindow::SetIdleFc() function is executed if (m_pIdleFc != NULL) { m_pIdleFc((CObject*)this); } } (2) The source code of the function AfxRegisterNetcardEntry() for registering the TCP/IP protocol stack is as follows BOOL AfxRegisterNetcardEntry(BOOL (*pSocketInitFc)(), BOOL (*pSocketCloseFc)(), BOOL (*pSocketLoopFc)(BOOL, BOOL, BOOL)) { if (pSocketInitFc == NULL || pSocketCloseFc == NULL) { return(FALSE); } __pSocketInitFc = pSocketInitFc; __pSocketCloseFc = pSocketCloseFc; __pSocketLoopFc = pSocketLoopFc; return(TRUE); } (3) The default in WinSail The socket initialization function: GlobalInitSocket() function The socket closing function is: GlobalCloseSocket() function The socket loop function: EthernetEntry() function EthernetEntry only processes ARP, RARP, ICMP requests and sends out the packets that have not been sent in time, and other requests are ignored. So users still need to rewrite their own "socket loop function". // The following is the user's own "socket loop function". This can refer to the Sail2000.Cpp file and Remote_N.Cpp file of the Sail3000 project, which implements functions such as "file transfer, keyboard key sending, mouse key sending, screen uploading, QQ chatting". BOOL User_EthernetEntry(BOOL bSingle, BOOL bSend, BOOL bIcmp) { // Run the default socket loop function ::EthernetEntry(bSingle, bSend, bIcmp); // Write your own SOCKET query, read, write, etc. below // (omitted) return(TRUE); } (4) Since WINSAIL runs in a single task, any long-term blocking anywhere will cause the TCP/IP to be blocked for a long time. In order to reduce this situation, in the blocking loop, you must call User_EthernetEnty(TRUE, TRUE, TRUE); (5) If the user registers a third-party TCP/IP stack (such as Watcp, etc.), the initialization function must return TRUE if it is successful, otherwise return FALSE. WinSail automatically sets the return flag of the initialization function to the bAfxInitSocket variable, and don't forget to set the "netCard" key value in the "Netcard" segment of the config.Sys file to TRUE to perfectly integrate with WinSail! The InitSystem() function in WINSAIL initializes the TCP/IP protocol stack in this way: bAfxInitSocket = FALSE; if (bAfxNetcard && __pSocketInitFc != NULL && __pSocketCloseFc != NULL) { if (!__pSocketInitFc()) { __pSocketCloseFc(); bAfxInitSocket = FALSE; //AfxMessageBox("Network","Failed to load network!"); } else { bAfxInitSocket = TRUE; } } [ Last edited by firstsail on 2009-5-16 at 02:25 ] |
|
| Floor277 zhiming420 | Posted 2009-11-15 09:08 |
| 新手上路 Posts 3 Credits 5 | |
|
Nice stuff oh
|
|
| Floor278 firstsail | Posted 2010-07-05 14:17 |
| 高级用户 Posts 295 Credits 668 From 广东深圳 | |
|
The website couldn't be logged in normally for several months due to an address resolution error. Now it can finally be logged in!
|
|
| Floor279 houwenhui | Posted 2010-07-09 13:56 |
| 新手上路 Posts 9 Credits 14 | |
|
That's amazing. I don't understand it.
|
|
| Floor280 firstsail | Posted 2011-01-14 11:15 |
| 高级用户 Posts 295 Credits 668 From 广东深圳 | |
|
Upgrading the MakeDlg.Exe File of WinSail
Two options are increased (1) Interpret CLabel and CGroup controls as non-controls (2) Align CGroup coordinates with Windows <1> If the option "Interpret CLabel and CGroup controls as non-controls" is selected, then the generation code of all CLabel and CGroup controls is commented out, and the void FAR OnDraw_VccFunction(CObject *) function is generated. The code inside the function is as follows: Among them, the CLabel control is interpreted as the ChPrintf() function Among them, the CGroup control is interpreted as the DrawBoxCaptionEx() function The purpose of such design is to save precious memory <2> If the option "Align CGroup coordinates with Windows" is selected, then the visible border area of the Group control of WinSail is the same as that of the Windows Group control. It is strongly recommended to use this option. Download address: http://www.firstsail.com.cn/software.html [ Last edited by firstsail on 2011-1-14 at 11:23 ] |
|
| Floor281 wuhengsi | Posted 2011-01-16 00:48 |
| 新手上路 Posts 5 Credits 10 | |
|
I am using China Unicom's network. I don't know why, I can't access Brother Guo's website "http://www.FirstSail.b2b.Cn".
Hope a kind friend can help send Brother Guo's software to my email. Thanks. Email address: [email protected] |
|
| Floor282 firstsail | Posted 2011-01-19 10:16 |
| 高级用户 Posts 295 Credits 668 From 广东深圳 | |
Originally posted by wuhengsi at 2011-1-16 00:48: Website address is: http://www.firstsail.com.cn/softwafe.html Email: [email protected] |
|
| Floor283 f371575950 | Posted 2016-12-24 23:58 |
| 新手上路 Posts 5 Credits 10 | |
|
Study study
|
|
| Floor284 firstsail2 | Posted 2018-07-13 20:16 |
| 新手上路 Posts 4 Credits 5 | |
|
Long time no come back!
|
|
| Floor285 firstsail | Posted 2018-07-14 12:08 |
| 高级用户 Posts 295 Credits 668 From 广东深圳 | |
|
In a single - chip microcomputer system or a Linux system, a custom database is often needed. How to make this database file recognizable by Office Excel under Windows? Now there is a method. You can use the database of Foxpro 2.6 version. The file structure is open and can be recognized by Excel.
In WinSail, it is composed of Foxpro.h and Foxpro.Cpp files. All the source code will be made public later. Those who need it can port it! |
|
| Prev 1 … 16 17 18 19 20 Next |
|
[ Contact the Union admin team -
中国DOS联盟 -
Standard version ] Sponsored by ifanr Inc | © 2001–2023 |