Forum: Win32/Win64 API (native code)
Delphi
by Remko,
24. Okt 2010
SizeOf(CREATE_VIRTUAL_DISK_PARAMETERS) = 44 and I think it should be 48 since the Union is not anonymous, try:
CREATE_VIRTUAL_DISK_PARAMETERS = record
case Version1: Integer of
0: (
UniqueId: TGUID;
MaximumSize: ULONGLONG;
BlockSizeInBytes: ULONG;
ParentPath: PWideChar;
SourcePath: PWideChar);
Forum: Win32/Win64 API (native code)
Delphi
by Remko,
24. Okt 2010
But it does mean that the recordsize of the CREATE_VIRTUAL_DISK_PARAMETERS might be wrong.
Forum: Win32/Win64 API (native code)
Delphi
by Remko,
24. Okt 2010
Yes, you are are right indeed (the argument is indeed passed as 4 bytes)
Forum: Win32/Win64 API (native code)
Delphi
by Remko,
24. Okt 2010
It seems you are passing an enum as a parameter(s), did you set {$MINENUMSIZE 4}?