/* CVE-2022-44707 PoC code
 * Copyright 2023 Akamai Technologies, Inc.
 *
 * Licensed under the Apache License, Version 2.0 (the
 * "License"); you may not use this file except in
 * compliance with the License.  You may obtain a copy
 * of the License at
 *
 *   https://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in
 * writing, software distributed under the License is
 * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
 * CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing
 * permissions and limitations under the License.
 */

/* this ALWAYS GENERATED file contains the definitions for the interfaces */


 /* File created by MIDL compiler version 8.01.0626 */
/* at Tue Jan 19 05:14:07 2038
 */
/* Compiler settings for .\windowsshutdown.idl:
    Os, W1, Zp8, env=Win64 (32b run), target_arch=AMD64 8.01.0626 
    protocol : dce , ms_ext, c_ext
    error checks: allocation ref bounds_check enum stub_data 
    VC __declspec() decoration level: 
         __declspec(uuid()), __declspec(selectany), __declspec(novtable)
         DECLSPEC_UUID(), MIDL_INTERFACE()
*/
/* @@MIDL_FILE_HEADING(  ) */

#pragma warning( disable: 4049 )  /* more than 64k source lines */


/* verify that the <rpcndr.h> version is high enough to compile this file*/
#ifndef __REQUIRED_RPCNDR_H_VERSION__
#define __REQUIRED_RPCNDR_H_VERSION__ 450
#endif

#include "rpc.h"
#include "rpcndr.h"

#ifndef __RPCNDR_H_VERSION__
#error this stub requires an updated version of <rpcndr.h>
#endif /* __RPCNDR_H_VERSION__ */


#ifndef __windowsshutdown_h__
#define __windowsshutdown_h__

#if defined(_MSC_VER) && (_MSC_VER >= 1020)
#pragma once
#endif

#ifndef DECLSPEC_XFGVIRT
#if _CONTROL_FLOW_GUARD_XFG
#define DECLSPEC_XFGVIRT(base, func) __declspec(xfg_virtual(base, func))
#else
#define DECLSPEC_XFGVIRT(base, func)
#endif
#endif

/* Forward Declarations */ 

#ifdef __cplusplus
extern "C"{
#endif 


/* interface __MIDL_itf_windowsshutdown_0000_0000 */
/* [local] */ 

typedef struct _REG_UNICODE_STRING
    {
    unsigned short Length;
    unsigned short MaximumLength;
    /* [length_is][size_is] */ unsigned short *Buffer;
    } 	REG_UNICODE_STRING;

typedef struct _REG_UNICODE_STRING *PREG_UNICODE_STRING;



extern RPC_IF_HANDLE __MIDL_itf_windowsshutdown_0000_0000_v0_0_c_ifspec;
extern RPC_IF_HANDLE __MIDL_itf_windowsshutdown_0000_0000_v0_0_s_ifspec;

#ifndef __WindowsShutdown_INTERFACE_DEFINED__
#define __WindowsShutdown_INTERFACE_DEFINED__

/* interface WindowsShutdown */
/* [version][unique][uuid] */ 

unsigned long WsdrInitiateShutdown( 
    /* [in] */ handle_t Binding,
    /* [unique][in] */ PREG_UNICODE_STRING lpMessage,
    /* [in] */ unsigned long dwGracePeriod,
    /* [in] */ unsigned long dwShudownFlags,
    /* [in] */ unsigned long dwReason,
    /* [unique][in] */ PREG_UNICODE_STRING lpClientHint);

unsigned long WsdrAbortShutdown( 
    /* [in] */ handle_t Binding,
    /* [unique][in] */ PREG_UNICODE_STRING lpClientHint);

unsigned long WsdrCheckForHiberboot( 
    /* [in] */ handle_t IDL_handle,
    /* [out][in] */ boolean *hiberbootStatus,
    /* [in] */ boolean changeStatus);



extern RPC_IF_HANDLE WindowsShutdown_v1_0_c_ifspec;
extern RPC_IF_HANDLE WindowsShutdown_v1_0_s_ifspec;
#endif /* __WindowsShutdown_INTERFACE_DEFINED__ */

/* Additional Prototypes for ALL interfaces */

/* end of Additional Prototypes */

#ifdef __cplusplus
}
#endif

#endif


