- Home
- Products
- Integration
- Tutorial
- Barcode FAQ
- Purchase
- Company
The Assembly Manifest in Visual C#
The Assembly Manifest Data Matrix Generator In Visual C# Using Barcode printer for .NET Control to generate, create DataMatrix image in .NET framework applications. www.OnBarcode.comECC200 Recognizer In C#.NET Using Barcode scanner for .NET Control to read, scan read, scan image in Visual Studio .NET applications. www.OnBarcode.comThe term manifest comes from the Latin manifestus, which means blatant, obvious. It was later used in the shipping industry to mean the list of cargo and passengers on a ship or train. To find a particular passenger or to discover what cargo is contained on a train, you would consult the manifest. The assembly manifest serves the same purpose for an assembly. The runtime uses the manifest to find information about what types are in an assembly, and where to find those types in the assembly. Because of the information in the manifest, the assembly is said to be self-describing. This presents a significant advance from unmanaged executables and DLLs, which do not have such rich data describing themselves. This rich metadata makes it easier to dynamically load assemblies and start executing the code in them. Printing Barcode In C#.NET Using Barcode creator for VS .NET Control to generate, create Barcode image in VS .NET applications. www.OnBarcode.comEncode ECC200 In C# Using Barcode generator for VS .NET Control to generate, create DataMatrix image in Visual Studio .NET applications. www.OnBarcode.comCHAPTER 3 BUILDING C++/CLI PROGRAMS
Matrix 2D Barcode Generation In C# Using Barcode maker for VS .NET Control to generate, create 2D image in .NET applications. www.OnBarcode.comGenerate Code-128 In Visual C#.NET Using Barcode creation for .NET framework Control to generate, create Code 128 Code Set A image in VS .NET applications. www.OnBarcode.comViewing Metadata with ILDasm.exe
Drawing Barcode In Visual C# Using Barcode creator for .NET framework Control to generate, create Barcode image in Visual Studio .NET applications. www.OnBarcode.comEncoding Royal Mail Barcode In C# Using Barcode encoder for .NET framework Control to generate, create British Royal Mail 4-State Customer Barcode image in .NET framework applications. www.OnBarcode.comYou can familiarize yourself with the basics of assemblies and metadata by compiling a simple C++/CLI program and looking at the resulting output using a tool called ILDasm.exe. ILDasm means Intermediate Language Disassembler. Consider the simple C++ program in Listing 3-1. Listing 3-1. A Simple C++/CLI Program // reftype.cpp using namespace System; ref class RefType { String^ classname; public: RefType() { classname = gcnew String("RefType"); } String^ GetMessage() { return String::Format("I am a " + classname); } }; int main() { RefType^ r = gcnew RefType(); Console::WriteLine(r->GetMessage()); } You must compile it (in Visual C++) with the /clr option. Any of the variants of the /clr option are acceptable, but the ILDasm.exe display is simpler if you use the /clr:safe option, since that option avoids bringing in a lot of plumbing used to support native code constructs. cl.exe /clr:safe reftype.cpp This produces the executable reftype.exe. As in classic C++, you also have the option of producing an object file first, and then later linking to produce an executable. None of these basics have changed. In fact, the file name doesn t look any different. What has changed is that the resulting executable is an assembly with managed code, not a native executable. When it is executed, it will actually fire up the CLR and run in a managed context. Data Matrix ECC200 Generator In Objective-C Using Barcode generation for iPhone Control to generate, create ECC200 image in iPhone applications. www.OnBarcode.comData Matrix 2d Barcode Maker In Visual Basic .NET Using Barcode generation for Visual Studio .NET Control to generate, create Data Matrix ECC200 image in VS .NET applications. www.OnBarcode.comCHAPTER 3 BUILDING C++/CLI PROGRAMS
PDF417 Recognizer In C# Using Barcode reader for VS .NET Control to read, scan read, scan image in VS .NET applications. www.OnBarcode.comPaint USS Code 39 In Objective-C Using Barcode generator for iPhone Control to generate, create ANSI/AIM Code 39 image in iPhone applications. www.OnBarcode.comYou can view the metadata for reftype.exe by running ILDasm.exe. You can find ILDasm.exe in your .NET Framework SDK Bin directory. You may want to add this directory to the PATH environment variable so you always have access to ILDasm, since it is so useful. For example, it might be C:\Program Files\Microsoft Visual Studio 8\SDK\2.0\Bin or C:\Program Files\ Microsoft SDKs\Windows\v6.0A\bin. Figure 3-1 shows ILDasm.exe displaying information about reftype.exe. 1D Creation In VS .NET Using Barcode printer for .NET framework Control to generate, create 1D Barcode image in .NET applications. www.OnBarcode.comGenerate EAN-13 In VS .NET Using Barcode maker for Reporting Service Control to generate, create EAN-13 image in Reporting Service applications. www.OnBarcode.comFigure 3-1. ILDasm.exe in GUI mode Use the /text option if you just want text output to the console, instead of a GUI. Here s the output of the command line Ildasm.exe reftype.exe /text: // Microsoft (R) .NET Framework IL Disassembler. Version 2.0.50727.42 // Copyright (c) Microsoft Corporation. All rights reserved. QR Code 2d Barcode Generator In Objective-C Using Barcode creator for iPhone Control to generate, create QR image in iPhone applications. www.OnBarcode.comPainting UPC - 13 In Java Using Barcode maker for BIRT Control to generate, create European Article Number 13 image in Eclipse BIRT applications. www.OnBarcode.com// Metadata version: v2.0.50727 .assembly extern mscorlib { .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) .hash = (8B 15 F4 76 87 23 8A E0 94 A8 8B 19 BF 0F 87 C9 F0 97 3C C3 ) .ver 2:0:0:0 } .assembly reftype { .hash algorithm 0x00008004 .ver 0:0:0:0 } QR Code Encoder In None Using Barcode drawer for Software Control to generate, create Quick Response Code image in Software applications. www.OnBarcode.comPrinting UPC-A Supplement 2 In None Using Barcode creation for Software Control to generate, create GTIN - 12 image in Software applications. www.OnBarcode.com// .z\V.4.. // ...v.#.......... // ..<.
PDF-417 2d Barcode Generator In Visual Studio .NET Using Barcode drawer for .NET Control to generate, create PDF 417 image in VS .NET applications. www.OnBarcode.comUPC Symbol Reader In Java Using Barcode reader for Java Control to read, scan read, scan image in Java applications. www.OnBarcode.comCHAPTER 3 BUILDING C++/CLI PROGRAMS
.module reftype.exe // MVID: {8C21FB19-23D0-45E2-87BD-20EC172CF3CA} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY // Image base: 0x02EC0000 // ================== GLOBAL METHODS ========================= .method assembly static int32 main() cil managed { .entrypoint // Code size 19 (0x13) .maxstack 1 .locals init (class RefType V_0) IL_0000: newobj instance void RefType::.ctor() IL_0005: stloc.0 IL_0006: ldloc.0 IL_0007: call instance string RefType::GetMessage() IL_000c: call void [mscorlib]System.Console::WriteLine(string) IL_0011: ldc.i4.0 IL_0012: ret } // end of global method main // ============================================================= // =============== CLASS MEMBERS DECLARATION =================== .class private auto ansi beforefieldinit RefType extends [mscorlib]System.Object { .field private string classname .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { // Code size 18 (0x12) .maxstack 2 IL_0000: ldarg.0 IL_0001: call instance void [mscorlib]System.Object::.ctor() IL_0006: ldarg.0 IL_0007: ldstr "MyRefType"
|
|