Condividi tramite


Proprietà VCCLCompilerTool.StructMemberAlignment

Specifica 1, 2, 4, 8, o limiti di 16 byte per l'allineamento dei membri struct.StructMemberAlignment espone la funzionalità del compilatore C++ /Zp (Allineamento membri struct) opzione e il compilatore MIDL Pagine delle proprietà MIDL: Avanzate opzione.

Spazio dei nomi:  Microsoft.VisualStudio.VCProjectEngine
Assembly:  Microsoft.VisualStudio.VCProjectEngine (in Microsoft.VisualStudio.VCProjectEngine.dll)

Sintassi

'Dichiarazione
Property StructMemberAlignment As structMemberAlignOption
structMemberAlignOption StructMemberAlignment { get; set; }
property structMemberAlignOption StructMemberAlignment {
    structMemberAlignOption get ();
    void set (structMemberAlignOption value);
}
abstract StructMemberAlignment : structMemberAlignOption with get, set
function get StructMemberAlignment () : structMemberAlignOption
function set StructMemberAlignment (value : structMemberAlignOption)

Valore proprietà

Tipo: Microsoft.VisualStudio.VCProjectEngine.structMemberAlignOption
In structMemberAlignOption valore.

Note

Lo strumento di MIDL non consente limiti di 16 byte.

Esempi

vedere Procedura: compilare codice di esempio per l'Extensibility del modello di progetto per informazioni su come compilare ed eseguire l'esempio.

Nell'esempio seguente viene modificato il compilatore StructMemberAlignment proprietà nell'ambiente di sviluppo (IDE) integrato (IDE):

' add reference to Microsoft.VisualStudio.VCProjectEngine.
Imports EnvDTE
Imports Microsoft.VisualStudio.VCProjectEngine

Public Module Module1
    Sub Test()
        Dim prj As VCProject
        Dim cfgs, tools As IVCCollection
        Dim cfg As VCConfiguration
        Dim tool As VCCLCompilerTool
        prj = DTE.Solution.Projects.Item(1).Object
        cfgs = prj.Configurations
        cfg = cfgs.Item(1)
        tool = cfg.Tools("VCCLCompilerTool")
        tool.StructMemberAlignment = structMemberAlignOption.alignSixteenBytes
    End Sub
End Module

Sicurezza di .NET Framework

Vedere anche

Riferimenti

VCCLCompilerTool Interfaccia

Spazio dei nomi Microsoft.VisualStudio.VCProjectEngine