int ProfInsChk(void) |
The ProfInsChk function determines whether Microsoft Windows Profiler is installed.
This function has no parameters.
The return value is 1 if Profiler is installed for a mode other than 386 enhanced mode, or it is 2 if Profiler is installed for 386 enhanced mode. Otherwise, the return value is 0, indicating that Profiler is not installed.
For more information about using Profiler, see Microsoft Windows Programming Tools.
The following example uses the ProfInsChk function to determine whether the Profiler is installed:
int ick;
char szMsg[80];
if ((ick = ProfInsChk()) == 0)
MessageBox(hwnd, "Profiler is not installed!",
"ProfInsChk", MB_ICONSTOP);
else {
strcpy(szMsg, "Profiler is installed");
if (ick == 2) {
strcat(szMsg, " in 386 enhanced mode");
ProfSetup(128, 0); /* uses a 128K buffer */
}
MessageBox(hwnd, szMsg, "ProfInsChk", MB_OK);
}