Pay attention to the data types used here Windows API help with CopyFileExA() and Callback to show Progress and here
Windows API help with CopyFileExA() and Callback to show Progress
namely, you need to create a pointer (long but Paul Attryde says use a ulong for pointers How can I access the raw stack data? MS callback proc prototype changes when asm starts popping the stack) pointing to a clarion Type’d group structure which matches this MS data type
ULARGE_INTEGER - Win32 apps | Microsoft Docs
Dword’s are ulong’s so this would apply.
UINT64 GROUP,TYPE
lo ULONG
hi ULONG
END
And would be the group data type to point (long/ulong) to in the api.
Its worth noting in the svapi.inc SV have declared which is different to what MS have declared on their website.
_ULARGE_INTEGER group,type
LowPart long
HighPart long
end
They also have an equate in WinEqu.clw defined as
Ularge_Integer Equate(Ulong)
Which would be wrong, unless there is some behind the scenes things going on in the runtime.
and then apply to this api.
SHGetDiskFreeSpaceExA function (shellapi.h) - Win32 apps | Microsoft Docs
map
module
MyPrefixForUniquenessToAvoidCompilerWarningsWith3rdPartyAddons_SHGetDiskFreeSpaceExA(CONST *cstring pNullTerminatedStringAkaCstring, long pPointerToUlarge_IntegerFreeBytes,long pPointerToUlarge_IntegerByteNumber , long pPointerToUlarge_IntegerFreeByteNumber),Bool,Raw,Pascal,Name('SHGetDiskFreeSpaceExA')
!Which is also the same as
Prefix_SHGetDiskFreeSpaceExA(long,long,long,long),bool,Pascal,Name(SHGetDiskFreeSpaceExA')
End
End
The next challenge is getting the value out of the group data type UINT64 in order to display.
Because I dont know what data conversion is taking place in the runtime, you could try a Real Over the group structure as shown
TotalFileSize LIKE(INT64),OVER(R_TotalFileSize)
also mentioned here complete with calculations needed to be performed. Hint: Decimal is easiest and scalable.
From 2003!
Clarion, Displaying a ULARGE_INTEGER (computer-programming-forum.com)
I should add, you’ll know when you have the right calculations because they will match what you see in file explorer or dos.