?
Solved

Using CopyProgressRoutine with CopyFileEx in MS Visual Studio

Posted on 2003-03-21
2
Medium Priority
?
618 Views
Last Modified: 2007-12-19
I am copying a file with CopyFileEx without problems. I can even get the routine pointed to by lpProgressRoutine to run, but I have not been able to figure out how to access the TotalFileSize and TotalBytesTransferred from the CopyProgressRoutine.
0
Comment
Question by:dcellis1950
2 Comments
 
LVL 1

Author Comment

by:dcellis1950
ID: 8183103
Never mind I figured it out. The lpProgressRoutine instead of having a callback structure that I am use to from unix has individual arguments. So the setup is something like

CopyFileEx (FileIn, FileOut, (LPPROGRESS_ROUTINE) UpdateCopyProgressBar, ptrToProgressBar, bCancel, COPY_FILE_FAIL_IF_EXIST);


Then the callback is

LPPROGRESS_ROUTINE UpdateCopyProgressBar (
LARGE_INTEGER TotalFileSize,
LARGE_INTEGER TotalBytesTransfered,
LARGE_INTEGER StreamSize,
LARGE_INTEGER StreamBytesTransfered,
DWORD  dwStreamNumber,
DWORD  dwCallBackReason,
HANDLE  hDestinationFile,
LPVOID ptrToProgressBar)
{
\\ Update the progress bar
}

Simple, but for a time I could not see it.




0
 

Accepted Solution

by:
modulo earned 0 total points
ID: 8483862
PAQ'd and points refunded

modulo

Community Support Moderator
Experts Exchange
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The purpose of this article is to fix the unknown display problem in Linux Mint operating system. After installing the OS if you see Display monitor is not recognized then we can install "MESA" utilities to fix this problem or we can install additio…
The purpose of this article is to demonstrate how we can upgrade Python from version 2.7.6 to Python 2.7.10 on the Linux Mint operating system. I am using an Oracle Virtual Box where I have installed Linux Mint operating system version 17.2. Once yo…
Look below the covers at a subform control , and the form that is inside it. Explore properties and see how easy it is to aggregate, get statistics, and synchronize results for your data. A Microsoft Access subform is used to show relevant calcul…
As many of you are aware about Scanpst.exe utility which is owned by Microsoft itself to repair inaccessible or damaged PST files, but the question is do you really think Scanpst.exe is capable to repair all sorts of PST related corruption issues?
Suggested Courses
Course of the Month7 days, 23 hours left to enroll

616 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question