|
-
November 18th, 2009, 12:32 PM
#1
Using command line help
I want to copy a file. I would like it so i can give the argument in command line and that would be the file name of the copied one. But when i run it with the argument, nothing happens. Also, can i set "lpCmdLine" to have a default value when no value is assigned to it? Thanks for help!
#include <windows.h>
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int iCmdShow)
{
lpCmdLine = (LPSTR)GetCommandLine();
CopyFile(L"lol.txt", (LPCWSTR)lpCmdLine, FALSE);
return 0;
}
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|