我为C Enum写了一个delphi数字你能回答我,我在哪里可能有错?有什么不对的吗?
C:
typedef enum {
AttributeStandardInformation = 0x10,
AttributeAttributeList = 0x20,
AttributeFileName = 0x30,
AttributeObjectId = 0x40,
AttributeSecurityDescriptor = 0x50,
AttributeVolumeName = 0x60,
AttributeVolumeInformation = 0x70,
AttributeData = 0x80,
AttributeIndexRoot = 0x90,
AttributeIndexAllocation = 0xA0,
AttributeBitmap = 0xB0,
AttributeReparsePoint = 0xC0,
AttributeEAInformation = 0xD0,
AttributeEA = 0xE0,
AttributePropertySet = 0xF0,
AttributeLoggedUtilityStream = 0x100
} ATTRIBUTE_TYPE
Run Code Online (Sandbox Code Playgroud)
并转换为delphi枚举:
ATTRIBUTE_TYPE=( AttributeStandardInformation = $10,
AttributeAttributeList = $20,
AttributeFileName = $30,
AttributeObjectId = $40,
AttributeSecurityDescriptor = $50,
AttributeVolumeName = $60,
AttributeVolumeInformation = $70,
AttributeData …Run Code Online (Sandbox Code Playgroud) 考虑我的示例代码:
var p512Sector:PByte;
.....
getmem(p512Sector, 262144);
FillChar( p512Sector,262144 ,0);
Run Code Online (Sandbox Code Playgroud)
当我运行程序时,Delphi给了我一个违规访问错误.为什么?