Hi All,

I'm adding some API functionality to my ClsFiles Class.

So I'm wrapping CopyFileEx
(Public Declare Function CopyFileEx Lib "kernel32.dll" Alias "CopyFileExA" (ByVal lpExistingFileName As String, ByVal lpNewFileName As String, ByVal lpProgressRoutine As Long, lpData As Any, ByRef pbCancel As Long, ByVal dwCopyFlags As Long) As Long)

Now the progress can be evaluted in the function given the adres for:
CopyFileEx("c:\verybigfile.ext", "c:\copy.ext", AddressOf CopyProgressRoutine, ByVal 0&, bCancel, COPY_FILE_RESTARTABLE)

but that routine has to reside in a bas module to be able to pass an base adres.

This part goes fine but I need to raise an event in the class that sends this progress to the calling object so is can be proccessed in a progressbar, label etc...

Does anyone knows a trick to get that information from the function CopyProgressRoutine in the bas module to the class that can be created anywhere, keeping the code reusable (that is without re-writing it for every situation)

Hoping for a positive answer.....

sincerly yours Dnereb.