ProfInsChk

3.0

  int ProfInsChk(void)    

The ProfInsChk function determines whether Microsoft Windows Profiler is installed.

Parameters

This function has no parameters.

Return Value

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.

Comments

For more information about using Profiler, see Microsoft Windows Programming Tools.

Example

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);
}