Profiler Fatal Errors PRF1012 and PRF1306

OverviewHow Do I

Feature Only in Professional and Enterprise Editions   Profiling is supported only in Visual C++ Professional and Enterprise Editions. For more information, see .

When trying to profile a program using the Visual C++ development environment, you may get the following fatal error messages:

PROFILE.DLL : fatal error PRF1012 : cannot read expected number of bytes from file <path>\xxxx.pbi
PREP : fatal error PRF1306: PBT or PBO file <path>\xxxx.pbo is not derived from same PBI file

It is also possible to get the following error if you are using the incorrect PROFILE.DLL:

PROFILE.DLL: fatal error PRF1005: operating system ran out of memory.

All these error messages are caused by the wrong version of PROFILE.DLL being loaded in memory and used by the profiler. Most likely a copy of PROFILE.DLL from Visual C++, 32-bit Edition, version 1.0 has been loaded by Windows NT.

To correct the situation, make sure the PROFILE.DLL from Visual C++ version 2.0, 2.1 or later is used by the profiler. Do a file search on your system to determine where the older PROFILE.DLL is located, and rename or delete the file. Make sure that the only PROFILE.DLL on your system is located in the Program Files\Microsoft Visual Studio\VC98\bin directory for Visual C++.

If for some reason there is no PROFILE.DLL in the Program Files\Microsoft Visual Studio\VC98\bin directory, you can restore the file by running Visual C++'s setup program and doing a custom installation. To do this, clear all options in the 'Tools Options' dialog box except for 'Profiler'. You also need to make sure the installation directory you specify is the same as your current Visual C++ installation.

The incorrect PROFILE.DLL will probably be found in the winnt\SYSTEM32 directory where winnt refers to the directory that Windows NT is installed. Or the DLL may be in another directory found on the PATH. The correct file should be located in the Visual C++ Program Files\Microsoft Visual Studio\VC98\bin directory.

The date and size of the PROFILE.DLL files from the most recent Visual C++ 32-bit Edition versions prior to 6.0 are listed here:

  • Visual C++ 5.0 :  10/01/97  10:47p  107,520  PROFILE.DLL 

  • Visual C++ 4.2 :  02/08/96  07:48p  93,184  PROFILE.DLL 

  • Visual C++ 4.1 :  02/08/96  07:48p  93,184  PROFILE.DLL

  • Visual C++ 4.0 :  09/29/95  09:49p  78,848  PROFILE.DLL