sipxportlib  Version 3.3
OsProcessIteratorWnt.h
Go to the documentation of this file.
1 //
2 // Copyright (C) 2004-2006 SIPfoundry Inc.
3 // Licensed by SIPfoundry under the LGPL license.
4 //
5 // Copyright (C) 2004-2006 Pingtel Corp. All rights reserved.
6 // Licensed to SIPfoundry under a Contributor Agreement.
7 //
8 // $$
10 
11 
12 #ifndef _OsProcessIteratorWnt_h_
13 #define _OsProcessIteratorWnt_h_
14 
15 // SYSTEM INCLUDES
16 #define WIN32_LEAN_AND_MEAN
17 #include <windows.h>
18 
19 // APPLICATION INCLUDES
20 #include "os/OsDefs.h"
21 #include "os/OsStatus.h"
22 #include "os/OsProcess.h"
23 #include "os/OsProcessIterator.h"
24 
25 // DEFINES
26 // MACROS
27 // EXTERNAL FUNCTIONS
28 // EXTERNAL VARIABLES
29 // CONSTANTS
30 // STRUCTS
31 // TYPEDEFS
32 // FORWARD DECLARATIONS
33 class OsProcessBase;
35 
36 //: Used to enumerate running processes
37 
39 {
40 
41 /* //////////////////////////// PUBLIC //////////////////////////////////// */
42 public:
43 
44 /* ============================ CREATORS ================================== */
46  //:Default constructor
47 
48  virtual ~OsProcessIteratorWnt();
49  //:Destructor
50 
51 /* ============================ MANIPULATORS ============================== */
52 
53 /* ============================ ACCESSORS ================================= */
54 
55  OsStatus findFirst(OsProcess &rProcess);
56  //: Start enumeration of running processes
57  //: Returns OS_SUCCESS if found
58  //: Returns OS_FAILED if none found.
59 
60  OsStatus findNext(OsProcess &rProcess);
61  //: Continues enumeration of running processes
62  //: Returns OS_SUCCESS if found
63  //: Returns OS_FAILED if none found.
64 
65 
66 /* ============================ INQUIRY =================================== */
67 
68 
69 /* //////////////////////////// PROTECTED ///////////////////////////////// */
70 protected:
71 
72 
73 /* //////////////////////////// PRIVATE /////////////////////////////////// */
74 private:
75  OsProcess mProcess;
76  HANDLE hProcessSnapshot;
77  //:Last process found by this class
78 
79 };
80 
81 /* ============================ INLINE METHODS ============================ */
82 
83 
84 
85 #endif // _OsProcessIteratorWnt_h_
86 
87 
OsStatus findNext(OsProcess &rProcess)
Definition: OsProcessIteratorWnt.cpp:80
virtual ~OsProcessIteratorWnt()
Definition: OsProcessIteratorWnt.cpp:37
OsStatus findFirst(OsProcess &rProcess)
Definition: OsProcessIteratorWnt.cpp:47
OsProcessIteratorWnt()
Definition: OsProcessIteratorWnt.cpp:31
OsStatus
Definition: OsStatus.h:27
Definition: OsProcessIteratorWnt.h:38
Definition: OsProcess.h:59
Definition: OsProcessIterator.h:32