Limit spellcheck feedback to approximately 10 MB.
[chromium-blink-merge.git] / base / win / startup_information.h
blob3f18ee58efb1e00207fd684a4de7d3f1ac6b5e02
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef BASE_WIN_STARTUP_INFORMATION_H_
6 #define BASE_WIN_STARTUP_INFORMATION_H_
8 #include <windows.h>
10 #include "base/base_export.h"
11 #include "base/basictypes.h"
13 namespace base {
14 namespace win {
16 // Manages the lifetime of additional attributes in STARTUPINFOEX.
17 class BASE_EXPORT StartupInformation {
18 public:
19 StartupInformation();
21 ~StartupInformation();
23 // Initialize the attribute list for the specified number of entries.
24 bool InitializeProcThreadAttributeList(DWORD attribute_count);
26 // Sets one entry in the initialized attribute list.
27 // |value| needs to live at least as long as the StartupInformation object
28 // this is called on.
29 bool UpdateProcThreadAttribute(DWORD_PTR attribute,
30 void* value,
31 size_t size);
33 LPSTARTUPINFOW startup_info() { return &startup_info_.StartupInfo; }
34 const LPSTARTUPINFOW startup_info() const {
35 return const_cast<const LPSTARTUPINFOW>(&startup_info_.StartupInfo);
38 bool has_extended_startup_info() const {
39 return !!startup_info_.lpAttributeList;
42 private:
43 STARTUPINFOEXW startup_info_;
44 DISALLOW_COPY_AND_ASSIGN(StartupInformation);
47 } // namespace win
48 } // namespace base
50 #endif // BASE_WIN_STARTUP_INFORMATION_H_