News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

Is CopyAFile a legit function?

Started by skywalker, February 05, 2006, 02:00:42 PM

Previous topic - Next topic

skywalker

I found CopyAFile in the larger Win32.hlp file, but it isn't working right. Maybe I don't have the right include or library.

Thanks.

invoke CopyAFile,offset File1, offset File2,cmoOverwrite,0

P1

It's not a WIN32 api function.  I have found several references to it as a library function for different laguages.

So post some of the information that you have found.  Or at least a web link to the file you are talking about.

Regards,  P1  :8)

Tedd

There is a "CopyFile" function, with parameters: source, destination, and overwrite.
Haven't seen "CopyAFile" though.
No snowflake in an avalanche feels responsible.

P1

Quote from: Tedd on February 06, 2006, 04:42:55 PM
There is a "CopyFile" function, with parameters: source, destination, and overwrite.
Haven't seen "CopyAFile" though.
I asked him to post the reference, because I believe it will be a CopyFileA from the API.

Regards,  P1  :8)

Vortex

skywalker,

MSDN doesn't give any result if you search that function.

Mincho Georgiev

Actually, skywalker's got a point, because there really is a function named CopyAFile in the Win32Api Reference, declared like that:
VOID CopyAFile(LPSTR szFullPathSrc, LPSTR szFullPathDst, INT cmo, INT fAppend);
But after a little research, i found sh.t :)
As a matter of fact the only file on my PC that have the string "CopyAFile" is the same one that skywalker is saw. the mstools.toc, which is appart from Win32Api Reference (the full version,from Borland's CBulder Package). There is a few people (i didn't recognize their nationality's because the html's was on language that my PC don't support) with a same problem like skywalker's one - they have saw the CopyAFile declaration in Win32Api reference and try to use it with the same (no) result.
That suggests to me a two possibilities:
1st  The function is totally obsolete
2nd Is a some kind of error in the reference (maybe M$ intention was to implement that function,but they didn't)

That is my opinion, there is no guarantees that i'm 100% right, but it is possible!

skywalker

Quote from: shaka_zulu on February 06, 2006, 05:46:38 PM
Actually, skywalker's got a point, because there really is a function named CopyAFile in the Win32Api Reference, declared like that:
VOID CopyAFile(LPSTR szFullPathSrc, LPSTR szFullPathDst, INT cmo, INT fAppend);
But after a little research, i found sh.t :)
As a matter of fact the only file on my PC that have the string "CopyAFile" is the same one that skywalker is saw. the mstools.toc, which is appart from Win32Api Reference (the full version,from Borland's CBulder Package). There is a few people (i didn't recognize their nationality's because the html's was on language that my PC don't support) with a same problem like skywalker's one - they have saw the CopyAFile declaration in Win32Api reference and try to use it with the same (no) result.
That suggests to me a two possibilities:
1st  The function is totally obsolete
2nd Is a some kind of error in the reference (maybe M$ intention was to implement that function,but they didn't)

That is my opinion, there is no guarantees that i'm 100% right, but it is possible!

I  downloaded several win32.hlp files and one of them had the CopyAFile in it. It may have come from a visual basic or C programming language board.


Mincho Georgiev


Tedd

I've just 'grep'ed all the dlls in my system32 directory, and there's no mention of copyafile, so I assume it must've come from elsewhere.
No snowflake in an avalanche feels responsible.

Mincho Georgiev

I know, i've already did that and the only file that contains that function is the win32Api ref's one from CBuilder's MSHelp.
The fact that this function is in "mstools.hlp" defenately exclude the option this would be an API function!
Is a part from the complete borland's Win32Api reference package.
The materials that i've found was written by an CBuilder users, and no doubt that CopyAFile function is not a part from Borland class interface for cbuilder neither.
Anyway there is no enought info anywhere about it, so no way for us to figure it out with a 100% guarantee.
The only thing that i'm sure in is that even if CopyAFile is a "legit" function, is not an win32 API function at all !
check it out if you like:

ftp://ftp.borland.com/pub/bcppbuilder/techpubs/bcb5/b5ms.zip

Mincho Georgiev

And i want to add something at the end, as i said before, CopyAFile is from MSTOOLS.hlp, so im 99% sure that is apart from a ms tool associated functions.
Maybe .msi or something.
Bye for now.

p.s. Skywalker, you better choose CopyFile or CopyFileEx instead of this and forget it,it's not worth the time loosing.

donkey

Probably mean CopyFileA which is the ANSI wrapper for CopyFile.
"Ahhh, what an awful dream. Ones and zeroes everywhere...[shudder] and I thought I saw a two." -- Bender
"It was just a dream, Bender. There's no such thing as two". -- Fry
-- Futurama

Donkey's Stable

Casper

Donkey,
This is offtopic but I am sure others want to know, also.  Do you intend to put your webpage back up at some point.  There was some very useful stuff you had there; a nice resource.

Casper.

gwapo

In Win32, CopyAFile is a setup related function, which means it is part of the setup SDK, i.e., when you are working with MSI for example, you can use it by including Setup.h header file that comes from the setup SDK to your program.

In general programming (not thinking about setup SDK), it would be best not to use CopyAFile function since it is only a wrapper function to make ease the call between CopyFileA and CopyFileW functions. Your application will be able to determine between ANSI and Unicode without the help of setup SDK, and use the most appropriate function.


-chris