Main Page | Class Hierarchy | Class List | File List | Class Members | File Members

bench.c

Go to the documentation of this file.
00001 00002 /*++ 00003 00004 Copyright (c) 1996 Microsoft Corporation 00005 00006 Module Name 00007 00008 bench.c 00009 00010 Abstract: 00011 00012 Measure time for a number of API calls or small application modules 00013 00014 Author: 00015 00016 Dan Almosnino (danalm) July 96 00017 Based on code by (MarkE) and DarrinM 00018 00019 Enviornment: 00020 00021 User Mode 00022 00023 Revision History: 00024 00025 Dan Almosnino (danalm) 20-Sept-195 00026 00027 1. Timer call modified to run on both NT and WIN95. 00028 00029 Dan Almosnino (danalm) 20-Nov-1995 00030 00031 1. Modified Timer call to measure Pentium cycle counts when applicable 00032 2. Modified default numbers for test iterations to accomodate the statistical module add-on. 00033 (Typically 10 test samples are taken, doing 10-1000 iterations each). 00034 00035 Dan Almosnino (danalm) 25-July-96 00036 00037 1. Adapted to the same format as that of GDIbench, including the features above. 00038 2. Cleanup some tests. 00039 00040 --*/ 00041 00042 #include "precomp.h" 00043 #include "bench.h" 00044 #include "usrbench.h" 00045 #include "resource.h" 00046 00047 #ifndef WIN32 00048 #define APIENTRY FAR PASCAL 00049 typedef int INT; 00050 typedef char CHAR; 00051 #endif 00052 00053 #define SETWINDOWLONGVAL 99999L 00054 /* 00055 * Function prototypes 00056 */ 00057 INT_PTR APIENTRY FileOpenDlgProc(HWND, UINT, WPARAM, LPARAM); 00058 INT_PTR APIENTRY ClearDlg(HWND, UINT, WPARAM, LPARAM); 00059 INT_PTR APIENTRY ClearDlgNoState(HWND, UINT, WPARAM, LPARAM); 00060 LRESULT APIENTRY CreateDestroyWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam); 00061 LRESULT APIENTRY CreateDestroyWndProcW(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam); 00062 00063 #ifdef ASSERT 00064 #undef ASSERT 00065 #endif 00066 00067 #define ASSERT(expr) if (!(expr)) { char szBuf[256]; \ 00068 sprintf(szBuf,"Assertion Failure %s %ld:"#expr"\n", __FILE__, __LINE__); \ 00069 MessageBox(NULL, szBuf, "Assert Failure", MB_OK); } 00070 00071 00072 static void DispErrorMsg(const char* title) 00073 { 00074 LPVOID msgbuf; 00075 00076 if (title == NULL) { 00077 title = "Error"; 00078 } 00079 FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM, 00080 NULL, 00081 GetLastError(), 00082 MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), // Default language 00083 (LPTSTR) &msgbuf, 00084 0, 00085 NULL); 00086 MessageBox(NULL, msgbuf, title, MB_OK | MB_ICONEXCLAMATION); 00087 LocalFree(msgbuf); 00088 } 00089 00090 /* 00091 * Global variables 00092 */ 00093 CHAR *aszTypical[] = { 00094 "change", "alteration", "amendment", "mutation", "permutation", 00095 "variation", "substitution", "modification", "transposition", 00096 "transformation" 00097 }; 00098 INT NStrings = sizeof(aszTypical)/sizeof(aszTypical[0]); 00099 00100 BOOL gfSetFocus = TRUE; 00101 #define PROPCLASSNAME TEXT("PropWindow") 00102 00103 /* 00104 * External global variables. 00105 */ 00106 00107 extern HWND ghwndFrame, ghwndMDIClient; 00108 extern HANDLE ghinst; 00109 00110 /*++ 00111 00112 Routine Description: 00113 00114 Measure start count 00115 00116 Arguments 00117 00118 00119 00120 Return Value - Performance Count 00121 00122 00123 --*/ 00124 extern BOOL gfPentium; 00125 _int64 00126 BeginTimeMeasurement() 00127 { 00128 _int64 PerformanceCount; 00129 extern BOOL gfUseCycleCount; 00130 00131 #ifdef _X86_ 00132 SYSTEM_INFO SystemInfo; 00133 GetSystemInfo(&SystemInfo); 00134 if(gfUseCycleCount&&(PROCESSOR_INTEL_PENTIUM==SystemInfo.dwProcessorType)) 00135 gfPentium = TRUE; 00136 else 00137 #endif 00138 gfPentium = FALSE; 00139 #ifdef _X86_ 00140 if(gfPentium) 00141 PerformanceCount = GetCycleCount(); 00142 else 00143 #endif 00144 QueryPerformanceCounter((LARGE_INTEGER *)&PerformanceCount); 00145 00146 return(PerformanceCount); 00147 } 00148 00149 /*++ 00150 00151 Routine Description: 00152 00153 Measure stop count and return the calculated time difference 00154 00155 Arguments 00156 00157 StartTime = Start Time Count 00158 Iter = No. of Test Iterations 00159 00160 Return Value - Test Time per Iteration, in 100 nano-second units 00161 00162 00163 --*/ 00164 00165 ULONGLONG 00166 EndTimeMeasurement( 00167 _int64 StartTime, 00168 ULONG Iter) 00169 { 00170 00171 _int64 PerformanceCount; 00172 extern _int64 PerformanceFreq; 00173 extern BOOL gfPentium; 00174 00175 #ifdef _X86_ 00176 if(gfPentium) 00177 { 00178 PerformanceCount = GetCycleCount(); 00179 PerformanceCount -= CCNT_OVERHEAD; 00180 } 00181 else 00182 #endif 00183 QueryPerformanceCounter((LARGE_INTEGER *)&PerformanceCount); 00184 00185 PerformanceCount -= StartTime ; 00186 00187 #ifdef _X86_ 00188 if(gfPentium) 00189 PerformanceCount /= Iter; 00190 else 00191 #endif 00192 PerformanceCount /= (PerformanceFreq * Iter); // Result is in 100ns units 00193 // because PerformanceFreq 00194 // was set to Counts/(100ns) 00195 return((ULONGLONG)PerformanceCount); 00196 } 00198 00199 /*++ 00200 00201 Routine Description: 00202 00203 Measure APIs 00204 00205 Arguments 00206 00207 hdc - dc 00208 iter - number of times to call 00209 00210 Return Value 00211 00212 time for calls 00213 00214 --*/ 00215 00216 /***************************************************************************\ 00217 * RegisterClass 00218 * 00219 * 00220 * History: 00221 \***************************************************************************/ 00222 00223 ULONGLONG 00224 msProfRegisterClass( 00225 HDC hdc, 00226 ULONG Iter) 00227 { 00228 INIT_TIMER; 00229 WNDCLASS wc; 00230 00231 wc.style = 0; 00232 wc.lpfnWndProc = CreateDestroyWndProc; 00233 wc.cbClsExtra = 0; 00234 wc.cbWndExtra = 0; 00235 wc.hInstance = ghinst; 00236 wc.hIcon = LoadIcon(ghinst, (LPSTR)IDUSERBENCH); 00237 wc.hCursor = LoadCursor(NULL, IDC_ARROW); 00238 wc.hbrBackground = (HBRUSH)(COLOR_APPWORKSPACE + 1); 00239 wc.lpszMenuName = NULL; 00240 wc.lpszClassName = PROPCLASSNAME; 00241 00242 START_TIMER; 00243 00244 while (ix--) 00245 { 00246 RegisterClass(&wc); 00247 UnregisterClass(PROPCLASSNAME, ghinst); 00248 } 00249 00250 END_TIMER; 00251 00252 } 00253 00254 00255 /***************************************************************************\ 00256 * Class Query APIs 00257 * 00258 * 00259 * History: 00260 \***************************************************************************/ 00261 00262 ULONGLONG msProfClassGroup(HDC hdc, ULONG Iter) 00263 { 00264 00265 char szBuf[50]; 00266 HICON hIcon; 00267 INIT_TIMER; 00268 WNDCLASS wc; 00269 00270 wc.style = 0; 00271 wc.lpfnWndProc = CreateDestroyWndProc; 00272 wc.cbClsExtra = 0; 00273 wc.cbWndExtra = 0; 00274 wc.hInstance = ghinst; 00275 wc.hIcon = hIcon = LoadIcon(ghinst, (LPSTR)IDUSERBENCH); 00276 wc.hCursor = LoadCursor(NULL, IDC_ARROW); 00277 wc.hbrBackground = (HBRUSH)(COLOR_APPWORKSPACE + 1); 00278 wc.lpszMenuName = NULL; 00279 wc.lpszClassName = PROPCLASSNAME; 00280 RegisterClass(&wc); 00281 00282 START_TIMER; 00283 00284 while (ix--) 00285 { 00286 GetClassInfo(ghinst, PROPCLASSNAME, &wc); 00287 GetClassName(ghwndFrame, szBuf, sizeof(szBuf)/sizeof(szBuf[0])); 00288 GetClassLongPtr(ghwndFrame, GCLP_HBRBACKGROUND); 00289 SetClassLongPtr(ghwndFrame, GCLP_HICON, (LONG_PTR)hIcon); 00290 } 00291 00292 END_TIMER_NO_RETURN; 00293 00294 UnregisterClass(PROPCLASSNAME, ghinst); 00295 00296 RETURN_STOP_TIME; 00297 } 00298 00299 00300 /***************************************************************************\ 00301 * Clipboard APIs tests 00302 * 00303 * 00304 * History: 00305 \***************************************************************************/ 00306 00307 ULONGLONG msProfClipboardGroup(HDC hdc, ULONG Iter) 00308 { 00309 00310 INIT_TIMER; 00311 HGLOBAL h; 00312 int i; 00313 00314 START_TIMER; 00315 00316 while (ix--) 00317 { 00318 START_OVERHEAD; 00319 h = GlobalAlloc(GPTR | GMEM_DDESHARE, 80); 00320 strcpy( h, "hello"); 00321 END_OVERHEAD; 00322 00323 OpenClipboard(ghwndFrame); 00324 EmptyClipboard(); 00325 SetClipboardData(CF_TEXT, h); 00326 GetClipboardData(CF_TEXT); 00327 CloseClipboard(); 00328 } 00329 00330 END_TIMER_NO_RETURN; 00331 RETURN_STOP_TIME; 00332 } 00333 00334 00335 /***************************************************************************\ 00336 * ProfAvgDlgDraw 00337 * 00338 * 00339 * History: 00340 \***************************************************************************/ 00341 00342 ULONGLONG msProfAvgDlgDraw(HDC hdc, ULONG Iter) 00343 { 00344 00345 CHAR szFile[128]; 00346 INIT_TIMER; 00347 00348 HWND hwnd = CreateDialogParam(ghinst, MAKEINTRESOURCE(CLEARBOX), ghwndFrame, 00349 ClearDlg, MAKELONG(szFile,0)); 00350 00351 START_TIMER; 00352 00353 while (ix--) 00354 { 00355 ShowWindow(hwnd, TRUE); 00356 UpdateWindow(hwnd); 00357 ShowWindow(hwnd, FALSE); 00358 } 00359 00360 END_TIMER_NO_RETURN; 00361 00362 DestroyWindow(hwnd); 00363 00364 RETURN_STOP_TIME; 00365 00366 } 00367 00368 00369 ULONGLONG msProfAvgDlgCreate(HDC hdc, ULONG Iter) 00370 { 00371 00372 HWND hwnd; 00373 CHAR szFile[128]; 00374 INIT_TIMER; 00375 00376 START_TIMER; 00377 00378 while (ix--) 00379 { 00380 hwnd = CreateDialogParam(ghinst, MAKEINTRESOURCE(CLEARBOX), ghwndFrame, 00381 ClearDlg, MAKELONG(szFile,0)); 00382 ShowWindow(hwnd, TRUE); 00383 UpdateWindow(hwnd); 00384 DestroyWindow(hwnd); 00385 } 00386 00387 END_TIMER_NO_RETURN; 00388 00389 RETURN_STOP_TIME; 00390 } 00391 00392 00393 ULONGLONG msProfAvgDlgCreateDestroy(HDC hdc, ULONG Iter) 00394 { 00395 00396 HWND hwnd; 00397 CHAR szFile[128]; 00398 INIT_TIMER; 00399 00400 gfSetFocus = FALSE; // Trying to minimize GDI's impact. 00401 00402 START_TIMER; 00403 00404 while (ix--) 00405 { 00406 hwnd = CreateDialogParam(ghinst, MAKEINTRESOURCE(CLEARBOX), ghwndFrame, 00407 ClearDlg, MAKELONG(szFile,0)); 00408 DestroyWindow(hwnd); 00409 } 00410 00411 END_TIMER_NO_RETURN; 00412 00413 gfSetFocus = TRUE; 00414 00415 RETURN_STOP_TIME; 00416 00417 } 00418 00419 00420 ULONGLONG msProfAvgDlgCreateDestroyNoMenu(HDC hdc, ULONG Iter) 00421 { 00422 00423 HWND hwnd; 00424 CHAR szFile[128]; 00425 INIT_TIMER; 00426 00427 gfSetFocus = FALSE; // Trying to minimize GDI's impact. 00428 00429 START_TIMER; 00430 00431 while (ix--) 00432 { 00433 hwnd = CreateDialogParam(ghinst, MAKEINTRESOURCE(CLEARBOXNOMENU), ghwndFrame, 00434 ClearDlg, MAKELONG(szFile,0)); 00435 DestroyWindow(hwnd); 00436 } 00437 00438 END_TIMER_NO_RETURN; 00439 00440 gfSetFocus = TRUE; 00441 00442 RETURN_STOP_TIME; 00443 } 00444 00445 00446 ULONGLONG msProfAvgDlgCreateDestroyNoFont(HDC hdc, ULONG Iter) 00447 { 00448 00449 HWND hwnd; 00450 CHAR szFile[128]; 00451 INIT_TIMER; 00452 00453 gfSetFocus = FALSE; // Trying to minimize GDI's impact. 00454 00455 START_TIMER; 00456 00457 while (ix--) 00458 { 00459 hwnd = CreateDialogParam(ghinst, MAKEINTRESOURCE(CLEARBOXNOFONT), ghwndFrame, 00460 ClearDlg, MAKELONG(szFile,0)); 00461 DestroyWindow(hwnd); 00462 } 00463 00464 END_TIMER_NO_RETURN; 00465 00466 gfSetFocus = TRUE; 00467 00468 RETURN_STOP_TIME; 00469 00470 } 00471 00472 00473 ULONGLONG msProfAvgDlgCreateDestroyEmpty(HDC hdc, ULONG Iter) 00474 { 00475 00476 HWND hwnd; 00477 CHAR szFile[128]; 00478 INIT_TIMER; 00479 00480 gfSetFocus = FALSE; // Trying to minimize GDI's impact. 00481 00482 START_TIMER; 00483 00484 while (ix--) 00485 { 00486 hwnd = CreateDialogParam(ghinst, MAKEINTRESOURCE(EMPTY), ghwndFrame, 00487 ClearDlgNoState, MAKELONG(szFile,0)); 00488 DestroyWindow(hwnd); 00489 } 00490 00491 END_TIMER_NO_RETURN; 00492 00493 gfSetFocus = TRUE; 00494 00495 RETURN_STOP_TIME; 00496 00497 } 00498 00499 00500 00501 ULONGLONG msProfCreateDestroyWindow(HDC hdc, ULONG Iter) 00502 { 00503 00504 HWND hwnd; 00505 INIT_TIMER; 00506 WNDCLASS wc; 00507 00508 if(!ghinst)MessageBox(GetParent(ghwndMDIClient), "1ghinst==0","ERROR!", MB_OK); 00509 00510 00511 wc.style = 0; 00512 wc.lpfnWndProc = CreateDestroyWndProc; 00513 wc.cbClsExtra = 0; 00514 wc.cbWndExtra = 0; 00515 wc.hInstance = ghinst; 00516 wc.hIcon = LoadIcon(ghinst, (LPSTR)IDUSERBENCH); 00517 wc.hCursor = LoadCursor((HINSTANCE)NULL, IDC_ARROW); 00518 wc.hbrBackground = (HBRUSH)(COLOR_APPWORKSPACE + 1); 00519 wc.lpszMenuName = NULL; 00520 wc.lpszClassName = "CreateDestroyWindow"; 00521 00522 00523 if (!RegisterClass(&wc)) { 00524 MessageBox(GetParent(ghwndMDIClient), "1RegisterClass call failed.", 00525 "ERROR!", MB_OK); 00526 return (ULONGLONG)(0); 00527 } 00528 00529 00530 START_TIMER; 00531 00532 while (ix--) 00533 { 00534 hwnd = CreateWindow("CreateDestroyWindow", "Create/DestroyWindow test", 00535 WS_OVERLAPPEDWINDOW, 00536 CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, 00537 NULL, NULL, ghinst, NULL); 00538 if (hwnd == NULL) { 00539 MessageBox(GetParent(ghwndMDIClient), "CreateWindow call failed.", 00540 "ERROR!", MB_OK); 00541 break; 00542 } 00543 DestroyWindow(hwnd); 00544 } 00545 00546 END_TIMER_NO_RETURN; 00547 00548 UnregisterClass("CreateDestroyWindow", ghinst); 00549 00550 RETURN_STOP_TIME; 00551 00552 } 00553 00554 00555 ULONGLONG msProfCreateDestroyChildWindow(HDC hdc, ULONG Iter) 00556 { 00557 00558 HWND hwnd, hwndParent; 00559 INIT_TIMER; 00560 00561 WNDCLASS wc; 00562 00563 wc.style = 0; 00564 wc.lpfnWndProc = CreateDestroyWndProc; 00565 wc.cbClsExtra = 0; 00566 wc.cbWndExtra = 0; 00567 wc.hInstance = ghinst; 00568 wc.hIcon = LoadIcon(ghinst, (LPSTR)IDUSERBENCH); 00569 wc.hCursor = LoadCursor(NULL, IDC_ARROW); 00570 wc.hbrBackground = (HBRUSH)(COLOR_APPWORKSPACE + 1); 00571 wc.lpszMenuName = NULL; 00572 wc.lpszClassName = "CreateDestroyWindow"; 00573 00574 if (!RegisterClass(&wc)) { 00575 MessageBox(GetParent(ghwndMDIClient), "2RegisterClass call failed.", 00576 "ERROR!", MB_OK); 00577 return (ULONGLONG)(0); 00578 } 00579 00580 hwndParent = CreateWindow("CreateDestroyWindow", NULL, WS_CHILD, 00581 CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, 00582 ghwndMDIClient, NULL, ghinst, NULL); 00583 00584 START_TIMER; 00585 00586 while (ix--) 00587 { 00588 hwnd = CreateWindow("CreateDestroyWindow", "Create/DestroyWindow test", 00589 WS_CHILD, 00590 CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, 00591 hwndParent, NULL, ghinst, NULL); 00592 if (hwnd == NULL) { 00593 MessageBox(GetParent(ghwndMDIClient), "CreateWindow call failed.", 00594 "ERROR!", MB_OK); 00595 break; 00596 } 00597 DestroyWindow(hwnd); 00598 } 00599 00600 END_TIMER_NO_RETURN; 00601 00602 DestroyWindow(hwndParent); 00603 UnregisterClass("CreateDestroyWindow", ghinst); 00604 00605 RETURN_STOP_TIME; 00606 } 00607 00608 00609 LRESULT APIENTRY CreateDestroyWndProc( 00610 HWND hwnd, 00611 UINT msg, 00612 WPARAM wParam, 00613 LPARAM lParam) 00614 { 00615 switch (msg) { 00616 case WM_SETTEXT: 00617 case WM_GETTEXTLENGTH: 00618 break; 00619 default: 00620 return DefWindowProc(hwnd, msg, wParam, lParam); 00621 00622 } 00623 00624 return 0; 00625 } 00626 00627 LRESULT APIENTRY CreateDestroyWndProcW( 00628 HWND hwnd, 00629 UINT msg, 00630 WPARAM wParam, 00631 LPARAM lParam) 00632 { 00633 switch (msg) { 00634 case WM_SETTEXT: 00635 case WM_GETTEXTLENGTH: 00636 break; 00637 default: 00638 return DefWindowProcW(hwnd, msg, wParam, lParam); 00639 } 00640 00641 return 0; 00642 } 00643 00644 00645 ULONGLONG msProfLocalAllocFree(HDC hdc, ULONG Iter) 00646 { 00647 00648 HANDLE h1, h2, h3, h4, h5; 00649 INIT_TIMER; 00650 00651 START_TIMER; 00652 00653 // Try to stress the heap a little bit more than just doing a 00654 // series of Alloc/Frees. 00655 00656 while (ix--) // originally ix<Iter/5 as well 00657 { 00658 h1 = LocalAlloc(0, 500); 00659 h2 = LocalAlloc(0, 600); 00660 h3 = LocalAlloc(0, 700); 00661 LocalFree(h2); 00662 h4 = LocalAlloc(0, 1000); 00663 h5 = LocalAlloc(0, 100); 00664 LocalFree(h1); 00665 LocalFree(h3); 00666 LocalFree(h4); 00667 LocalFree(h5); 00668 } 00669 00670 END_TIMER; 00671 } 00672 00673 00674 ULONGLONG msProfGetWindowLong(HDC hdc, ULONG Iter) 00675 { 00676 00677 HWND hwnd; 00678 INIT_TIMER; 00679 LONG l; 00680 WNDCLASS wc; 00681 00682 wc.style = 0; 00683 wc.lpfnWndProc = CreateDestroyWndProc; 00684 wc.cbClsExtra = 0; 00685 wc.cbWndExtra = 4; 00686 wc.hInstance = ghinst; 00687 wc.hIcon = LoadIcon(ghinst, (LPSTR)IDUSERBENCH); 00688 wc.hCursor = LoadCursor(NULL, IDC_ARROW); 00689 wc.hbrBackground = (HBRUSH)(COLOR_APPWORKSPACE + 1); 00690 wc.lpszMenuName = NULL; 00691 wc.lpszClassName = "CreateDestroyWindow"; 00692 00693 if (!RegisterClass(&wc)) { 00694 MessageBox(GetParent(ghwndMDIClient), "3RegisterClass call failed.", 00695 "ERROR!", MB_OK); 00696 return (ULONGLONG)(0); 00697 } 00698 00699 hwnd = CreateWindow("CreateDestroyWindow", "Create/DestroyWindow test", 00700 WS_OVERLAPPEDWINDOW, 00701 CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, 00702 NULL, NULL, ghinst, NULL); 00703 00704 if (hwnd == NULL) { 00705 MessageBox(GetParent(ghwndMDIClient), "CreateWindow call failed.", 00706 "ERROR!", MB_OK); 00707 return (ULONGLONG)(0); 00708 } 00709 00710 START_TIMER; 00711 00712 while (ix--) 00713 l = GetWindowLong(hwnd, 0); 00714 00715 END_TIMER_NO_RETURN; 00716 00717 DestroyWindow(hwnd); 00718 UnregisterClass("CreateDestroyWindow", ghinst); 00719 00720 RETURN_STOP_TIME; 00721 00722 } 00723 00724 00725 ULONGLONG msProfSetWindowLong(HDC hdc, ULONG Iter) 00726 { 00727 00728 HWND hwnd; 00729 INIT_TIMER; 00730 LONG l; 00731 WNDCLASS wc; 00732 00733 wc.style = 0; 00734 wc.lpfnWndProc = CreateDestroyWndProc; 00735 wc.cbClsExtra = 0; 00736 wc.cbWndExtra = 4; 00737 wc.hInstance = ghinst; 00738 wc.hIcon = LoadIcon(ghinst, (LPSTR)IDUSERBENCH); 00739 wc.hCursor = LoadCursor(NULL, IDC_ARROW); 00740 wc.hbrBackground = (HBRUSH)(COLOR_APPWORKSPACE + 1); 00741 wc.lpszMenuName = NULL; 00742 wc.lpszClassName = "CreateDestroyWindow"; 00743 00744 if (!RegisterClass(&wc)) { 00745 MessageBox(GetParent(ghwndMDIClient), "4RegisterClass call failed.", 00746 "ERROR!", MB_OK); 00747 return (ULONGLONG)(0); 00748 } 00749 00750 hwnd = CreateWindow("CreateDestroyWindow", "Create/DestroyWindow test", 00751 WS_OVERLAPPEDWINDOW, 00752 CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, 00753 NULL, NULL, ghinst, NULL); 00754 00755 if (hwnd == NULL) { 00756 MessageBox(GetParent(ghwndMDIClient), "CreateWindow call failed.", 00757 "ERROR!", MB_OK); 00758 return (ULONGLONG)(0); 00759 } 00760 00761 START_TIMER; 00762 00763 while (ix--) 00764 l = SetWindowLong(hwnd, 0, SETWINDOWLONGVAL); 00765 00766 END_TIMER_NO_RETURN; 00767 00768 DestroyWindow(hwnd); 00769 UnregisterClass("CreateDestroyWindow", ghinst); 00770 00771 RETURN_STOP_TIME; 00772 00773 } 00774 00775 00776 ULONGLONG msProfCreateDestroyListbox(HDC hdc, ULONG Iter) 00777 { 00778 00779 HWND hwnd, hwndParent; 00780 INIT_TIMER; 00781 WNDCLASS wc; 00782 00783 wc.style = 0; 00784 wc.lpfnWndProc = CreateDestroyWndProc; 00785 wc.cbClsExtra = 0; 00786 wc.cbWndExtra = 0; 00787 wc.hInstance = ghinst; 00788 wc.hIcon = LoadIcon(ghinst, (LPSTR)IDUSERBENCH); 00789 wc.hCursor = LoadCursor(NULL, IDC_ARROW); 00790 wc.hbrBackground = (HBRUSH)(COLOR_APPWORKSPACE + 1); 00791 wc.lpszMenuName = NULL; 00792 wc.lpszClassName = "CreateDestroyWindow"; 00793 00794 if (!RegisterClass(&wc)) { 00795 MessageBox(GetParent(ghwndMDIClient), "5RegisterClass call failed.", 00796 "ERROR!", MB_OK); 00797 return (ULONGLONG)(0); 00798 } 00799 00800 hwndParent = CreateWindow("CreateDestroyWindow", NULL, WS_CHILD, 00801 CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, 00802 ghwndMDIClient, NULL, ghinst, NULL); 00803 00804 START_TIMER; 00805 00806 while (ix--) 00807 { 00808 hwnd = CreateWindow("ListBox", NULL, WS_CHILD | LBS_STANDARD | WS_VISIBLE, 00809 50, 50, 200, 250, hwndParent, NULL, ghinst, NULL); 00810 if (hwnd == NULL) { 00811 MessageBox(GetParent(ghwndMDIClient), "CreateWindow call failed.", 00812 "ERROR!", MB_OK); 00813 return (ULONGLONG)(0); 00814 } 00815 DestroyWindow(hwnd); 00816 } 00817 00818 END_TIMER_NO_RETURN; 00819 00820 DestroyWindow(hwndParent); 00821 UnregisterClass("CreateDestroyWindow", ghinst); 00822 00823 RETURN_STOP_TIME; 00824 00825 } 00826 00827 00828 ULONGLONG msProfCreateDestroyButton(HDC hdc, ULONG Iter) 00829 { 00830 00831 HWND hwnd, hwndParent; 00832 INIT_TIMER; 00833 WNDCLASS wc; 00834 00835 wc.style = 0; 00836 wc.lpfnWndProc = CreateDestroyWndProc; 00837 wc.cbClsExtra = 0; 00838 wc.cbWndExtra = 0; 00839 wc.hInstance = ghinst; 00840 wc.hIcon = LoadIcon(ghinst, (LPSTR)IDUSERBENCH); 00841 wc.hCursor = LoadCursor(NULL, IDC_ARROW); 00842 wc.hbrBackground = (HBRUSH)(COLOR_APPWORKSPACE + 1); 00843 wc.lpszMenuName = NULL; 00844 wc.lpszClassName = "CreateDestroyWindow"; 00845 00846 if (!RegisterClass(&wc)) { 00847 MessageBox(GetParent(ghwndMDIClient), "6RegisterClass call failed.", 00848 "ERROR!", MB_OK); 00849 return (ULONGLONG)(0); 00850 } 00851 00852 hwndParent = CreateWindow("CreateDestroyWindow", NULL, WS_CHILD, 00853 CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, 00854 ghwndMDIClient, NULL, ghinst, NULL); 00855 00856 START_TIMER; 00857 00858 while (ix--) 00859 { 00860 hwnd = CreateWindow("Button", "OK", WS_CHILD | BS_PUSHBUTTON, 00861 50, 50, 200, 250, hwndParent, NULL, ghinst, NULL); 00862 if (hwnd == NULL) { 00863 MessageBox(GetParent(ghwndMDIClient), "CreateWindow call failed.", 00864 "ERROR!", MB_OK); 00865 return (ULONGLONG)(0); 00866 } 00867 DestroyWindow(hwnd); 00868 } 00869 00870 END_TIMER_NO_RETURN; 00871 00872 DestroyWindow(hwndParent); 00873 UnregisterClass("CreateDestroyWindow", ghinst); 00874 00875 RETURN_STOP_TIME; 00876 00877 } 00878 00879 00880 ULONGLONG msProfCreateDestroyCombobox(HDC hdc, ULONG Iter) 00881 { 00882 00883 HWND hwnd, hwndParent; 00884 INIT_TIMER; 00885 WNDCLASS wc; 00886 00887 wc.style = 0; 00888 wc.lpfnWndProc = CreateDestroyWndProc; 00889 wc.cbClsExtra = 0; 00890 wc.cbWndExtra = 0; 00891 wc.hInstance = ghinst; 00892 wc.hIcon = LoadIcon(ghinst, (LPSTR)IDUSERBENCH); 00893 wc.hCursor = LoadCursor(NULL, IDC_ARROW); 00894 wc.hbrBackground = (HBRUSH)(COLOR_APPWORKSPACE + 1); 00895 wc.lpszMenuName = NULL; 00896 wc.lpszClassName = "CreateDestroyWindow"; 00897 00898 if (!RegisterClass(&wc)) { 00899 MessageBox(GetParent(ghwndMDIClient), "7RegisterClass call failed.", 00900 "ERROR!", MB_OK); 00901 return (ULONGLONG)(0); 00902 } 00903 00904 hwndParent = CreateWindow("CreateDestroyWindow", NULL, WS_CHILD, 00905 CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, 00906 ghwndMDIClient, NULL, ghinst, NULL); 00907 00908 START_TIMER; 00909 00910 while (ix--) 00911 { 00912 hwnd = CreateWindow("Combobox", NULL, WS_CHILD | CBS_SIMPLE | CBS_HASSTRINGS | WS_VISIBLE, 00913 50, 50, 200, 250, hwndParent, NULL, ghinst, NULL); 00914 if (hwnd == NULL) { 00915 MessageBox(GetParent(ghwndMDIClient), "CreateWindow call failed.", 00916 "ERROR!", MB_OK); 00917 return (ULONGLONG)(0); 00918 } 00919 DestroyWindow(hwnd); 00920 } 00921 00922 END_TIMER_NO_RETURN; 00923 00924 DestroyWindow(hwndParent); 00925 UnregisterClass("CreateDestroyWindow", ghinst); 00926 00927 RETURN_STOP_TIME; 00928 00929 } 00930 00931 00932 ULONGLONG msProfCreateDestroyEdit(HDC hdc, ULONG Iter) 00933 { 00934 00935 HWND hwnd, hwndParent; 00936 INIT_TIMER; 00937 WNDCLASS wc; 00938 00939 wc.style = 0; 00940 wc.lpfnWndProc = CreateDestroyWndProc; 00941 wc.cbClsExtra = 0; 00942 wc.cbWndExtra = 0; 00943 wc.hInstance = ghinst; 00944 wc.hIcon = LoadIcon(ghinst, (LPSTR)IDUSERBENCH); 00945 wc.hCursor = LoadCursor(NULL, IDC_ARROW); 00946 wc.hbrBackground = (HBRUSH)(COLOR_APPWORKSPACE + 1); 00947 wc.lpszMenuName = NULL; 00948 wc.lpszClassName = "CreateDestroyWindow"; 00949 00950 if (!RegisterClass(&wc)) { 00951 MessageBox(GetParent(ghwndMDIClient), "8RegisterClass call failed.", 00952 "ERROR!", MB_OK); 00953 return (ULONGLONG)(0); 00954 } 00955 00956 hwndParent = CreateWindow("CreateDestroyWindow", NULL, WS_CHILD, 00957 CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, 00958 ghwndMDIClient, NULL, ghinst, NULL); 00959 00960 START_TIMER; 00961 00962 while (ix--) 00963 { 00964 hwnd = CreateWindow("Edit", NULL, WS_CHILD | WS_VISIBLE, 00965 50, 50, 200, 250, hwndParent, NULL, ghinst, NULL); 00966 if (hwnd == NULL) { 00967 MessageBox(GetParent(ghwndMDIClient), "CreateWindow call failed.", 00968 "ERROR!", MB_OK); 00969 return (ULONGLONG)(0); 00970 } 00971 DestroyWindow(hwnd); 00972 } 00973 00974 END_TIMER_NO_RETURN; 00975 00976 DestroyWindow(hwndParent); 00977 UnregisterClass("CreateDestroyWindow", ghinst); 00978 00979 RETURN_STOP_TIME; 00980 00981 } 00982 00983 00984 ULONGLONG msProfCreateDestroyStatic(HDC hdc, ULONG Iter) 00985 { 00986 00987 HWND hwnd, hwndParent; 00988 INIT_TIMER; 00989 WNDCLASS wc; 00990 00991 wc.style = 0; 00992 wc.lpfnWndProc = CreateDestroyWndProc; 00993 wc.cbClsExtra = 0; 00994 wc.cbWndExtra = 0; 00995 wc.hInstance = ghinst; 00996 wc.hIcon = LoadIcon(ghinst, (LPSTR)IDUSERBENCH); 00997 wc.hCursor = LoadCursor(NULL, IDC_ARROW); 00998 wc.hbrBackground = (HBRUSH)(COLOR_APPWORKSPACE + 1); 00999 wc.lpszMenuName = NULL; 01000 wc.lpszClassName = "CreateDestroyWindow"; 01001 01002 if (!RegisterClass(&wc)) { 01003 MessageBox(GetParent(ghwndMDIClient), "9RegisterClass call failed.", 01004 "ERROR!", MB_OK); 01005 return (ULONGLONG)(0); 01006 } 01007 01008 hwndParent = CreateWindow("CreateDestroyWindow", NULL, WS_CHILD, 01009 CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, 01010 ghwndMDIClient, NULL, ghinst, NULL); 01011 01012 START_TIMER; 01013 01014 while (ix--) 01015 { 01016 hwnd = CreateWindow("Static", "Hello", WS_CHILD | SS_SIMPLE, 01017 50, 50, 200, 250, hwndParent, NULL, ghinst, NULL); 01018 if (hwnd == NULL) { 01019 MessageBox(GetParent(ghwndMDIClient), "CreateWindow call failed.", 01020 "ERROR!", MB_OK); 01021 return (ULONGLONG)(0); 01022 } 01023 DestroyWindow(hwnd); 01024 } 01025 01026 END_TIMER_NO_RETURN; 01027 01028 DestroyWindow(hwndParent); 01029 UnregisterClass("CreateDestroyWindow", ghinst); 01030 01031 RETURN_STOP_TIME; 01032 01033 } 01034 01035 01036 ULONGLONG msProfCreateDestroyScrollbar(HDC hdc, ULONG Iter) 01037 { 01038 01039 HWND hwnd, hwndParent; 01040 INIT_TIMER; 01041 WNDCLASS wc; 01042 01043 wc.style = 0; 01044 wc.lpfnWndProc = CreateDestroyWndProc; 01045 wc.cbClsExtra = 0; 01046 wc.cbWndExtra = 0; 01047 wc.hInstance = ghinst; 01048 wc.hIcon = LoadIcon(ghinst, (LPSTR)IDUSERBENCH); 01049 wc.hCursor = LoadCursor(NULL, IDC_ARROW); 01050 wc.hbrBackground = (HBRUSH)(COLOR_APPWORKSPACE + 1); 01051 wc.lpszMenuName = NULL; 01052 wc.lpszClassName = "CreateDestroyWindow"; 01053 01054 if (!RegisterClass(&wc)) { 01055 MessageBox(GetParent(ghwndMDIClient), "10RegisterClass call failed.", 01056 "ERROR!", MB_OK); 01057 return (ULONGLONG)(0); 01058 } 01059 01060 hwndParent = CreateWindow("CreateDestroyWindow", NULL, WS_CHILD, 01061 CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, 01062 ghwndMDIClient, NULL, ghinst, NULL); 01063 01064 START_TIMER; 01065 01066 while (ix--) 01067 { 01068 hwnd = CreateWindow("Scrollbar", "Hello", WS_CHILD | SBS_HORZ | SBS_TOPALIGN, 01069 50, 50, 100, 100, hwndParent, NULL, ghinst, NULL); 01070 if (hwnd == NULL) { 01071 MessageBox(GetParent(ghwndMDIClient), "CreateWindow call failed.", 01072 "ERROR!", MB_OK); 01073 return (ULONGLONG)(0); 01074 } 01075 DestroyWindow(hwnd); 01076 } 01077 01078 END_TIMER_NO_RETURN; 01079 01080 DestroyWindow(hwndParent); 01081 UnregisterClass("CreateDestroyWindow", ghinst); 01082 01083 RETURN_STOP_TIME; 01084 01085 } 01086 01087 01088 ULONGLONG msProfListboxInsert1(HDC hdc, ULONG Iter) 01089 { 01090 01091 ULONG i; 01092 HWND hwndParent; 01093 INIT_TIMER; 01094 WNDCLASS wc; 01095 HWND *ahwnd = LocalAlloc(LPTR,Iter*sizeof(HANDLE)); 01096 if(!ahwnd) 01097 MessageBox(GetParent(ghwndMDIClient), 01098 "Could not Allocate Memory for Handle Array", 01099 "ERROR!", MB_OK); 01100 01101 wc.style = 0; 01102 wc.lpfnWndProc = CreateDestroyWndProc; 01103 wc.cbClsExtra = 0; 01104 wc.cbWndExtra = 0; 01105 wc.hInstance = ghinst; 01106 wc.hIcon = LoadIcon(ghinst, IDUSERBENCH); 01107 wc.hCursor = LoadCursor(NULL, IDC_ARROW); 01108 wc.hbrBackground = (HBRUSH)(COLOR_APPWORKSPACE + 1); 01109 wc.lpszMenuName = NULL; 01110 wc.lpszClassName = "CreateDestroyWindow"; 01111 01112 if (!RegisterClass(&wc)) { 01113 MessageBox(GetParent(ghwndMDIClient), "11RegisterClass call failed.", 01114 "ERROR!", MB_OK); 01115 return (ULONGLONG)(0); 01116 } 01117 01118 hwndParent = CreateWindow("CreateDestroyWindow", NULL, WS_CHILD, 01119 CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, 01120 ghwndMDIClient, NULL, ghinst, NULL); 01121 01122 for (i=0; i < Iter; i++) 01123 { 01124 ahwnd[i] = CreateWindow("ListBox", NULL, WS_CHILD | LBS_STANDARD, 01125 50, 50, 200, 250, hwndParent, NULL, ghinst, NULL); 01126 if (ahwnd[i] == NULL) { 01127 MessageBox(GetParent(ghwndMDIClient), "CreateWindow call failed.", 01128 "ERROR!", MB_OK); 01129 return (ULONGLONG)(0); 01130 } 01131 } 01132 01133 START_TIMER; 01134 01135 while (ix--) 01136 for (i = 0; i < 200; i++) 01137 SendMessage(ahwnd[ix], LB_ADDSTRING, 0, (LPARAM)aszTypical[i % NStrings]); 01138 01139 END_TIMER_NO_RETURN; 01140 01141 for (i = 0; i < Iter; i++) 01142 DestroyWindow(ahwnd[i]); 01143 01144 DestroyWindow(hwndParent); 01145 UnregisterClass("CreateDestroyWindow", ghinst); 01146 LocalFree(ahwnd); 01147 01148 RETURN_STOP_TIME; 01149 01150 } 01151 01152 01153 ULONGLONG msProfListboxInsert2(HDC hdc, ULONG Iter) 01154 { 01155 ULONG i; 01156 HWND hwndParent; 01157 INIT_TIMER; 01158 WNDCLASS wc; 01159 HWND *ahwnd = LocalAlloc(LPTR,Iter*sizeof(HANDLE)); 01160 if(!ahwnd) 01161 MessageBox(GetParent(ghwndMDIClient), 01162 "Could not Allocate Memory for Handle Array", 01163 "ERROR!", MB_OK); 01164 01165 wc.style = 0; 01166 wc.lpfnWndProc = CreateDestroyWndProc; 01167 wc.cbClsExtra = 0; 01168 wc.cbWndExtra = 0; 01169 wc.hInstance = ghinst; 01170 wc.hIcon = LoadIcon(ghinst, IDUSERBENCH); 01171 wc.hCursor = LoadCursor(NULL, IDC_ARROW); 01172 wc.hbrBackground = (HBRUSH)(COLOR_APPWORKSPACE + 1); 01173 wc.lpszMenuName = NULL; 01174 wc.lpszClassName = "CreateDestroyWindow"; 01175 01176 if (!RegisterClass(&wc)) { 01177 MessageBox(GetParent(ghwndMDIClient), "12RegisterClass call failed.", 01178 "ERROR!", MB_OK); 01179 return (ULONGLONG)(0); 01180 } 01181 01182 hwndParent = CreateWindow("CreateDestroyWindow", NULL, WS_CHILD, 01183 CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, 01184 ghwndMDIClient, NULL, ghinst, NULL); 01185 01186 for (i = 0; i < Iter; i++) { 01187 ahwnd[i] = CreateWindow("ListBox", NULL, 01188 WS_CHILD | LBS_OWNERDRAWFIXED | LBS_HASSTRINGS, 01189 50, 50, 200, 250, hwndParent, NULL, ghinst, NULL); 01190 if (ahwnd[i] == NULL) { 01191 MessageBox(GetParent(ghwndMDIClient), "CreateWindow call failed.", 01192 "ERROR!", MB_OK); 01193 return (ULONGLONG)(0); 01194 } 01195 } 01196 01197 START_TIMER; 01198 01199 while (ix--) 01200 for (i = 0; i < 200; i++) 01201 SendMessage(ahwnd[ix], LB_ADDSTRING, 0, (LPARAM)aszTypical[i % NStrings]); 01202 01203 END_TIMER_NO_RETURN; 01204 01205 for (i = 0; i < Iter; i++) 01206 DestroyWindow(ahwnd[i]); 01207 01208 DestroyWindow(hwndParent); 01209 UnregisterClass("CreateDestroyWindow", ghinst); 01210 LocalFree(ahwnd); 01211 01212 RETURN_STOP_TIME; 01213 01214 } 01215 01216 01217 ULONGLONG msProfListboxInsert3(HDC hdc, ULONG Iter) 01218 { 01219 ULONG i; 01220 HWND hwndParent; 01221 INIT_TIMER; 01222 WNDCLASS wc; 01223 HWND *ahwnd = LocalAlloc(LPTR,Iter*sizeof(HANDLE)); 01224 if(!ahwnd) 01225 MessageBox(GetParent(ghwndMDIClient), 01226 "Could not Allocate Memory for Handle Array", 01227 "ERROR!", MB_OK); 01228 01229 wc.style = 0; 01230 wc.lpfnWndProc = CreateDestroyWndProc; 01231 wc.cbClsExtra = 0; 01232 wc.cbWndExtra = 0; 01233 wc.hInstance = ghinst; 01234 wc.hIcon = LoadIcon(ghinst, IDUSERBENCH); 01235 wc.hCursor = LoadCursor(NULL, IDC_ARROW); 01236 wc.hbrBackground = (HBRUSH)(COLOR_APPWORKSPACE + 1); 01237 wc.lpszMenuName = NULL; 01238 wc.lpszClassName = "CreateDestroyWindow"; 01239 01240 if (!RegisterClass(&wc)) { 01241 MessageBox(GetParent(ghwndMDIClient), "13RegisterClass call failed.", 01242 "ERROR!", MB_OK); 01243 return (ULONGLONG)(0); 01244 } 01245 01246 hwndParent = CreateWindow("CreateDestroyWindow", NULL, WS_CHILD, 01247 CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, 01248 ghwndMDIClient, NULL, ghinst, NULL); 01249 01250 for (i = 0; i < Iter; i++) { 01251 ahwnd[i] = CreateWindow("ListBox", NULL, 01252 WS_CHILD | LBS_SORT | LBS_OWNERDRAWFIXED, 01253 50, 50, 200, 250, hwndParent, NULL, ghinst, NULL); 01254 if (ahwnd[i] == NULL) { 01255 MessageBox(GetParent(ghwndMDIClient), "CreateWindow call failed.", 01256 "ERROR!", MB_OK); 01257 return (ULONGLONG)(0); 01258 } 01259 } 01260 01261 START_TIMER; 01262 01263 while (ix--) 01264 for (i = 0; i < 200; i++) 01265 SendMessage(ahwnd[ix], LB_ADDSTRING, 0, (LPARAM)aszTypical[i % NStrings]); 01266 01267 END_TIMER_NO_RETURN; 01268 01269 for (i = 0; i < Iter; i++) 01270 DestroyWindow(ahwnd[i]); 01271 01272 DestroyWindow(hwndParent); 01273 UnregisterClass("CreateDestroyWindow", ghinst); 01274 LocalFree(ahwnd); 01275 01276 RETURN_STOP_TIME; 01277 01278 } 01279 01280 01281 /* 01282 * Mostly stolen from pbrush. 01283 */ 01284 INT_PTR APIENTRY ClearDlg(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) 01285 { 01286 static BOOL bChangeOk = TRUE; 01287 01288 HDC dc; 01289 INT wid, hgt, numcolors; 01290 01291 switch (message) { 01292 case WM_INITDIALOG: 01293 /* 01294 * standard init stuff for pbrush 01295 */ 01296 dc = GetDC(NULL); 01297 numcolors = GetDeviceCaps(dc, NUMCOLORS); 01298 ReleaseDC(NULL, dc); 01299 01300 dc = GetDC(NULL); 01301 wid = GetDeviceCaps(dc, HORZRES); 01302 hgt = GetDeviceCaps(dc, VERTRES); 01303 ReleaseDC(NULL, dc); 01304 01305 CheckRadioButton (hDlg, ID2, ID256, ID2); 01306 01307 EnableWindow(GetDlgItem(hDlg, ID256), FALSE); 01308 CheckRadioButton(hDlg, ID2, ID256, ID256); 01309 01310 CheckRadioButton(hDlg, ID2, ID256, ID2); 01311 EnableWindow(GetDlgItem(hDlg, ID256), FALSE); 01312 CheckRadioButton(hDlg, ID2, ID256, ID256); 01313 01314 SetDlgItemInt(hDlg, IDWIDTH, 0, FALSE); 01315 SetDlgItemInt(hDlg, IDHEIGHT, 0, FALSE); 01316 CheckRadioButton(hDlg, IDIN, IDPELS, TRUE); 01317 01318 if (!gfSetFocus) 01319 return FALSE; 01320 01321 break; 01322 01323 default: 01324 return FALSE; 01325 } 01326 01327 return TRUE; 01328 } 01329 01330 01331 INT_PTR APIENTRY ClearDlgNoState(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) 01332 { 01333 static BOOL bChangeOk = TRUE; 01334 01335 HDC dc; 01336 INT wid, hgt, numcolors; 01337 01338 switch (message) { 01339 case WM_INITDIALOG: 01340 if (!gfSetFocus) 01341 return FALSE; 01342 01343 break; 01344 01345 default: 01346 return FALSE; 01347 } 01348 01349 return TRUE; 01350 } 01351 01352 01353 ULONGLONG msProfSize(HDC hdc, ULONG Iter) 01354 { 01355 01356 HWND hwnd; 01357 RECT rc; 01358 INIT_TIMER; 01359 01360 GetClientRect(ghwndMDIClient, (LPRECT)&rc); 01361 InflateRect((LPRECT)&rc, -10, -10); 01362 01363 hwnd = GetWindow(ghwndMDIClient, GW_CHILD); 01364 ShowWindow(hwnd, SW_RESTORE); 01365 ShowWindow(hwnd, FALSE); 01366 UpdateWindow(hwnd); 01367 01368 /* time start */ 01369 01370 START_TIMER; 01371 01372 while (ix--) 01373 { 01374 SetWindowPos(hwnd, NULL, rc.left, rc.top, 01375 rc.right - rc.left, rc.bottom - rc.top, 01376 SWP_NOZORDER | SWP_NOACTIVATE); 01377 SetWindowPos(hwnd, NULL, rc.left, rc.top, 01378 (rc.right - rc.left) / 2, (rc.bottom - rc.top) / 2, 01379 SWP_NOZORDER | SWP_NOACTIVATE); 01380 } 01381 01382 /* time end */ 01383 01384 END_TIMER_NO_RETURN; 01385 01386 ShowWindow(hwnd, SW_RESTORE); 01387 01388 RETURN_STOP_TIME; 01389 01390 } 01391 01392 01393 ULONGLONG msProfMove(HDC hdc, ULONG Iter) 01394 { 01395 01396 HWND hwnd; 01397 RECT rc; 01398 INIT_TIMER; 01399 01400 GetClientRect(ghwndMDIClient, (LPRECT)&rc); 01401 InflateRect((LPRECT)&rc, -(rc.right - rc.left) / 4, 01402 -(rc.bottom - rc.top) / 4); 01403 01404 hwnd = GetWindow(ghwndMDIClient, GW_CHILD); 01405 ShowWindow(hwnd, SW_RESTORE); 01406 ShowWindow(hwnd, FALSE); 01407 UpdateWindow(hwnd); 01408 01409 /* time start */ 01410 01411 START_TIMER; 01412 01413 while (ix--) 01414 { 01415 SetWindowPos(hwnd, NULL, rc.left, rc.top, 01416 rc.right - rc.left, rc.bottom - rc.top, 01417 SWP_NOZORDER | SWP_NOACTIVATE); 01418 SetWindowPos(hwnd, NULL, 0, 0, 0, 0, 01419 SWP_NOZORDER | SWP_NOACTIVATE | SWP_NOSIZE); 01420 } 01421 01422 /* time end */ 01423 01424 END_TIMER_NO_RETURN; 01425 01426 ShowWindow(hwnd, SW_RESTORE); 01427 01428 RETURN_STOP_TIME; 01429 01430 } 01431 01432 01433 #define WM_SYSTIMER 0x0118 01434 01435 ULONGLONG msProfMenu(HDC hdc, ULONG Iter) 01436 { 01437 01438 MSG msg; 01439 INIT_TIMER; 01440 01441 HWND hwnd = GetParent(ghwndMDIClient); 01442 01443 ShowWindow(hwnd, FALSE); 01444 01445 /* 01446 * Multipad's edit menu is a great choice. Multipad does a goodly lot 01447 * of WM_INITMENU time initialization. The WM_SYSTIMER message is 01448 * to circumvent menu type ahead so the menu actually shows. 01449 */ 01450 01451 START_TIMER; 01452 01453 while (ix--) 01454 { 01455 PostMessage(hwnd, WM_KEYDOWN, VK_ESCAPE, 0L); 01456 PostMessage(hwnd, WM_KEYDOWN, VK_ESCAPE, 0L); 01457 PostMessage(hwnd, WM_SYSTIMER, 0, 0L); 01458 SendMessage(hwnd, WM_SYSCOMMAND, SC_KEYMENU, (DWORD)(WORD)'e'); 01459 while (PeekMessage(&msg, NULL, 0, 0, PM_REMOVE)) 01460 DispatchMessage(&msg); 01461 } 01462 01463 END_TIMER_NO_RETURN; 01464 01465 ShowWindow(hwnd, SW_RESTORE); 01466 UpdateWindow(hwnd); 01467 01468 RETURN_STOP_TIME; 01469 01470 } 01471 01472 01473 01474 ULONGLONG msProfGetClientRect(HDC hdc, ULONG Iter) 01475 { 01476 01477 RECT rc; 01478 INIT_TIMER; 01479 01480 START_TIMER; 01481 01482 while (ix--) 01483 { 01484 GetClientRect(ghwndMDIClient, &rc); 01485 } 01486 01487 END_TIMER; 01488 } 01489 01490 01491 ULONGLONG msProfScreenToClient(HDC hdc, ULONG Iter) 01492 { 01493 01494 POINT pt; 01495 INIT_TIMER; 01496 01497 pt.x = 100; 01498 pt.y = 200; 01499 01500 START_TIMER; 01501 01502 while (ix--) 01503 { 01504 ScreenToClient(ghwndMDIClient, &pt); 01505 } 01506 01507 END_TIMER; 01508 } 01509 01510 01511 ULONGLONG msProfGetInputState(HDC hdc, ULONG Iter) 01512 { 01513 01514 INIT_TIMER; 01515 01516 START_TIMER; 01517 01518 while (ix--) 01519 { 01520 GetInputState(); 01521 } 01522 01523 END_TIMER; 01524 } 01525 01526 01527 ULONGLONG msProfGetKeyState(HDC hdc, ULONG Iter) 01528 { 01529 01530 INIT_TIMER; 01531 01532 START_TIMER; 01533 01534 while (ix--) 01535 { 01536 GetKeyState(VK_ESCAPE); 01537 } 01538 01539 END_TIMER; 01540 } 01541 01542 01543 ULONGLONG msProfGetAsyncKeyState(HDC hdc, ULONG Iter) 01544 { 01545 01546 INIT_TIMER; 01547 01548 START_TIMER; 01549 01550 while (ix--) 01551 { 01552 GetAsyncKeyState(VK_ESCAPE); 01553 } 01554 01555 END_TIMER; 01556 } 01557 01558 01559 ULONGLONG msProfDispatchMessage(HDC hdc, ULONG Iter) 01560 { 01561 01562 HWND hwnd; 01563 MSG msg; 01564 INIT_TIMER; 01565 WNDCLASS wc; 01566 01567 wc.style = 0; 01568 wc.lpfnWndProc = CreateDestroyWndProc; 01569 wc.cbClsExtra = 0; 01570 wc.cbWndExtra = 0; 01571 wc.hInstance = ghinst; 01572 wc.hIcon = LoadIcon(ghinst, (LPSTR)IDUSERBENCH); 01573 wc.hCursor = LoadCursor(NULL, IDC_ARROW); 01574 wc.hbrBackground = (HBRUSH)(COLOR_APPWORKSPACE + 1); 01575 wc.lpszMenuName = NULL; 01576 wc.lpszClassName = "CreateDestroyWindow"; 01577 01578 if (!RegisterClass(&wc)) { 01579 MessageBox(GetParent(ghwndMDIClient), "14RegisterClass call failed.", 01580 "ERROR!", MB_OK); 01581 return (ULONGLONG)(0); 01582 } 01583 01584 hwnd = CreateWindow("CreateDestroyWindow", NULL, WS_CHILD, 01585 CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, 01586 ghwndMDIClient, NULL, ghinst, NULL); 01587 01588 msg.hwnd = hwnd; 01589 msg.message = WM_MOUSEMOVE; 01590 msg.wParam = 1; 01591 msg.lParam = 2; 01592 msg.time = 3; 01593 msg.pt.x = 4; 01594 msg.pt.y = 5; 01595 01596 START_TIMER; 01597 01598 while (ix--) 01599 { 01600 DispatchMessage(&msg); 01601 } 01602 01603 END_TIMER_NO_RETURN; 01604 01605 DestroyWindow(hwnd); 01606 UnregisterClass("CreateDestroyWindow", ghinst); 01607 01608 RETURN_STOP_TIME; 01609 01610 } 01611 01612 01613 ULONGLONG msProfCallback(HDC hdc, ULONG Iter) 01614 { 01615 01616 HWND hwnd; 01617 INIT_TIMER; 01618 WNDCLASSW wc; 01619 01620 wc.style = 0; 01621 wc.lpfnWndProc = CreateDestroyWndProcW; 01622 wc.cbClsExtra = 0; 01623 wc.cbWndExtra = 0; 01624 wc.hInstance = ghinst; 01625 wc.hIcon = LoadIcon(ghinst, (LPSTR)IDUSERBENCH); 01626 wc.hCursor = LoadCursor(NULL, IDC_ARROW); 01627 wc.hbrBackground = (HBRUSH)(COLOR_APPWORKSPACE + 1); 01628 wc.lpszMenuName = NULL; 01629 wc.lpszClassName = L"CreateDestroyWindow"; 01630 01631 if (!RegisterClassW(&wc)) { 01632 // Fails On Chicago 01633 // MessageBox(GetParent(ghwndMDIClient), "15RegisterClass call failed.", 01634 // "ERROR!", MB_OK); 01635 return (ULONGLONG)(0); 01636 } 01637 01638 hwnd = CreateWindow("CreateDestroyWindow", NULL, WS_CHILD, 01639 CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, 01640 ghwndMDIClient, NULL, ghinst, NULL); 01641 01642 START_TIMER; 01643 01644 while (ix--) 01645 { 01646 SendMessage(hwnd, WM_GETTEXTLENGTH, 0, 0); 01647 } 01648 01649 END_TIMER_NO_RETURN; 01650 01651 DestroyWindow(hwnd); 01652 UnregisterClass("CreateDestroyWindow", ghinst); 01653 01654 RETURN_STOP_TIME; 01655 01656 } 01657 01658 01659 ULONGLONG msProfSendMessage(HDC hdc, ULONG Iter) 01660 { 01661 01662 HWND hwnd; 01663 INIT_TIMER; 01664 WNDCLASS wc; 01665 01666 wc.style = 0; 01667 wc.lpfnWndProc = CreateDestroyWndProc; 01668 wc.cbClsExtra = 0; 01669 wc.cbWndExtra = 0; 01670 wc.hInstance = ghinst; 01671 wc.hIcon = LoadIcon(ghinst, (LPSTR)IDUSERBENCH); 01672 wc.hCursor = LoadCursor(NULL, IDC_ARROW); 01673 wc.hbrBackground = (HBRUSH)(COLOR_APPWORKSPACE + 1); 01674 wc.lpszMenuName = NULL; 01675 wc.lpszClassName = "CreateDestroyWindow"; 01676 01677 if (!RegisterClass(&wc)) { 01678 MessageBox(GetParent(ghwndMDIClient), "16RegisterClass call failed.", 01679 "ERROR!", MB_OK); 01680 return (ULONGLONG)(0); 01681 } 01682 01683 hwnd = CreateWindow("CreateDestroyWindow", NULL, WS_CHILD, 01684 CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, 01685 ghwndMDIClient, NULL, ghinst, NULL); 01686 01687 START_TIMER; 01688 01689 while (ix--) 01690 { 01691 SendMessage(hwnd, WM_MOUSEMOVE, 1, 2); 01692 } 01693 01694 END_TIMER_NO_RETURN; 01695 01696 DestroyWindow(hwnd); 01697 UnregisterClass("CreateDestroyWindow", ghinst); 01698 01699 RETURN_STOP_TIME; 01700 01701 } 01702 01703 HWND hwndShare; 01704 01705 DWORD SendMessageDiffThreadFunc(PVOID pdwData) 01706 { 01707 WNDCLASS wc; 01708 MSG msg; 01709 BOOL b; 01710 01711 wc.style = 0; 01712 wc.lpfnWndProc = CreateDestroyWndProc; 01713 wc.cbClsExtra = 0; 01714 wc.cbWndExtra = 0; 01715 wc.hInstance = ghinst; 01716 wc.hIcon = LoadIcon(ghinst, (LPSTR)IDUSERBENCH); 01717 wc.hCursor = LoadCursor(NULL, IDC_ARROW); 01718 wc.hbrBackground = (HBRUSH)(COLOR_APPWORKSPACE + 1); 01719 wc.lpszMenuName = NULL; 01720 wc.lpszClassName = "SendMessageDiffThread"; 01721 01722 if (!RegisterClass(&wc)) { 01723 MessageBox(GetParent(ghwndMDIClient), "19RegisterClass call failed.", 01724 "ERROR!", MB_OK); 01725 return FALSE; 01726 } 01727 01728 hwndShare = CreateWindow("SendMessageDiffThread", NULL, 0, 01729 CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, 01730 GetDesktopWindow(), NULL, ghinst, NULL); 01731 01732 01733 ASSERT(hwndShare); 01734 01735 SetEvent(*((PHANDLE)pdwData)); 01736 01737 while (GetMessage(&msg, NULL, 0, 0)) { 01738 DispatchMessage(&msg); 01739 } 01740 01741 b = DestroyWindow(hwndShare); 01742 01743 ASSERT(b); 01744 01745 b = UnregisterClass("SendMessageDiffThread", ghinst); 01746 01747 ASSERT(b); 01748 01749 return TRUE; 01750 } 01751 01752 ULONGLONG msProfSendMessageDiffThread(HDC hdc, ULONG Iter) 01753 { 01754 01755 DWORD dwData; 01756 DWORD id; 01757 HANDLE hEvent; 01758 HANDLE hThread; 01759 INIT_TIMER; 01760 01761 hEvent = CreateEvent(NULL, TRUE, FALSE, NULL); 01762 01763 hwndShare = (HWND)0; 01764 01765 hThread = CreateThread( NULL, 0, SendMessageDiffThreadFunc, &hEvent, 0, &id); 01766 01767 WaitForSingleObject( hEvent, 20*1000); 01768 01769 Sleep(10*1000); 01770 01771 ASSERT(hwndShare); 01772 01773 START_TIMER; 01774 01775 while (ix--) 01776 { 01777 SendMessage(hwndShare, WM_MOUSEMOVE, 1, 2); 01778 } 01779 01780 END_TIMER_NO_RETURN; 01781 01782 PostThreadMessage(id, WM_QUIT, 0, 0); 01783 WaitForSingleObject(hThread, 2*1000); // Wait for Cleanup before Starting Next Cycle 01784 CloseHandle(hThread); 01785 01786 RETURN_STOP_TIME; 01787 01788 } 01789 01790 01791 ULONGLONG msProfUpdateWindow(HDC hDC, ULONG Iter) 01792 { 01793 WNDCLASS wc; 01794 HWND hwnd; 01795 RECT rect; 01796 static LPCSTR className = "UpdateWindowTest"; 01797 INIT_TIMER; 01798 01799 wc.style = 0; 01800 wc.lpfnWndProc = CreateDestroyWndProc; 01801 wc.cbClsExtra = 0; 01802 wc.cbWndExtra = 0; 01803 wc.hInstance = ghinst; 01804 wc.hIcon = LoadIcon(ghinst, (LPSTR)IDUSERBENCH); 01805 wc.hCursor = LoadCursor(NULL, IDC_ARROW); 01806 wc.hbrBackground = (HBRUSH)(COLOR_APPWORKSPACE + 1); 01807 wc.lpszMenuName = NULL; 01808 wc.lpszClassName = className; 01809 01810 if (!RegisterClass(&wc)) { 01811 MessageBox(GetParent(ghwndMDIClient), "RegisterClass call failed.", 01812 "ERROR!", MB_OK); 01813 return FALSE; 01814 } 01815 01816 hwnd = CreateWindow(className, NULL, 01817 WS_OVERLAPPEDWINDOW, 01818 CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, 01819 NULL, NULL, ghinst, NULL); 01820 if (hwnd == NULL) { 01821 MessageBox(GetParent(ghwndMDIClient), "CreateWindow call failed.", 01822 "ERROR!", MB_OK); 01823 return 0; 01824 } 01825 GetClientRect(hwnd, &rect); 01826 01827 START_TIMER; 01828 while (ix--) { 01829 START_OVERHEAD; 01830 InvalidateRect(hwnd, &rect, FALSE); 01831 END_OVERHEAD; 01832 UpdateWindow(hwnd); 01833 } 01834 01835 END_TIMER_NO_RETURN; 01836 01837 DestroyWindow(hwnd); 01838 UnregisterClass(className, ghinst); 01839 01840 RETURN_STOP_TIME; 01841 } 01842 01843 ULONGLONG msProfTranslateMessage(HDC hDC, ULONG Iter) 01844 { 01845 WNDCLASS wc; 01846 HWND hwnd; 01847 RECT rect; 01848 static LPCSTR className = "TranslateMessageTest"; 01849 static MSG msgTemplate = { 01850 (HWND)NULL, WM_KEYDOWN, 01851 (WPARAM)0, 01852 (LPARAM)0, 01853 0, // time 01854 {0, 0}, // mouse pointer 01855 }; 01856 INIT_TIMER; 01857 01858 wc.style = 0; 01859 wc.lpfnWndProc = CreateDestroyWndProc; 01860 wc.cbClsExtra = 0; 01861 wc.cbWndExtra = 0; 01862 wc.hInstance = ghinst; 01863 wc.hIcon = LoadIcon(ghinst, (LPSTR)IDUSERBENCH); 01864 wc.hCursor = LoadCursor(NULL, IDC_ARROW); 01865 wc.hbrBackground = (HBRUSH)(COLOR_APPWORKSPACE + 1); 01866 wc.lpszMenuName = NULL; 01867 wc.lpszClassName = className; 01868 01869 if (!RegisterClass(&wc)) { 01870 MessageBox(GetParent(ghwndMDIClient), "RegisterClass call failed.", 01871 "ERROR!", MB_OK); 01872 return FALSE; 01873 } 01874 01875 hwnd = CreateWindow(className, NULL, 01876 WS_OVERLAPPEDWINDOW, 01877 CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, 01878 NULL, NULL, ghinst, NULL); 01879 if (hwnd == NULL) { 01880 MessageBox(GetParent(ghwndMDIClient), "CreateWindow call failed.", 01881 "ERROR!", MB_OK); 01882 return 0; 01883 } 01884 msgTemplate.hwnd = hwnd; 01885 01886 01887 START_TIMER; 01888 while (ix--) { 01889 MSG msg = msgTemplate; 01890 TranslateMessage(&msg); 01891 } 01892 01893 DestroyWindow(hwnd); 01894 UnregisterClass(className, ghinst); 01895 01896 END_TIMER; 01897 } 01898 01899 #define WIDE 1 01900 #include "awtest.inc" 01901 #undef WIDE 01902 #include "awtest.inc" 01903 01904 #define A1 A 01905 #define A2 A 01906 #include "abtest.inc" 01907 #define A1 A 01908 #define A2 W 01909 #include "abtest.inc" 01910 #define A1 W 01911 #define A2 A 01912 #include "abtest.inc" 01913 #define A1 W 01914 #define A2 W 01915 #include "abtest.inc" 01916 01917 01918 /*********************************************************************/ 01919 01920 #define TEST_DEFAULT 300 01921 01922 TEST_ENTRY gTestEntry[] = { 01923 (PUCHAR)"AvgDialog draw",(PFN_MS)msProfAvgDlgDraw, 10, 0 , 01924 (PUCHAR)"AvgDialog create/draw/destroy",(PFN_MS)msProfAvgDlgCreate, 10, 0 , 01925 (PUCHAR)"AvgDialog create/destroy",(PFN_MS)msProfAvgDlgCreateDestroy, 100, 0 , 01926 (PUCHAR)"AvgDialog(no font) create/destroy",(PFN_MS)msProfAvgDlgCreateDestroyNoFont, 100, 0 , 01927 (PUCHAR)"AvgDialog(no menu) create/destroy",(PFN_MS)msProfAvgDlgCreateDestroyNoMenu, 100, 0 , 01928 (PUCHAR)"AvgDialog(empty) create/destroy",(PFN_MS)msProfAvgDlgCreateDestroyEmpty, 200, 0 , 01929 (PUCHAR)"SizeWindow",(PFN_MS)msProfSize, 200, 0 , 01930 (PUCHAR)"MoveWindow",(PFN_MS)msProfMove, 2000, 0 , 01931 (PUCHAR)"Create/DestroyWindow (top)",(PFN_MS)msProfCreateDestroyWindow, 1000, 0 , 01932 (PUCHAR)"Create/DestroyWindow (child)",(PFN_MS)msProfCreateDestroyChildWindow, 1000, 0 , 01933 01934 (PUCHAR)"Create/Destroy Listbox",(PFN_MS)msProfCreateDestroyListbox, 1000, 0 , 01935 (PUCHAR)"Create/Destroy Button",(PFN_MS)msProfCreateDestroyButton, 1000, 0 , 01936 (PUCHAR)"Create/Destroy Combobox",(PFN_MS)msProfCreateDestroyCombobox, 1000, 0 , 01937 (PUCHAR)"Create/Destroy Edit",(PFN_MS)msProfCreateDestroyEdit, 1000, 0 , 01938 (PUCHAR)"Create/Destroy Static",(PFN_MS)msProfCreateDestroyStatic, 1000, 0 , 01939 (PUCHAR)"Create/Destroy Scrollbar",(PFN_MS)msProfCreateDestroyScrollbar, 1000, 0 , 01940 (PUCHAR)"SendMessage w/callback",(PFN_MS)msProfCallback, 4000, 0 , 01941 (PUCHAR)"SendMessage",(PFN_MS)msProfSendMessage, 4000, 0 , 01942 (PUCHAR)"SendMessage Ansi->Ansi text",(PFN_MS)msProfSendMessageAA, 4000, 0 , 01943 (PUCHAR)"SendMessage Ansi->Unicode text",(PFN_MS)msProfSendMessageAW, 4000, 0 , 01944 (PUCHAR)"SendMessage Unicode->Ansi text", (PFN_MS)msProfSendMessageWA, 4000, 0, 01945 (PUCHAR)"SendMessage Unicode->Unicode text", (PFN_MS)msProfSendMessageWW, 4000, 0, 01946 01947 (PUCHAR)"SendMessage - DiffThread",(PFN_MS)msProfSendMessageDiffThread, 1000, 0 , 01948 (PUCHAR)"SetWindowLong",(PFN_MS)msProfSetWindowLong, 400, 0 , 01949 (PUCHAR)"GetWindowLong",(PFN_MS)msProfGetWindowLong, 2000, 0 , 01950 01951 (PUCHAR)"PeekMessageA",(PFN_MS)msProfPeekMessageA, 1000, 0 , 01952 (PUCHAR)"PeekMessageW",(PFN_MS)msProfPeekMessageW, 1000, 0 , 01953 (PUCHAR)"DispatchMessageA",(PFN_MS)msProfDispatchMessageA, 4000, 0 , 01954 (PUCHAR)"DispatchMessageW",(PFN_MS)msProfDispatchMessageW, 4000, 0 , 01955 01956 (PUCHAR)"LocalAlloc/Free",(PFN_MS)msProfLocalAllocFree, 2000, 0 , 01957 01958 (PUCHAR)"200 Listbox Insert",(PFN_MS)msProfListboxInsert1, 20, 0 , 01959 (PUCHAR)"200 Listbox Insert (ownerdraw)",(PFN_MS)msProfListboxInsert2, 20, 0 , 01960 (PUCHAR)"200 Listbox Insert (ownerdraw/sorted)",(PFN_MS)msProfListboxInsert3, 20, 0 , 01961 01962 (PUCHAR)"GetClientRect",(PFN_MS)msProfGetClientRect, 8000, 0 , 01963 (PUCHAR)"ScreenToClient",(PFN_MS)msProfScreenToClient, 8000, 0 , 01964 (PUCHAR)"GetInputState",(PFN_MS)msProfGetInputState, 2000, 0 , 01965 (PUCHAR)"GetKeyState",(PFN_MS)msProfGetKeyState, 2000, 0 , 01966 (PUCHAR)"GetAsyncKeyState",(PFN_MS)msProfGetAsyncKeyState, 8000, 0 , 01967 01968 (PUCHAR)"Register|UnregisterClass",(PFN_MS)msProfRegisterClass, 500, 0 , 01969 (PUCHAR)"GetClassInfo|Name|Long|SetClassLong",(PFN_MS)msProfClassGroup, 500, 0 , 01970 01971 (PUCHAR)"Menu pulldown",(PFN_MS)msProfMenu, 2000, 0 , 01972 01973 (PUCHAR)"Open|Empty|Set|Get|CloseClipboard",(PFN_MS)msProfClipboardGroup, 1000, 0 , 01974 01975 (PUCHAR)"GetWindowTextLengthA",(PFN_MS)msProfGetWindowTextLengthA, 10000, 0, 01976 (PUCHAR)"GetWindowTextLengthW",(PFN_MS)msProfGetWindowTextLengthW, 10000, 0, 01977 01978 (PUCHAR)"UdpateWindow",(PFN_MS)msProfUpdateWindow, 10000, 0, 01979 (PUCHAR)"TranslateMessage", (PFN_MS)msProfTranslateMessage, 10000, 0, 01980 (PUCHAR)"IsCharUpperA", (PFN_MS)msProfCharUpperA, 2000, 0, 01981 (PUCHAR)"IsCharLowerA", (PFN_MS)msProfCharLowerA, 2000, 0, 01982 (PUCHAR)"IsCharUpperW", (PFN_MS)msProfCharUpperW, 2000, 0, 01983 (PUCHAR)"IsCharLowerW", (PFN_MS)msProfCharLowerW, 2000, 0, 01984 (PUCHAR)"CharNextA", (PFN_MS)msProfCharNextA, 2000, 0, 01985 (PUCHAR)"CharNextW", (PFN_MS)msProfCharNextW, 2000, 0, 01986 (PUCHAR)"GetMessageW", (PFN_MS)msProfGetMessageW, 5000, 0, 01987 (PUCHAR)"GetMessageA", (PFN_MS)msProfGetMessageA, 5000, 0, 01988 // Add New Tests Here 01989 }; 01990 01991 01992 ULONG gNumTests = sizeof gTestEntry / sizeof gTestEntry[0]; //Total No. of Tests 01993 ULONG gNumQTests = 10;// No. of tests in Group 1 (starting from first in the list)

Generated on Sat May 15 19:39:18 2004 for test by doxygen 1.3.7