Hi everyone !
I want to write a file copy subroutine which can resume file if it was interrrupted. I found kernel32.dll\CopyFileEx is just perfect for my needs.
It is described
in MSDN as
Quote:
BOOL CopyFileEx(
LPCTSTR lpExistingFileName,
LPCTSTR lpNewFileName,
LPPROGRESS_ROUTINE lpProgressRoutine,
LPVOID lpData,
LPBOOL pbCancel,
DWORD dwCopyFlags
);
I am a complete newbie to DLLCall function of Autohotkey, but this is what I have buit:
Quote:
lpProgressRoutine = 0
lpData = 0
pbCancel = 0
COPY_FILE_RESTARTABLE = 0x02
result := DllCall("CopyFileEx", "str", ExistingFileName, "str", NewFileName, "int *", 0, "int *", lpData, "int *", pbCancel, "int", COPY_FILE_RESTARTABLE)
This will give me 0x05 error which is Access violation. After my testing, I am convinced it is caused by lpProgressRoutine = 0.
I wonder, is it possible to run CopiFileEx() at all from Autohotkey ?
How should I pass a NULL pointer to CopyFileEx ?
What am I missing here
