using System;
using System.Runtime.InteropServices;
namespace Vanara.PInvoke
{
public static partial class Shell32
{
///
/// Exposes a method that enumerates or initializes a namespace extension when it is invoked on a remote object. This interface is
/// used, for example, to initialize the remote printers virtual folder.
///
///
/// Implement IRemoteComputer when your namespace extension may be invoked on a remote computer.
///
/// You do not call this interface directly. IRemoteComputer is used by the operating system only when it has confirmed that
/// your application is aware of this interface.
///
///
// https://docs.microsoft.com/en-us/windows/win32/api/shobjidl_core/nn-shobjidl_core-iremotecomputer
[PInvokeData("shobjidl_core.h", MSDNShortId = "NN:shobjidl_core.IRemoteComputer")]
[ComImport, Guid("000214FE-0000-0000-C000-000000000046"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
public interface IRemoteComputer
{
///
/// Used by Windows Explorer or Windows Internet Explorer when it is initializing or enumerating a namespace extension invoked
/// on a remote computer.
///
///
/// Type: LPCWSTR
/// A pointer to a buffer containing the machine name of the remote computer.
///
///
/// Type: BOOL
///
/// A value that is set to TRUE if Windows Explorer is enumerating the namespace extension, or FALSE if it is
/// initializing it.
///
///
///
/// Type: HRESULT
/// Returns S_OK if successful, or standard OLE error values otherwise.
///
///
/// If failure is returned, the extension won't appear for the specified computer. Otherwise, the extension will appear and
/// target the remote computer.
///
// https://docs.microsoft.com/en-us/windows/win32/api/shobjidl_core/nf-shobjidl_core-iremotecomputer-initialize HRESULT
// Initialize( LPCWSTR pszMachine, BOOL bEnumerating );
[PreserveSig]
HRESULT Initialize([MarshalAs(UnmanagedType.LPWStr)] string pszMachine, [MarshalAs(UnmanagedType.Bool)] bool bEnumerating);
}
}
}