Sha256: 17fb7313cdac352f947934cd1c113a96116c0df932c06c8b4aaa92b85dbb10b8

Contents?: true

Size: 791 Bytes

Versions: 16

Compression:

Stored size: 791 Bytes

Contents

/**
 * @file
 * Declares the scoped HANDLE resource for managing Windows HANDLEs.
 */
#pragma once

#include <leatherman/util/scoped_resource.hpp>
typedef void *HANDLE;

namespace leatherman { namespace util { namespace windows {
    /**
     * Represents a scoped HANDLE for Windows.
     * Automatically closes the HANDLE when it goes out of scope.
    */
    struct scoped_handle : scoped_resource<HANDLE>
    {
        /**
         * Constructs a scoped_handle.
         * @param handle The HANDLE to close when destroyed.
         */
        explicit scoped_handle(HANDLE handle);

        /**
         * Constructs a closed scoped_handle.
         */
        scoped_handle();

     private:
        static void close(HANDLE handle);
    };

}}}  // namespace leatherman::util::windows

Version data entries

16 entries across 16 versions & 2 rubygems

Version Path
facter-3.12.2.cfacter.20181217 ext/facter/leatherman/util/inc/leatherman/util/windows/scoped_handle.hpp
facter-3.12.1.cfacter.20181031 ext/facter/leatherman/util/inc/leatherman/util/windows/scoped_handle.hpp
facter-3.11.6.cfacter.20181031 ext/facter/leatherman/util/inc/leatherman/util/windows/scoped_handle.hpp
facter-3.12.1.cfacter.20181023 ext/facter/leatherman/util/inc/leatherman/util/windows/scoped_handle.hpp
facter-3.11.5.cfacter.20181022 ext/facter/leatherman/util/inc/leatherman/util/windows/scoped_handle.hpp
facter-3.12.0.cfacter.20181004 ext/facter/leatherman/util/inc/leatherman/util/windows/scoped_handle.hpp
facter-3.12.0.cfacter.20181001 ext/facter/leatherman/util/inc/leatherman/util/windows/scoped_handle.hpp
facter-3.12.0.cfacter.20180918 ext/facter/leatherman/util/inc/leatherman/util/windows/scoped_handle.hpp
facter-3.11.4.cfacter.20180821 ext/facter/leatherman/util/inc/leatherman/util/windows/scoped_handle.hpp
facter-3.11.3.cfacter.20180716 ext/facter/leatherman/util/inc/leatherman/util/windows/scoped_handle.hpp
facter-3.11.2.cfacter.20180612 ext/facter/leatherman/util/inc/leatherman/util/windows/scoped_handle.hpp
facter-3.9.6.cfacter.20180612 ext/facter/leatherman/util/inc/leatherman/util/windows/scoped_handle.hpp
facter-3.11.2.cfacter.20180606 ext/facter/leatherman/util/inc/leatherman/util/windows/scoped_handle.hpp
facter-3.9.6.cfacter.20180606 ext/facter/leatherman/util/inc/leatherman/util/windows/scoped_handle.hpp
facter-3.11.0.cfacter.20180319 ext/facter/leatherman/util/inc/leatherman/util/windows/scoped_handle.hpp
cfacter-3.11.0.rc.20180314 ext/facter/leatherman/util/inc/leatherman/util/windows/scoped_handle.hpp