Proprietà VCCLCompilerTool.StructMemberAlignment
Specifica limiti di 1, 2, 4, 8 o 16 byte per l'allineamento dei membri struct. StructMemberAlignment espone la funzionalità dell'opzione /Zp (Allineamento membri struct) del compilatore C++ e dell'opzione Pagine delle proprietà MIDL: Avanzate del compilatore MIDL.
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
Valore structMemberAlignOption.
Note
Lo strumento 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 riportato di seguito la proprietà StructMemberAlignment del compilatore nell'ambiente di sviluppo 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
- Attendibilità totale per il chiamante immediato. Impossibile utilizzare questo membro in codice parzialmente attendibile. Per altre informazioni, vedere Utilizzo di librerie da codice parzialmente attendibile.