I work in Mindows XP Professional and Powerbuilder 10 Build 4510.
Here is a local function definirion:
FUNCTION Long GetDiskFreeSpaceExA ( &
string lpDrive, &
LongLong lpFreeBytesAvailableToCaller, &
LongLong lpTotalNumberOfBytes, &
LongLong lpTotalNumberOfFreeBytes) &
LIBRARY "Kernel32.DLL" ALIAS FOR "GetDiskFreeSpaceExA"
Here is my script:
longlong ll_lpFreeBytesAvailableToCaller
longlong ll_lpTotalNumberOfBytes
longlong ll_lpTotalNumberOfFreeBytes
long ll
ll = GetDiskFreeSpaceExA ("C:\", ll_lpFreeBytesAvailableToCaller, ll_lpTotalNumberOfBytes, &
ll_lpTotalNumberOfFreeBytes)
mle_hard_drive_info.text = mle_hard_drive_info.text + '~r~nFree Bytaes Available: ' + &
string(ll_lpFreeBytesAvailableToCaller/1000000) + '~tMB~r~n' + &
'~r~nFree Total: ' + string(ll_lpTotalNumberOfBytes/1000000) + '~tMB~r~n' + &
'~r~nFree: ' + string(ll_lpTotalNumberOfFreeBytes/1000000) + '~tMB'
I got error message while calling function GetDiskFreeSpaceExA:
"Powerbuilder Application Execution Error (R0042)
Error: Specified argument type differs from required argument type at runtime in DLL function getdiskfreespeceexa. (invalid stack pointer on return from function call) at line..."
What did I do wrong?
Thanks
Arnold
Here is a local function definirion:
FUNCTION Long GetDiskFreeSpaceExA ( &
string lpDrive, &
LongLong lpFreeBytesAvailableToCaller, &
LongLong lpTotalNumberOfBytes, &
LongLong lpTotalNumberOfFreeBytes) &
LIBRARY "Kernel32.DLL" ALIAS FOR "GetDiskFreeSpaceExA"
Here is my script:
longlong ll_lpFreeBytesAvailableToCaller
longlong ll_lpTotalNumberOfBytes
longlong ll_lpTotalNumberOfFreeBytes
long ll
ll = GetDiskFreeSpaceExA ("C:\", ll_lpFreeBytesAvailableToCaller, ll_lpTotalNumberOfBytes, &
ll_lpTotalNumberOfFreeBytes)
mle_hard_drive_info.text = mle_hard_drive_info.text + '~r~nFree Bytaes Available: ' + &
string(ll_lpFreeBytesAvailableToCaller/1000000) + '~tMB~r~n' + &
'~r~nFree Total: ' + string(ll_lpTotalNumberOfBytes/1000000) + '~tMB~r~n' + &
'~r~nFree: ' + string(ll_lpTotalNumberOfFreeBytes/1000000) + '~tMB'
I got error message while calling function GetDiskFreeSpaceExA:
"Powerbuilder Application Execution Error (R0042)
Error: Specified argument type differs from required argument type at runtime in DLL function getdiskfreespeceexa. (invalid stack pointer on return from function call) at line..."
What did I do wrong?
Thanks
Arnold