
Getting process name in the process
Quote:
> At first this sounded easier than I thought, or maybe I thought I know C.
> Anyway, is there anyway I can get the name of the process that I am
> executing without using argv ??
Sorry, I guess I didn't make my question very clear. I'll try again:
I'm developing an API, where one of its many functions it has to do is to
get the name of the process or application that is calling this API, and
storing the process name into a flat file. Of course the easiest way is to
design the API such that one of its parameters is the process name which
can easily be obtained from argv[0].
So my question is, is there any other way of retrieving the process name
other than from using argv[0]? Thanks again.
--
__ Chee-Kheong Lin
/ /\
/ / \ Singapore Networks Operation
__ /_/ /\ \ Hewlett-Packard Singapore
/_/\ __\ \ \_\ \ Telephone: +65 279 8648
\ \ \/ /\\ \ \/ / Fax : +65 272 2780
\ \ \/ \\ \ /
\ \ \ \ \\ \ \
\ \ \_\/ \ \ \
\ \ \ \_\/
\_\/
I'll never trust another old person...
-- Bart realizes Grampa duped him, _War_Of_The_Simpsons_