security/sandbox/win/src/window.h

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/security/sandbox/win/src/window.h	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,39 @@
     1.4 +// Copyright (c) 2009 The Chromium Authors. All rights reserved.
     1.5 +// Use of this source code is governed by a BSD-style license that can be
     1.6 +// found in the LICENSE file.
     1.7 +
     1.8 +#ifndef SANDBOX_SRC_WINDOW_H_
     1.9 +#define SANDBOX_SRC_WINDOW_H_
    1.10 +
    1.11 +#include <windows.h>
    1.12 +#include <string>
    1.13 +
    1.14 +#include "sandbox/win/src/sandbox_types.h"
    1.15 +
    1.16 +namespace sandbox {
    1.17 +
    1.18 +  // Creates a window station. The name is generated by the OS. The security
    1.19 +  // descriptor is based on the security descriptor of the current window
    1.20 +  // station.
    1.21 +  ResultCode CreateAltWindowStation(HWINSTA* winsta);
    1.22 +
    1.23 +  // Creates a desktop. The name is a static string followed by the pid of the
    1.24 +  // current process. The security descriptor on the new desktop is based on the
    1.25 +  // security descriptor of the desktop associated with the current thread.
    1.26 +  // If a winsta is specified, the function will switch to it before creating
    1.27 +  // the desktop. If the functions fails the switch back to the current winsta,
    1.28 +  // the function will return SBOX_ERROR_FAILED_TO_SWITCH_BACK_WINSTATION.
    1.29 +  ResultCode CreateAltDesktop(HWINSTA winsta, HDESK* desktop);
    1.30 +
    1.31 +  // Returns the name of a desktop or a window station.
    1.32 +  std::wstring GetWindowObjectName(HANDLE handle);
    1.33 +
    1.34 +  // Returns the name of the desktop referenced by |desktop|. If a window
    1.35 +  // station is specified, the name is prepended with the window station name,
    1.36 +  // followed by a backslash. This name can be used as the lpDesktop parameter
    1.37 +  // to CreateProcess.
    1.38 +  std::wstring GetFullDesktopName(HWINSTA winsta, HDESK desktop);
    1.39 +
    1.40 +}  // namespace sandbox
    1.41 +
    1.42 +#endif  // SANDBOX_SRC_WINDOW_H_

mercurial