1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: process.h,v $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
30 #ifndef _RTL_PROCESS_H_
31 #define _RTL_PROCESS_H_
33 #include <sal/types.h>
34 #include <osl/process.h>
42 gets a 16-byte fixed size identifier which is guaranteed not to change
43 during the current process.
45 The current implementation creates a 16-byte uuid without using
46 the ethernet address of system. Thus the
47 identifier is different from identifiers created
48 in other processes with a very probability.
50 @param pTargetUUID 16 byte of memory
53 void SAL_CALL
rtl_getGlobalProcessId( sal_uInt8
*pTargetUUID
);
55 /** Get the nArg-th command-line argument passed to the main-function of this process.
57 This functions differs from osl_getCommandArg() in filtering any bootstrap values
58 given by command args, that means that all arguments starting with "-env:" will be
59 ignored by this function.
61 @param nArg [in] The number of the argument to return.
62 @param strCommandArg [out] The string receives the nArg-th command-line argument.
63 @return osl_Process_E_None or does not return.
64 @see osl_getCommandArg()
65 @see rtl_getCommandArgCount()
67 oslProcessError SAL_CALL
rtl_getAppCommandArg(sal_uInt32 nArg
, rtl_uString
**strCommandArg
);
69 /** Returns the number of command line arguments at process start.
71 This functions differs from osl_getCommandArg() in filtering any bootstrap values
72 given by command args, that means that all arguments starting with "-env:" will be
73 ignored by this function.
75 @return the number of commandline arguments passed to the main-function of this process.
76 @see osl_getCommandArgCount()
77 @see rtl_getCommandArg()
79 sal_uInt32 SAL_CALL
rtl_getAppCommandArgCount();