628393acb2b68337836dd6c2a69ff3b331fc84dbvboxsync/** @file
628393acb2b68337836dd6c2a69ff3b331fc84dbvboxsync * IPRT - Generic Handle Operations.
628393acb2b68337836dd6c2a69ff3b331fc84dbvboxsync */
628393acb2b68337836dd6c2a69ff3b331fc84dbvboxsync
628393acb2b68337836dd6c2a69ff3b331fc84dbvboxsync/*
e64031e20c39650a7bc902a3e1aba613b9415deevboxsync * Copyright (C) 2010 Oracle Corporation
628393acb2b68337836dd6c2a69ff3b331fc84dbvboxsync *
628393acb2b68337836dd6c2a69ff3b331fc84dbvboxsync * This file is part of VirtualBox Open Source Edition (OSE), as
628393acb2b68337836dd6c2a69ff3b331fc84dbvboxsync * available from http://www.virtualbox.org. This file is free software;
628393acb2b68337836dd6c2a69ff3b331fc84dbvboxsync * you can redistribute it and/or modify it under the terms of the GNU
628393acb2b68337836dd6c2a69ff3b331fc84dbvboxsync * General Public License (GPL) as published by the Free Software
628393acb2b68337836dd6c2a69ff3b331fc84dbvboxsync * Foundation, in version 2 as it comes in the "COPYING" file of the
628393acb2b68337836dd6c2a69ff3b331fc84dbvboxsync * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
628393acb2b68337836dd6c2a69ff3b331fc84dbvboxsync * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
628393acb2b68337836dd6c2a69ff3b331fc84dbvboxsync *
628393acb2b68337836dd6c2a69ff3b331fc84dbvboxsync * The contents of this file may alternatively be used under the terms
628393acb2b68337836dd6c2a69ff3b331fc84dbvboxsync * of the Common Development and Distribution License Version 1.0
628393acb2b68337836dd6c2a69ff3b331fc84dbvboxsync * (CDDL) only, as it comes in the "COPYING.CDDL" file of the
628393acb2b68337836dd6c2a69ff3b331fc84dbvboxsync * VirtualBox OSE distribution, in which case the provisions of the
628393acb2b68337836dd6c2a69ff3b331fc84dbvboxsync * CDDL are applicable instead of those of the GPL.
628393acb2b68337836dd6c2a69ff3b331fc84dbvboxsync *
628393acb2b68337836dd6c2a69ff3b331fc84dbvboxsync * You may elect to license modified versions of this file under the
628393acb2b68337836dd6c2a69ff3b331fc84dbvboxsync * terms and conditions of either the GPL or the CDDL or both.
628393acb2b68337836dd6c2a69ff3b331fc84dbvboxsync */
628393acb2b68337836dd6c2a69ff3b331fc84dbvboxsync
628393acb2b68337836dd6c2a69ff3b331fc84dbvboxsync#ifndef ___iprt_handle_h
628393acb2b68337836dd6c2a69ff3b331fc84dbvboxsync#define ___iprt_handle_h
628393acb2b68337836dd6c2a69ff3b331fc84dbvboxsync
628393acb2b68337836dd6c2a69ff3b331fc84dbvboxsync#include <iprt/cdefs.h>
628393acb2b68337836dd6c2a69ff3b331fc84dbvboxsync#include <iprt/types.h>
628393acb2b68337836dd6c2a69ff3b331fc84dbvboxsync
628393acb2b68337836dd6c2a69ff3b331fc84dbvboxsyncRT_C_DECLS_BEGIN
628393acb2b68337836dd6c2a69ff3b331fc84dbvboxsync
628393acb2b68337836dd6c2a69ff3b331fc84dbvboxsync/** @defgroup grp_rt_handle RTHandle - Generic Handle Operations
628393acb2b68337836dd6c2a69ff3b331fc84dbvboxsync * @ingroup grp_rt
628393acb2b68337836dd6c2a69ff3b331fc84dbvboxsync * @{
628393acb2b68337836dd6c2a69ff3b331fc84dbvboxsync */
628393acb2b68337836dd6c2a69ff3b331fc84dbvboxsync
628393acb2b68337836dd6c2a69ff3b331fc84dbvboxsync/**
628393acb2b68337836dd6c2a69ff3b331fc84dbvboxsync * Closes or destroy a generic handle.
628393acb2b68337836dd6c2a69ff3b331fc84dbvboxsync *
628393acb2b68337836dd6c2a69ff3b331fc84dbvboxsync * @returns IPRT status code.
628393acb2b68337836dd6c2a69ff3b331fc84dbvboxsync * @param ph Pointer to the generic handle. The structure handle
628393acb2b68337836dd6c2a69ff3b331fc84dbvboxsync * will be set to NIL. A NULL pointer or a NIL handle
628393acb2b68337836dd6c2a69ff3b331fc84dbvboxsync * will be quietly ignore (VINF_SUCCESS).
628393acb2b68337836dd6c2a69ff3b331fc84dbvboxsync */
628393acb2b68337836dd6c2a69ff3b331fc84dbvboxsyncRTDECL(int) RTHandleClose(PRTHANDLE ph);
628393acb2b68337836dd6c2a69ff3b331fc84dbvboxsync
4d3f12a2094df73f5e04b71d3b7623aa0130285cvboxsync/**
4d3f12a2094df73f5e04b71d3b7623aa0130285cvboxsync * Gets one of the standard handles.
4d3f12a2094df73f5e04b71d3b7623aa0130285cvboxsync *
4d3f12a2094df73f5e04b71d3b7623aa0130285cvboxsync * @returns IPRT status code.
4d3f12a2094df73f5e04b71d3b7623aa0130285cvboxsync * @param enmStdHandle The standard handle.
4d3f12a2094df73f5e04b71d3b7623aa0130285cvboxsync * @param ph Pointer to the generic handle. This will contain
4d3f12a2094df73f5e04b71d3b7623aa0130285cvboxsync * the most appropriate IPRT handle on success.
4d3f12a2094df73f5e04b71d3b7623aa0130285cvboxsync */
4d3f12a2094df73f5e04b71d3b7623aa0130285cvboxsyncRTDECL(int) RTHandleGetStandard(RTHANDLESTD enmStdHandle, PRTHANDLE ph);
4d3f12a2094df73f5e04b71d3b7623aa0130285cvboxsync
628393acb2b68337836dd6c2a69ff3b331fc84dbvboxsync/** @} */
628393acb2b68337836dd6c2a69ff3b331fc84dbvboxsync
628393acb2b68337836dd6c2a69ff3b331fc84dbvboxsyncRT_C_DECLS_END
628393acb2b68337836dd6c2a69ff3b331fc84dbvboxsync
628393acb2b68337836dd6c2a69ff3b331fc84dbvboxsync#endif
628393acb2b68337836dd6c2a69ff3b331fc84dbvboxsync