DECLARE INTEGER GetStdHandle IN Win32API; INTEGER nStdHandle DECLARE SHORT WriteConsole IN Win32API; INTEGER hConsoleOutput, STRING @lpBuffer,; INTEGER nNumberOfCharsToWrite,; INTEGER @lpNumberOfCharsWritten,; INTEGER lpReserved DECLARE SHORT WriteFile IN Win32API; INTEGER hFile, STRING @lpBuffer,; INTEGER nNumberOfBytesToWrite,; INTEGER @lpNumberOfBytesWritten,; STRING @lpOverlappedThe DOUBLE data type that you used is a 64 bit floating point number as opposed to a 32 bit integer (DWORD).