Quantcast
Channel: WinDev Forum
Viewing all articles
Browse latest Browse all 1914

I could use some help with CopyFileExA API (2 replies)

$
0
0
I'm trying to do a filecopy in a Windev program, where I can display the copy progress with a standard Windev Progressbar.
This should be possible using the API function with CopyFileExA. The WDAPI application shows me the syntax how to do it, but I must be really stupid, because I'm not able to get it running. Mostly because of lack of knowledge from my side I think...

The syntax should be (according to WDAPI)

FunctionReturn is boolean // C type:BOOL
lpExistingFileName is system int // C type:LPCSTR, this is the address of a string, you also have the ability to specify a string directly
lpNewFileName is system int // C type:LPCSTR, this is the address of a string, you also have the ability to specify a string directly
lpProgressRoutine OPTIONAL is LPPROGRESS_ROUTINE //*********** TYPE NOT FOUND ***********
lpData OPTIONAL is system int // C type:LPVOID
pbCancel OPTIONAL is system int // C type:LPBOOL
dwCopyFlags is int // C type:DWORD

FunctionReturn=API("KERNEL32","CopyFileExA",lpExistingFileName,lpNewFileName,lpProgressRoutine OPTIONAL,lpData OPTIONAL,pbCancel OPTIONAL,dwCopyFlags)

For the sourcefile and destination a system int is used, but it should be possible to use a string directly also. But I can't figure out what I have to change in the code.
It would be nice to get the copy working, and then I need to be able the copyprogress with a progressbar. I suppose this has to be done by the lpProgressRoutine. But I don't have any clue on how to do it.

In other words.... HELP !

grtz

Patrick

Viewing all articles
Browse latest Browse all 1914

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>