Cyber-Dragon
asked on
C++ Passing Parameters to Silent Program
In a prior question I asked how to make the console window not show up in a Windows application and I was told to replace void main() with int __stdcall WinMain(), which worked perfectly. But now I wish to pass this silent program parameters when I execute the program from an external program and I am unsure of how I would do this with this function.
Previous Question: https://www.experts-exchange.com/questions/24330131/C-Hiding-Console-Window-of-Application.html
Can anyone help me?
Previous Question: https://www.experts-exchange.com/questions/24330131/C-Hiding-Console-Window-of-Application.html
Can anyone help me?
ASKER
I don't quite understand this:
lpCmdLine
[in] Pointer to a null-terminated string specifying the command line for the application, excluding the program name. To retrieve the entire command line, use the GetCommandLine function.
lpCmdLine
[in] Pointer to a null-terminated string specifying the command line for the application, excluding the program name. To retrieve the entire command line, use the GetCommandLine function.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
>> If you have an ANSI project you may use the following function instead.
Yup, very true... I probably should have pointed this out. Thanks Alex.
Yup, very true... I probably should have pointed this out. Thanks Alex.
>>>> I probably should have pointed this out.
I actually looked first for the CommandLineToArgvA in WINAPI and was puzzled that it doesn't exist. And writing the code above took more time than I thought ;-)
I actually looked first for the CommandLineToArgvA in WINAPI and was puzzled that it doesn't exist. And writing the code above took more time than I thought ;-)
{http:#24178622} answers this with {http:#24187857} assisting.
http://msdn.microsoft.com/en-us/library/ms633559(VS.85).aspx