Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ Library : Other (not classified elsewhere) » access to raw command line parameters
Re: access to raw command line parameters [message #3911 is a reply to message #3875] Sat, 08 July 2006 22:08 Go to previous messageGo to previous message
Werner is currently offline  Werner
Messages: 234
Registered: May 2006
Location: Cologne / Germany
Experienced Member
unodgs wrote on Wed, 05 July 2006 09:04

dr_jumba wrote on Tue, 04 July 2006 12:21

Hi,

Is there exist an easy way to access to command line parameters passed to GUI_APP?

What I need is to pass these parameters to 3rd party library init function.
E.g.
SuperLibInit(argc, argv);

Thanks.


It seems there is no way to access that variables directly, but you can get command line parameters into string vector using CommnadLine() function:

const Vector<String> &cmd = CommandLine();
int cnt = cmd.GetCount();
const char **argv = new const char*[cnt];
	
for(int i = 0; i < cnt; i++)
    argv[i] = cmd[i];

SuperLibInit(cnt, argv); 



If the above code doesn't help (it doesn't comply with the C++ standard Rolling Eyes ) you might want to have a look at my recent posting "ArgcArgv – use argc and argv under Ultimate++!" (Home » Extra libraries, Code snippets, applications etc. » U++ users applications in progress and useful code snippets, including reference examples!)

Werner
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Web/SSL SSL_CTX_load_verify_locations [FEATURE REQUEST]
Next Topic: cutting the string
Goto Forum:
  


Current Time: Fri Jul 04 22:43:11 CEST 2025

Total time taken to generate the page: 0.03712 seconds