ProfSetup

3.0

  void ProfSetup(nBufferKB, nSamplesKB)    
  int nBufferKB; /* size of output buffer */
  int nSamplesKB; /* amount of sample data written to disk */

The ProfSetup function specifies the size of the Microsoft Windows Profiler output buffer and how much sampling data Profiler is to write to the disk.

Profiler ignores the ProfSetup function when running with Windows in any mode other than 386 enhanced mode.

Parameters

nBufferKB

Specifies the size, in kilobytes, of the output buffer. This value is in the range 1 through 1064. The default value is 64.

nSamplesKB

Specifies the amount, in kilobytes, of sampling data Profiler writes to the disk. A value of zero (the default value) specifies unlimited sampling data.

Return Value

This function does not return a value.

Comments

Do not call the ProfSetup function after calling ProfStart. To resize memory after ProfStart has been called, first call the ProfStop function.

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

Example

The following example uses the ProfSetup function to set the output buffer size to 128K if Profiler is installed in 386 enhanced mode:

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

See Also

ProfStart, ProfStop