Microsoft P-Code
Encyclopedia
Microsoft
's P-Code, short for packed code, is an intermediate language
that provides an alternate binary format to native code
for any compiled binary (e.g.: DLL
s, ActiveX controls
, or Applications). Its primary goal is to produce smaller files. P-Code binaries require an additional runtime library to execute. Both the 16-bit Visual C++ and Visual Basic
compilers support P-Code.
This feature is only supported in 16-bit version of Visual C++, however.
Microsoft
Microsoft Corporation is an American public multinational corporation headquartered in Redmond, Washington, USA that develops, manufactures, licenses, and supports a wide range of products and services predominantly related to computing through its various product divisions...
's P-Code, short for packed code, is an intermediate language
Intermediate language
In computer science, an intermediate language is the language of an abstract machine designed to aid in the analysis of computer programs. The term comes from their use in compilers, where a compiler first translates the source code of a program into a form more suitable for code-improving...
that provides an alternate binary format to native code
Machine code
Machine code or machine language is a system of impartible instructions executed directly by a computer's central processing unit. Each instruction performs a very specific task, typically either an operation on a unit of data Machine code or machine language is a system of impartible instructions...
for any compiled binary (e.g.: DLL
DLL
DLL may refer to:* Data link layer, a layer in the OSI network architecture model* Delay-locked loop, a device to reduce clock skew in digital circuits* Doubly linked list, a data structure in computer programming...
s, ActiveX controls
Component Object Model
Component Object Model is a binary-interface standard for software componentry introduced by Microsoft in 1993. It is used to enable interprocess communication and dynamic object creation in a large range of programming languages...
, or Applications). Its primary goal is to produce smaller files. P-Code binaries require an additional runtime library to execute. Both the 16-bit Visual C++ and Visual Basic
Visual Basic
Visual Basic is the third-generation event-driven programming language and integrated development environment from Microsoft for its COM programming model...
compilers support P-Code.
Using P-Code in Visual Basic
(Version 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.