Click here to Skip to main content
15,891,473 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
Hi, I need to convert two args and then pass them as one variable into CreateProcess function as application arguments.
Posted
Updated 22-Jun-12 15:11pm
v2
Comments
Sergey Alexandrovich Kryukov 22-Jun-12 21:47pm    
Why? What would be the meaning of such "conversion"?
Makes no sense, really.
--SA

1 solution

The object of type char cannot be "converted" to char* in any reasonable ways: they have completely different sense: an individual character vs a pointer to a character which can represent access to an individual character of an array of character data. I'm sure you need something different. The function CreateProcess is the one from Windows API and its usage is completely described here:
http://msdn.microsoft.com/en-us/library/windows/desktop/ms682425%28v=vs.85%29.aspx[^].

This is a native function, so the difference between C++ or C++/CLI is irrelevant here, it could be C++ or C.

It looks like you are deeply confused about the very basics in programming: pointers, will need to learn a lot from scratch. I'm not sure you are ready to use mixed mode programming (managed + CLI) — just yet, need to step back and learn much more elementary things first.

—SA
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900