다음을 통해 공유


ICeeGen Interface

Provides methods for dynamic code compilation.

interface ICeeGen : IUnknown {
        
    HRESULT AddSectionReloc (
        HCEESECTION            section,
        ULONG                  offset,
        HCEESECTION            relativeTo,     
        CeeSectionRelocType    relocType
    );
        
    HRESULT AllocateMethodBuffer (  
        ULONG                  cchBuffer, 
        UCHAR                  **lpBuffer,
        ULONG                  *RVA
    );
        
    HRESULT ComputePointer (
        HCEESECTION            section,
        ULONG                  RVA, 
        UCHAR                  **lpBuffer
    );
        
    HRESULT EmitString (
        LPWSTR                 lpString,
        ULONG                  *RVA
    );
        
    HRESULT GenerateCeeFile ();
        
    HRESULT GenerateCeeMemoryImage (
        void                   **ppImage
    );
        
    HRESULT GetIlSection (
        HCEESECTION            *section
    );
        
    HRESULT GetIMapTokenIface (     
        IUnknown               **pIMapToken
    );
        
    HRESULT GetMethodBuffer (   
        ULONG                  RVA,
        UCHAR                  **lpBuffer
    );
        
    HRESULT GetSectionBlock (
        HCEESECTION            section,
        ULONG                  len,
        ULONG                  align     = 1,
        void                   **ppBytes = 0
    );
        
    HRESULT GetSectionCreate (
        const char             *name,
        DWORD                  flags,
        HCEESECTION            *section
    );
        
    HRESULT GetSectionDataLen (
        HCEESECTION            section,
        ULONG                  *dataLen
    );
        
    HRESULT GetString (
        ULONG                  RVA,
        LPWSTR                 *lpString
    );
        
    HRESULT GetStringSection (
        HCEESECTION            *section
    );
        
    HRESULT TruncateSection (
        HCEESECTION            section,
        ULONG                  len
    );
        
};

Methods

Method

Description

ICeeGen::AddSectionReloc Method

Adds a .reloc instruction to the code base.

ICeeGen::AllocateMethodBuffer Method

Creates a buffer of the specified size for a method, and gets the relative virtual address of the method.

ICeeGen::ComputePointer Method

Determines the buffer for the specified code section.

ICeeGen::EmitString Method

Emits the specified string into the code base.

ICeeGen::GenerateCeeFile Method

Generates a code-base file that contains the code base currently loaded into this ICeeGen.

ICeeGen::GenerateCeeMemoryImage Method

Generates an image in memory for the code base.

ICeeGen::GetIlSection Method

Gets the section of the intermediate language code base referenced by the specified handle.

ICeeGen::GetIMapTokenIface Method

Gets the interface referenced by the specified token.

ICeeGen::GetMethodBuffer Method

Gets a buffer of the appropriate size for the method at the specified relative virtual address.

ICeeGen::GetSectionBlock Method

Gets a section block of the code base.

ICeeGen::GetSectionCreate Method

Generates and gets a code section using the specified name and flag values.

ICeeGen::GetSectionDataLen Method

Gets the length of the specified section.

ICeeGen::GetString Method

Gets the string stored at the specified relative virtual address.

ICeeGen::GetStringSection Method

Gets a string representation of the code section referenced by the specified handle.

ICeeGen::TruncateSection Method

Truncates the specified code section by the specified length.

Requirements

Platforms: Windows 2000, Windows XP, Windows Server 2003 family

Header: Cor.h

Library: Used as a resource in MsCorEE.dll

.NET Framework Version: 2.0, 1.1, 1.0

See Also

Concepts

Metadata Interfaces