Click here to Skip to main content
15,902,938 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Crash Pin
Toni7816-Jul-03 19:17
Toni7816-Jul-03 19:17 
GeneralRe: Crash Pin
Jens Doose21-Jul-03 23:42
Jens Doose21-Jul-03 23:42 
Generalmain( int argc, char *argv[], char *envp[] ) Pin
dadacncn16-Jul-03 12:15
dadacncn16-Jul-03 12:15 
GeneralRe: main( int argc, char *argv[], char *envp[] ) Pin
Garth J Lancaster16-Jul-03 12:49
professionalGarth J Lancaster16-Jul-03 12:49 
GeneralRe: main( int argc, char *argv[], char *envp[] ) Pin
dadacncn16-Jul-03 22:51
dadacncn16-Jul-03 22:51 
Generalstrtok Pin
butterbean73016-Jul-03 11:46
butterbean73016-Jul-03 11:46 
GeneralRe: strtok Pin
Ryan Binns16-Jul-03 17:16
Ryan Binns16-Jul-03 17:16 
GeneralEnv Vars in arg list and Studio Pin
john john mackey16-Jul-03 11:15
john john mackey16-Jul-03 11:15 
help!! I'm confused...

I want to modify my VC++ application so that I can handle environment variables as such:
1) to launch my application (e.g. %MY_VAR%\bin\myapp.exe
2) as arguments to my app (e.g. %MY_VAR%\bin\myapp.exe %MY_VAR%\config\setup.dat
3) other processes launched "as threads" recognize %MY_VAR%


I have made some coding changes in my app's InitInstance() function to immediately resolve the environment variable. I do this like:

CWinApp *app = AfxGetApp();
if ((app->m_lpCmdLine, '%') != NULL)
{
// ExpandEnvironmentStrings(...), but I wrote my own
ResolveEnvVars(app->m_lpCmdLine); // resolves string in place
}
if (strchr(__targv[1], '%') != NULL)
{
ResolveEnvVars(__targv[1]);
}

// Parse command line for standard shell commands,DDE,file open -- WIZARD
CCommandLineInfo cmdInfo;
ParseCommandLine(cmdInfo);


PROBLEM -- I am having problems getting it to work, having problems using the DEBUGGER.

If I try to use the debugger while in STUDIO, it doesn't like me to supply %MY_VAR% in the arguments list. Is there a way to use %MY_VAR% format in the edit fields of the DEBUG Settings page???

Please help (aleviate my confusion).

Thanks.
Johnny
GeneralHiding controls in the CFileDialog Pin
GloriousBlues16-Jul-03 10:45
GloriousBlues16-Jul-03 10:45 
QuestionHow to make an automated phone call? Pin
Alvaro Mendez16-Jul-03 9:52
Alvaro Mendez16-Jul-03 9:52 
AnswerRe: How to make an automated phone call? Pin
Ranjan Banerji16-Jul-03 10:51
Ranjan Banerji16-Jul-03 10:51 
AnswerRe: How to make an automated phone call? Pin
Ranjan Banerji16-Jul-03 10:58
Ranjan Banerji16-Jul-03 10:58 
GeneralTo MFC or NOT to MFC that is the question. Pin
John R. Shaw16-Jul-03 9:48
John R. Shaw16-Jul-03 9:48 
GeneralRe: To MFC or NOT to MFC that is the question. Pin
Code4Food16-Jul-03 9:56
Code4Food16-Jul-03 9:56 
GeneralRe: To MFC or NOT to MFC that is the question. Pin
Ryan Binns16-Jul-03 17:24
Ryan Binns16-Jul-03 17:24 
QuestionHow to detect an USB Mass Storage or Digital Camera connection Pin
Member 30919816-Jul-03 9:28
Member 30919816-Jul-03 9:28 
Generalregistry api Pin
YaronNir16-Jul-03 9:09
YaronNir16-Jul-03 9:09 
GeneralRe: registry api Pin
David Crow16-Jul-03 9:35
David Crow16-Jul-03 9:35 
GeneralRe: registry api Pin
YaronNir17-Jul-03 4:20
YaronNir17-Jul-03 4:20 
GeneralRe: registry api Pin
David Crow17-Jul-03 5:23
David Crow17-Jul-03 5:23 
GeneralRe: registry api Pin
Iain Clarke, Warrior Programmer16-Jul-03 10:27
Iain Clarke, Warrior Programmer16-Jul-03 10:27 
GeneralRe: registry api Pin
YaronNir17-Jul-03 4:20
YaronNir17-Jul-03 4:20 
GeneralRe: registry api Pin
Iain Clarke, Warrior Programmer17-Jul-03 4:38
Iain Clarke, Warrior Programmer17-Jul-03 4:38 
GeneralRe: registry api Pin
YaronNir17-Jul-03 4:54
YaronNir17-Jul-03 4:54 
GeneralRadio Button groups Pin
act_x16-Jul-03 8:49
act_x16-Jul-03 8:49 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.