CopyFile()

This is a discussion on CopyFile() within the Windows Programming forums, part of the Platform Specific Boards category; I am using CopyFile, but want to know how I can confirm the copy has been sucessful, does it have ...

  1. #1
    Registered User
    Join Date
    Sep 2001
    Posts
    7

    Question CopyFile()

    I am using CopyFile, but want to know how I can confirm the copy has been sucessful, does it have a return type, or is there another way to find out if the copy has sucessfully taken place?



    Magic

  2. #2
    mustang benny bennyandthejets's Avatar
    Join Date
    Jul 2002
    Posts
    1,401
    Have you tried googling this question, or searching at MSDN? We don't have time to answer these sorts of stupid questions. The return type of a Win32 API function is not in the scope of this forum.
    benforbes@optusnet.com.au
    Microsoft Visual Studio .NET 2003 Enterprise Architect
    Windows XP Pro

    Code Tags
    Programming FAQ
    Tutorials

  3. #3
    Registered User
    Join Date
    Oct 2001
    Posts
    2,934
    I hope I don't get flamed for answering this.

    If function succeeds, return value is nonzero. If function fails, return value is zero.
    To get extended error information, call GetLastError.

  4. #4
    mustang benny bennyandthejets's Avatar
    Join Date
    Jul 2002
    Posts
    1,401
    FLAME FLAME FLAME

    Just kidding. I don't mind people answering magic's post, I just wanted to tell him/her the proper way to use these forums.
    benforbes@optusnet.com.au
    Microsoft Visual Studio .NET 2003 Enterprise Architect
    Windows XP Pro

    Code Tags
    Programming FAQ
    Tutorials

  5. #5
    Registered User
    Join Date
    Oct 2001
    Posts
    2,934
    You made a good point. This was one I just happened to have the answer at hand.

  6. #6
    jasondoucette.com JasonD's Avatar
    Join Date
    Mar 2003
    Posts
    278

    Re: CopyFile()

    Originally posted by magic
    I am using CopyFile, but want to know how I can confirm the copy has been sucessful, does it have a return type, or is there another way to find out if the copy has sucessfully taken place?
    I'll give you a tip: search on Google for "MSDN functionname". For example, in your case: http://www.google.com/search?q=msdn+CopyFile. It almost always returns what you want in the first or second result. Google is way better than MSDN's search feature.

    Also, bennyandthejets is right. No one has the time to answer these sorts of questions, when the answer is freely and easily available from MSDN. If you are having trouble understanding how to use this information, that is when you should ask a question here.

  7. #7
    Registered User
    Join Date
    Sep 2001
    Posts
    7
    Thanx for the help - i'll try not to bore you with my inferior petty problems again.

    Magic

  8. #8
    Cat
    Cat is offline
    Registered User
    Join Date
    May 2003
    Posts
    1,571
    You are free to ask questions, but most people here feel that we're not your personal reference manuals. And asking better questions is in your best interest, as well -- you spent 8 hours waiting for an answer that Google would have given you in 8 seconds.

    Posting questions like how to achieve some task, how to use some command that is poorly documented, which of several options for a task is best, etc. are good questions -- they aren't trivially simple to find answers for on your own. Asking about the parameters or return of a function, though, is something best suited for Google.
    You ever try a pink golf ball, Wally? Why, the wind shear on a pink ball alone can take the head clean off a 90 pound midget at 300 yards.

Popular pages Recent additions subscribe to a feed

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21