[Subject Prev][Subject Next][Thread Prev][Thread Next][Subject Index][Thread Index]

Equivalence of GetCommandLine() in Linux.


The shared library (DLL) I am porting to Linux from NT uses
extensively GetCommandLine() in the DLL code to get the 
command line arguments that were passed to the application.

As in the shared library I don't have access to argc and argv from
main, how can I port this code ?

I understand that in Solaris ___Argv will have the command line
parameter set. Is there anything similar in Linux ?? Also is there
anything that will work in Solaris, Linux as well as in unixware ??

I don't want to force the users of the shared library to call
explicitly a set method ,say SetCommandLine, with argc and argv, 
before using the shared library. Also I don't have the flexibility 
of changing the function parameters to take argc and argv.

Any help is highly appreciated.

Thanks in advance,