Microsoft P-Code

From Wikipedia, the free encyclopedia

P-Code, short for packed code, is a Microsoft's proprietary intermediate language that provided an alternate binary format to machine code (called "native code" in relevant products) for any compiled binary (e.g. DLLs, ActiveX controls, or applications). Its primary goal was to produce smaller files.[citation needed] P-code output support was provided in 16-bit Visual C++ compilers and all versions of Visual Basic up to VB 6. At runtime, P-code is executed by and inside the Visual Basic virtual machine, msvbvm<version>.dll,[1] which also provides the runtime, implementing the VB standard library and handling special metadata like forms present in such executables. Since the advent of .NET framework, P-code and the VM were abandoned in favor of Common Language Runtime and Microsoft Intermediate Language.

Using P-Code in Visual Basic

(Versions 5 and 6) Open the 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, i.e.:

 //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

  1. Versions prior to 5 had different naming scheme, see CrackZ - Visual Basic


This article is issued from Wikipedia. The text is available under the Creative Commons Attribution/Share Alike; additional terms may apply for the media files.