: : This message was edited by Gaashius at 2005-12-16 10:51:47
: : : I am looking for some example code to copy files in WinXP.
: : : The code I currently have doesn't work if the destination folder is hidden.
: : :
: : : Thanks.
: : :
: : Show us the code and we maybe can help.
: :
: : EDIT: maybe
: :
: : ****************
: :
: : Gaashius
: :
: :
: :
: :
: :
:
: Here is what I have so far.
: Thanks.
:
: ; copyf.asm Copy a file over an existing file
: ;
:
: .486
: .model flat, stdcall ; 32 bit memory model
: option casemap :none ; case sensitive
:
:
: include \masm32\include\windows.inc
: include \masm32\include\masm32.inc
: include \masm32\include\gdi32.inc
: include \masm32\include\user32.inc
: include \masm32\include\kernel32.inc
: include \masm32\include\Comctl32.inc
: include \masm32\include\comdlg32.inc
: include \masm32\include\shell32.inc
: include \masm32\include\oleaut32.inc
: include \masm32\macros\macros.asm
:
: includelib \masm32\lib\masm32.lib
: includelib \masm32\lib\gdi32.lib
: includelib \masm32\lib\user32.lib
: includelib \masm32\lib\kernel32.lib
: includelib \masm32\lib\Comctl32.lib
: includelib \masm32\lib\comdlg32.lib
: includelib \masm32\lib\shell32.lib
: includelib \masm32\lib\oleaut32.lib
:
: .data
:
: File1 db "C:\Supplies\Lab_Order.xls", 0 ; file names are case sensitive
: File2 db "C:\spare\Lab_Order.xls", 0
:
: .code
:
: start:
:
: main proc
:
: LOCAL buffer[260]:BYTE
: invoke GetCL,1,ADDR buffer
:
: ; Specifies how this operation is to proceed if a file of the same
: ; name as that specified by lpNewFileName already exists.
: ; If this parameter is TRUE and the new file already exists,
: ; the function fails. If this parameter is FALSE and the new file
: ; already exists, the function overwrites the existing file and succeeds.
:
: invoke CopyFile, offset File1, offset File2, FALSE
: invoke ExitProcess,0
:
: main endp
:
: end start
:
:
The problem should be in the CopyFile thingy you invoke... what could not be modified easily I think. If you know in which include file does CopyFile exist, you could show us that also.
****************
Gaashius