Re: How to use CopyFileEx() function in VB .NET

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Petar Atanasov wrote:
tailochik wrote:
I have a VB6 project that call CopyFileEx with ProgressRoutine to display the progress. The code is like this

'Copy the file to the destination folder
lpCallBack = AddressOf CopyProgressCallback
CopyFileEx strSourcePath & strFileName, strDestnPath & strFileName, lpCallBack, 0&, False, GC_CopyFileRestartable

Then I converted the project to VB .NET and the statement AddressOf doesn't return the memory address of the CopyProgressCallback function. Is there any what I could pass the value of lpCallBack to CopyFileEx in VB .NET? Thanks


hmmm, make a delegate for CopyProgressCallback...
I don't think you can make it directly as it was in VB6.

Regards,
Petar Atanasov
http://a-wake.net

Anyway,
It's better to refresh your code and use ProgressBar Class
http://msdn2.microsoft.com/en-us/library/system.windows.forms.progressbar.aspx

HTH,
Petar Atanasov
http://a-wake.net
.



Relevant Pages

  • Re: Nitrogen in tires????
    ... VAPOR that was in the ambient air that will end up as WATER, ... cause serious damage in the compressed air, ... definitely can superheat air if you compress it enough. ...
    (alt.autos.toyota)
  • Re: Popular rowing fallacies #2 - the mystique of vertical shins
    ... pull the blade through the water). ... Accelerate, Accelerate the boat, accelerate the blade, it's just ... you want to compress, but not 'over' ... Rowers who do not naturally approach anything like vertical with their shins get told to compress further - without regard to the anatomical reasons why they find this impossible. ...
    (rec.sport.rowing)
  • Re: All Burnt Up
    ... water can't be compressed but it nevertheless was ... There was no water to compress in the ... The bone that Johanson took was a femur (remember? ... Johanson found was the distal end of a femur and a proximal tibia. ...
    (talk.origins)
  • Re: Silly engine question
    ... have a water-compression engine? ... I know you can't compress water itself, but could you compress a mixture ... Build yourself a PWR and use both the steam expansion and the ...
    (uk.rec.motorcycles)
  • Re: Silly engine question
    ... have a water-compression engine? ... I know you can't compress water itself, ... The law of "conservation of energy" is your problem where water is ...
    (uk.rec.motorcycles)