Changeset 536 for trunk/dll/common.c
- Timestamp:
- Nov 4, 2006, 10:09:21 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/dll/common.c
r446 r536 12 12 22 Jul 06 SHL Check more run time errors 13 13 15 Aug 06 SHL Use Dos_Error 14 03 Nov 06 SHL Rework thread usage count logic 14 15 15 16 ***********************************************************************/ … … 43 44 #pragma alloc_text(COMMON1,CommonCreateTextChildren,CommonCreateMainChildren) 44 45 #pragma alloc_text(COMMON2,CommonDriveCmd,CommonTextButton) 45 #pragma alloc_text(COMMON3,CommonMainWndProc )46 #pragma alloc_text(COMMON3,CommonMainWndProc,IncrThreadUsage,DecrThreadUsage) 46 47 #pragma alloc_text(COMMON4,CommonCnrProc) 47 48 #pragma alloc_text(COMMON5,OpenDirCnr) … … 655 656 case UM_THREADUSE: 656 657 if (hbmLEDon && hbmLEDoff) { 657 static LONG threaduse = 0;658 static LONG threaduse; 658 659 CHAR ts[33]; 659 660 … … 670 671 if(threaduse <= 0) { 671 672 threaduse = 0; 672 WinSendMsg(hwndLED,673 SM_SETHANDLE,674 MPFROMLONG(hbmLEDoff),675 MPVOID);673 WinSendMsg(hwndLED, 674 SM_SETHANDLE, 675 MPFROMLONG(hbmLEDoff), 676 MPVOID); 676 677 } 677 678 } 678 ltoa(threaduse, 679 ts, 680 10); 681 WinSetWindowText(hwndLEDHdr, 682 ts); 679 ltoa(threaduse,ts,10); 680 WinSetWindowText(hwndLEDHdr,ts); 681 DosSleep(0); 683 682 } 684 683 return 0; … … 988 987 } 989 988 989 //= IncrThreadUsage() Increment thread usage counter == 990 991 VOID IncrThreadUsage(VOID) 992 { 993 if (hwndMain) 994 WinPostMsg(hwndMain,UM_THREADUSE,MPFROMLONG(1),MPVOID); 995 } 996 997 998 //= DecrThreadUsage() Decrement thread usage counter == 999 1000 VOID DecrThreadUsage(VOID) 1001 { 1002 if (hwndMain) 1003 WinPostMsg(hwndMain,UM_THREADUSE,MPVOID,MPVOID); 1004 }
Note:
See TracChangeset
for help on using the changeset viewer.