Hi guys,
I'm new and also i'm a kind of beginner in assembly....
I got a question that I wasn't able to solve by myself: I'd like to copy a folder and everything contained inside (even subbfolder)...
I tought i'm working on windows and I don't care of portability issues why not use APIS??
So that I started searching .. I figured out that the best answer is this Function SHFileOperation
OK now i went on MSDN and I checked out how it works (I also checked SHFILEOPSTRUCT structure I need to fill it before use SHFileOperation of course)
but "googling" around I found ;"recycle.asm" written by Hutch and I gave a look at it And "MAGICALLY" I found a procedure that could help me a bit So I modified the procedure like that But it still don't have a nice result
I Used this procedure
CopyDir proc pszFullPath:DWORD,pszFullPathDestination:DWORD
LOCAL fo:SHFILEOPSTRUCT
mov fo.hwnd, NULL
mov fo.wFunc, FO_COPY
m2m fo.pFrom, pszFullPath ; <-- member is also a double-null terminated string and is handled in much the same way
m2m fo.pTo, pszFullPathDestination ; <-- member is also a double-null terminated string and is handled in much the same way
mov fo.fFlags,FOF_SILENT ;<-- I hate progress dialog box
invoke SHFileOperation,ADDR fo
ret
CopyDir endp
If there is a gentleman or gentlewoman that is able to help me I would appreciate it :)
Nothing guys I've already solved by myself!! so the piece of code it's correct at all and it works
CopyDir it's prototyped like this -> CopyDir PROTO :DWORD, :DWORD
m2m macro I used this:
m2m MACRO M1, M2
push M2
pop M1
ENDM
Could someone correct me the attachment file (it's the source) in order to see where I'm wrong cos each singular function works!