API Call problem

BlitzMax Forums/BlitzMax Programming/API Call problem

This returns 0,0,0 on my machine am I doing something wrong?


' <a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/fileio/fs/getdiskfreespaceex.asp" target="_blank">http://msdn.microsoft.com/library/default.asp?url=/library/en-us/fileio/fs/getdiskfreespaceex.asp</a>

Import "-lkernel32"

Extern "Win32"
	
	Function GetDiskFreeSpaceEx:Long( WindowText$z, FreeBytesToCaller:Long Ptr, TotalBytes:Long Ptr, TotalFree:Long Ptr ) = "GetDiskFreeSpaceExA@16"
		
End Extern

Local FreeBytesToCaller:Long 
Local Total:Long
Local FreeBytes:Long
					
					
GetDiskFreeSpaceEx( "C:", Varptr(FreeBytesToCaller), Varptr(Total), Varptr(FreeBytes) )
					
DebugLog "FreeBytesToCaller = " + FreeBytesToCaller
DebugLog "Total = " + Total
DebugLog "FreeBytes = " + FreeBytes