P-Code Applications Must Have MPC Used on Them

ID: Q85225

7.00 | 1.00 1.50 MS-DOS | WINDOWS kbtool

The information in this article applies to:

SUMMARY

The /Oq switch tells the compiler to generate packed code (p-code). After the p-code program is linked, the Make P-Code utility (MPC) must be used to make the program runnable. If MPC is not used on the p-code program, depending on the program type and the host environment, different error messages will be displayed when the program is executed.

NOTE: In Microsoft C/C++ Compiler version 8.0, the linker automatically detects when you are creating a p-code application and automatically runs MPC.EXE. This means that there is no need to use the /PCODE linker switch or to separately run MPC.EXE.

MORE INFORMATION

Attempting to run an MS-DOS p-code executable that hasn't had MPC used on it may cause MS-DOS to display the following message:

   This program cannot be run in DOS mode.

A Windows-based application that has been compiled with the /Oq option but that hasn't had MPC used on it generates an unrecoverable application error (UAE) under Windows 3.0 and an application error under Windows 3.1.

Attempting to load a Windows dynamic-link library (DLL) that has been compiled into p-code but that has not had MPC run on it, can cause various problems ranging from UAEs to system hangs.

To make sure that a p-code executable or DLL is runnable, do one of the following:

For more information on p-code and controlling the p-code build process, refer to the online help on MPC and to Chapter 3 of the "Microsoft C/C++ Programming Techniques" manual supplied with Microsoft C/C++ version 7.0.

NOTE: If a Windows p-code application that has not had MPC used on it is run under MS-DOS, the following standard message will be displayed:

   This program requires Microsoft Windows.

Additional reference words: kbinf 7.00 1.00 1.50 pcode KBCategory: kbtool KBSubcategory: TlsMisc Keywords : kb16bitonly

Last Reviewed: July 18, 1997