michael@0: // Copyright (c) 2012 The Chromium Authors. All rights reserved. michael@0: // Use of this source code is governed by a BSD-style license that can be michael@0: // found in the LICENSE file. michael@0: michael@0: #ifndef BASE_WIN_STARTUP_INFORMATION_H_ michael@0: #define BASE_WIN_STARTUP_INFORMATION_H_ michael@0: michael@0: #include michael@0: michael@0: #include "base/base_export.h" michael@0: #include "base/basictypes.h" michael@0: michael@0: namespace base { michael@0: namespace win { michael@0: michael@0: // Manages the lifetime of additional attributes in STARTUPINFOEX. michael@0: class BASE_EXPORT StartupInformation { michael@0: public: michael@0: StartupInformation(); michael@0: michael@0: ~StartupInformation(); michael@0: michael@0: // Initialize the attribute list for the specified number of entries. michael@0: bool InitializeProcThreadAttributeList(DWORD attribute_count); michael@0: michael@0: // Sets one entry in the initialized attribute list. michael@0: bool UpdateProcThreadAttribute(DWORD_PTR attribute, michael@0: void* value, michael@0: size_t size); michael@0: michael@0: LPSTARTUPINFOW startup_info() { return &startup_info_.StartupInfo; } michael@0: const LPSTARTUPINFOW startup_info() const { michael@0: return const_cast(&startup_info_.StartupInfo); michael@0: } michael@0: michael@0: bool has_extended_startup_info() const { michael@0: return !!startup_info_.lpAttributeList; michael@0: } michael@0: michael@0: private: michael@0: STARTUPINFOEXW startup_info_; michael@0: DISALLOW_COPY_AND_ASSIGN(StartupInformation); michael@0: }; michael@0: michael@0: } // namespace win michael@0: } // namespace base michael@0: michael@0: #endif // BASE_WIN_SCOPED_STARTUP_INFO_EX_H_ michael@0: