Jump to content

Microsoft P-Code

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by RTC (talk | contribs) at 16:40, 13 March 2007 (See also). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

Microsoft's P-Code, short for packed code, is an alternate binary format for any compiled binary (eg: DLLs, ActiveX controls, or Applications). Its primary goal is to produce smaller files. Both the 16-bit Visual C++ and Visual Basic compilers support P-Code.

Using P-Code in Visual Basic

(version 6) Open your project; open the Project Properties dialog; click on the Compile tab; click the option button Compile to P-Code.

Using P-Code in Visual C++

To turn on use of P-Code, use the Pragma directive, ie:

 //Turn P-Code on
 #pragma optimize("q", on)

 //Turn P-Code off
 #pragma optimize("q", off)

This feature is only supported in 16-bit version of Visual C++, however.

See also