~ubuntu-branches/ubuntu/oneiric/nux/oneiric

« back to all changes in this revision

Viewing changes to NuxCore/NProcess.h

  • Committer: Bazaar Package Importer
  • Author(s): Sebastien Bacher
  • Date: 2010-12-17 13:59:57 UTC
  • mto: This revision was merged to the branch mainline in revision 8.
  • Revision ID: james.westby@ubuntu.com-20101217135957-5gvg6fkjxaa252i0
Tags: upstream-0.9.12
ImportĀ upstreamĀ versionĀ 0.9.12

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*
2
 
 * Copyright 2010 Inalogic Inc.
3
 
 *
4
 
 * This program is free software: you can redistribute it and/or modify it
5
 
 * under the terms of the GNU Lesser General Public License version 3, as
6
 
 * published by the  Free Software Foundation.
7
 
 *
8
 
 * This program is distributed in the hope that it will be useful, but
9
 
 * WITHOUT ANY WARRANTY; without even the implied warranties of
10
 
 * MERCHANTABILITY, SATISFACTORY QUALITY or FITNESS FOR A PARTICULAR
11
 
 * PURPOSE.  See the applicable version of the GNU Lesser General Public
12
 
 * License for more details.
13
 
 *
14
 
 * You should have received a copy of both the GNU Lesser General Public
15
 
 * License version 3 along with this program.  If not, see
16
 
 * <http://www.gnu.org/licenses/>
17
 
 *
18
 
 * Authored by: Jay Taoko <jaytaoko@inalogic.com>
19
 
 *
20
 
 */
21
 
 
22
 
 
23
 
#ifndef NPROCESS_H
24
 
#define NPROCESS_H
25
 
 
26
 
namespace nux
27
 
{
28
 
 
29
 
#ifdef _WIN32
30
 
  /**
31
 
  * Launches a uniform resource locator (i.e. http://www.yahoo.com/finance).
32
 
  * This is expected to return immediately as the URL is launched by another task.
33
 
  */
34
 
  void inlLaunchURL ( const TCHAR *URL, const TCHAR *Parms = NULL, NString *Error = NULL );
35
 
  void *inlCreateProc ( const TCHAR *URL, const TCHAR *Parms );
36
 
//! Get process termination code of a process
37
 
  BOOL inlGetProcReturnCode ( void *ProcessHandle, INT *ReturnCode );
38
 
 
39
 
#endif
40
 
 
41
 
  class NProcess
42
 
  {
43
 
    NUX_DECLARE_GLOBAL_OBJECT (NProcess, GlobalSingletonInitializer);
44
 
  public:
45
 
 
46
 
    DWORD GetProcessID();
47
 
    DWORD GetMainThreadID();
48
 
    DWORD GetCurrentThreadID();
49
 
  private:
50
 
 
51
 
#ifdef _WIN32
52
 
    HANDLE GetProcessHandle();
53
 
    HANDLE GetMainThreadHandle();
54
 
    HANDLE GetCurrentThreadHandle();
55
 
 
56
 
    HANDLE m_ProcessHandle;
57
 
    DWORD m_ProcessID;
58
 
    HANDLE m_MainThreadHandle;
59
 
    DWORD m_MainThreadID;
60
 
#endif
61
 
 
62
 
  };
63
 
 
64
 
}
65
 
 
66
 
#endif // NPROCESS_H
 
 
b'\\ No newline at end of file'