开发者

How to UpdateResource with knowing work progress?

开发者 https://www.devze.com 2023-02-15 09:42 出处:网络
Well, I\'m using UpdateResource to embed a file to an executable file. It works correctly but I want to know whether or not it is possible to show the update progress using a Pr开发者_如何学编程ogress

Well, I'm using UpdateResource to embed a file to an executable file. It works correctly but I want to know whether or not it is possible to show the update progress using a Pr开发者_如何学编程ogressBar?


Since there's no callback function passed in, there's no way to receive progress information. In addition, UpdateResource doesn't actually update the file until you call EndUpdateResource, so during calls to UpdateResource there's actually no progress to report anyway.

From MSDN:

An application can use UpdateResource repeatedly to make changes to the resource data. Each call to UpdateResource contributes to an internal list of additions, deletions, and replacements but does not actually write the data to the file indicated by hUpdate. The application must use the EndUpdateResource function to write the accumulated changes to the file.


No, because the UpdateResource function does not expose any notification method to show the progress.

0

精彩评论

暂无评论...
验证码 换一张
取 消