TCHAR* argv[ ]
-
Hello, i need to call wmain(int argc,TCHAR* argv[],TCHAR* envp[]) but how to create the TCHAR* argv[] ? it's possible to get different strings of argv via argv[0] ... [1] ... [2] The number of elements is stored in argc but which lenght has a TCHAR String ? I need the lenght to set the size of my malloc Big thanks for help :)
-
Hello, i need to call wmain(int argc,TCHAR* argv[],TCHAR* envp[]) but how to create the TCHAR* argv[] ? it's possible to get different strings of argv via argv[0] ... [1] ... [2] The number of elements is stored in argc but which lenght has a TCHAR String ? I need the lenght to set the size of my malloc Big thanks for help :)
you don't call main() or winmain() - or whatever the entry point is called - yourself. the system does it when you launch the application. a TCHAR is a char or a wchar_t, depending if the UNICODE (and _UNICODE) macro has been defined. to pass parameters to you main function, add command line parameters, and they will end as strings in the argv array
[VisualCalc][Binary Guide][CommDialogs] | [Forums Guidelines]
-
i didn't get your question. Do you know what is TCHAR ? it is just a tyepedef . If ur applicaiton is unicode TCHAR is wchar_t otherwise it is char.
If u can Dream... U can do it
-
you don't call main() or winmain() - or whatever the entry point is called - yourself. the system does it when you launch the application. a TCHAR is a char or a wchar_t, depending if the UNICODE (and _UNICODE) macro has been defined. to pass parameters to you main function, add command line parameters, and they will end as strings in the argv array
[VisualCalc][Binary Guide][CommDialogs] | [Forums Guidelines]
-
I call the DOS Main from out my MFC Application. The DOS Prog should run hidden(no visualization) in a thread (not process) but thanks nevertheless for your answer
baerten wrote:
I call the DOS Main from out my MFC Application
how are you achieving this ?
[VisualCalc][Binary Guide][CommDialogs] | [Forums Guidelines]
-
I call the DOS Main from out my MFC Application. The DOS Prog should run hidden(no visualization) in a thread (not process) but thanks nevertheless for your answer
-
baerten wrote:
I call the DOS Main from out my MFC Application
how are you achieving this ?
[VisualCalc][Binary Guide][CommDialogs] | [Forums Guidelines]
I make a AllocConsole in a Thread, then i redirect the STD_OUTPUT_HANDLE of the hidden console to stdout then i start simply _tmain(...) In my MFC applic i can read the output with the function "ReadConsoleOutput" and it works, i get the characters in a buffer of CHAR_INFO
-
I make a AllocConsole in a Thread, then i redirect the STD_OUTPUT_HANDLE of the hidden console to stdout then i start simply _tmain(...) In my MFC applic i can read the output with the function "ReadConsoleOutput" and it works, i get the characters in a buffer of CHAR_INFO
baerten wrote:
then i start simply _tmain(...)
i repeat my question : HOW ??
[VisualCalc][Binary Guide][CommDialogs] | [Forums Guidelines]
-
baerten wrote:
then i start simply _tmain(...)
i repeat my question : HOW ??
[VisualCalc][Binary Guide][CommDialogs] | [Forums Guidelines]
-
char ** args; args = (char**) malloc ( 2*sizeof(char*)); args[0] = (char*)malloc(50*sizeof(char)); args[1] = (char*)malloc(50*sizeof(char)); strcpy(args[0],"C:\\....."); strcpy(args[1],"\restart"); _tmain(2,args,0);
is your program calling its own _tmain() recursively ? :wtf:
[VisualCalc][Binary Guide][CommDialogs] | [Forums Guidelines]
-
is your program calling its own _tmain() recursively ? :wtf:
[VisualCalc][Binary Guide][CommDialogs] | [Forums Guidelines]