Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

I need your help in GetDiskFreeSpaceExA

Status
Not open for further replies.

asher007

Programmer
Mar 29, 2004
13
US
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

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top