Home > OS >  "Windows programming" file copy program in the first chapter
"Windows programming" file copy program in the first chapter

Time:09-30

I use an IDE is VS2012
But in the use of CreateFile, encountered problems, this function can't open the file, and the third of this chapter for use in this sample program used by CopyFile I cannot use, compile all can pass, runtime error output information
Source: https://paste.ubuntu.com/p/MVM3j8NqVR//



You, if you have know, please help me answer the

CodePudding user response:

Error code 2 is a file not found, or the current directory is not test. TXT of this to copy the source files

CodePudding user response:

Has been solved, I need to the type of transformation parameters, it more bytes into a byte wide line, the main function of the parameters are no longer use LPTSTR, instead use char *, and then use the MultiByteToWideChar before calling CreateFile conversion

CodePudding user response:

refer to the second floor zara's reply:
error code 2 is a file not found, or the current directory is not test. TXT this to copy the source file bai

Yes, this kind of low-level mistakes, how I can make it,,,,,,,,
  • Related