winreg

package
v1.0.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 13, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// Syntax UUID
	WinregSyntaxUUID = &uuid.UUID{TimeLow: 0x338cd001, TimeMid: 0x2244, TimeHiAndVersion: 0x31f1, ClockSeqHiAndReserved: 0xaa, ClockSeqLow: 0xaa, Node: [6]uint8{0x90, 0x0, 0x38, 0x0, 0x10, 0x3}}
	// Syntax ID
	WinregSyntaxV1_0 = &dcerpc.SyntaxID{IfUUID: WinregSyntaxUUID, IfVersionMajor: 1, IfVersionMinor: 0}
)
View Source
var (
	// import guard
	GoPackage = "rsp"
)

Functions

func NewWinregServerHandle

func NewWinregServerHandle(o WinregServer) dcerpc.ServerHandle

func RegisterWinregServer

func RegisterWinregServer(conn dcerpc.Conn, o WinregServer, opts ...dcerpc.Option)

func WinregServerHandle

func WinregServerHandle(ctx context.Context, o WinregServer, opNum int, r ndr.Reader) (dcerpc.Operation, error)

Types

type BaseAbortSystemShutdownRequest

type BaseAbortSystemShutdownRequest struct {
	// ServerName: The custom RPC binding handle (PREGISTRY_SERVER_NAME (section 2.2.1)).
	ServerName string `idl:"name:ServerName;pointer:unique" json:"server_name"`
}

BaseAbortSystemShutdownRequest structure represents the BaseAbortSystemShutdown operation request

func (*BaseAbortSystemShutdownRequest) MarshalNDR

func (*BaseAbortSystemShutdownRequest) UnmarshalNDR

type BaseAbortSystemShutdownResponse

type BaseAbortSystemShutdownResponse struct {
	// Return: The BaseAbortSystemShutdown return value.
	Return uint32 `idl:"name:Return" json:"return"`
}

BaseAbortSystemShutdownResponse structure represents the BaseAbortSystemShutdown operation response

func (*BaseAbortSystemShutdownResponse) MarshalNDR

func (*BaseAbortSystemShutdownResponse) UnmarshalNDR

type BaseInitiateSystemShutdownExRequest

type BaseInitiateSystemShutdownExRequest struct {
	// ServerName: The custom RPC binding handle (PREGISTRY_SERVER_NAME (section 2.2.1)).
	ServerName string `idl:"name:ServerName;pointer:unique" json:"server_name"`
	// lpMessage: Null-terminated Unicode string that contains the message to display during
	// the shutdown waiting period. If this parameter is NULL, no message MUST be displayed.
	Message *rsp.UnicodeString `idl:"name:lpMessage;pointer:unique" json:"message"`
	// dwTimeout: Number of seconds to wait before shutting down.
	Timeout uint32 `idl:"name:dwTimeout" json:"timeout"`
	// bForceAppsClosed: If TRUE, all applications SHOULD be terminated unconditionally.
	ForceAppsClosed uint8 `idl:"name:bForceAppsClosed" json:"force_apps_closed"`
	// bRebootAfterShutdown: If TRUE, the system SHOULD shutdown and reboot. If FALSE, the
	// system SHOULD only shut down.
	RebootAfterShutdown uint8 `idl:"name:bRebootAfterShutdown" json:"reboot_after_shutdown"`
	// dwReason: Reason for initiating the shutdown (section 2.3). The dwReason SHOULD be
	// used for log entries for the shutdown event.
	Reason uint32 `idl:"name:dwReason" json:"reason"`
}

BaseInitiateSystemShutdownExRequest structure represents the BaseInitiateSystemShutdownEx operation request

func (*BaseInitiateSystemShutdownExRequest) MarshalNDR

func (*BaseInitiateSystemShutdownExRequest) UnmarshalNDR

type BaseInitiateSystemShutdownExResponse

type BaseInitiateSystemShutdownExResponse struct {
	// Return: The BaseInitiateSystemShutdownEx return value.
	Return uint32 `idl:"name:Return" json:"return"`
}

BaseInitiateSystemShutdownExResponse structure represents the BaseInitiateSystemShutdownEx operation response

func (*BaseInitiateSystemShutdownExResponse) MarshalNDR

func (*BaseInitiateSystemShutdownExResponse) UnmarshalNDR

type BaseInitiateSystemShutdownRequest

type BaseInitiateSystemShutdownRequest struct {
	// ServerName: The custom RPC binding handle (PREGISTRY_SERVER_NAME (section 2.2.1)).
	ServerName string `idl:"name:ServerName;pointer:unique" json:"server_name"`
	// lpMessage: Null-terminated Unicode string that contains the message to display during
	// the shutdown waiting period. If this parameter is NULL, no message MUST be displayed.
	Message *rsp.UnicodeString `idl:"name:lpMessage;pointer:unique" json:"message"`
	// dwTimeout: Number of seconds to wait before shutting down.
	Timeout uint32 `idl:"name:dwTimeout" json:"timeout"`
	// bForceAppsClosed: If TRUE, all applications SHOULD be terminated unconditionally.
	ForceAppsClosed uint8 `idl:"name:bForceAppsClosed" json:"force_apps_closed"`
	// bRebootAfterShutdown: If TRUE, the system SHOULD shut down and reboot. If FALSE,
	// the system SHOULD only shut down.
	RebootAfterShutdown uint8 `idl:"name:bRebootAfterShutdown" json:"reboot_after_shutdown"`
}

BaseInitiateSystemShutdownRequest structure represents the BaseInitiateSystemShutdown operation request

func (*BaseInitiateSystemShutdownRequest) MarshalNDR

func (*BaseInitiateSystemShutdownRequest) UnmarshalNDR

type BaseInitiateSystemShutdownResponse

type BaseInitiateSystemShutdownResponse struct {
	// Return: The BaseInitiateSystemShutdown return value.
	Return uint32 `idl:"name:Return" json:"return"`
}

BaseInitiateSystemShutdownResponse structure represents the BaseInitiateSystemShutdown operation response

func (*BaseInitiateSystemShutdownResponse) MarshalNDR

func (*BaseInitiateSystemShutdownResponse) UnmarshalNDR

type WinregClient

type WinregClient interface {

	// The BaseInitiateSystemShutdown method is used to initiate the shutdown of the remote
	// computer.<4>
	//
	// Return Values: The method returns ERROR_SUCCESS (0x00000000) on success; otherwise,
	// it returns a nonzero error code.
	BaseInitiateSystemShutdown(context.Context, *BaseInitiateSystemShutdownRequest, ...dcerpc.CallOption) (*BaseInitiateSystemShutdownResponse, error)

	// The BaseAbortSystemShutdown method is used to terminate the shutdown of the remote
	// computer within the waiting period.<5>
	//
	// Return Values: The method returns ERROR_SUCCESS (0x00000000) on success; otherwise,
	// it returns a nonzero error code.
	BaseAbortSystemShutdown(context.Context, *BaseAbortSystemShutdownRequest, ...dcerpc.CallOption) (*BaseAbortSystemShutdownResponse, error)

	// The BaseInitiateSystemShutdownEx method is used to initiate the shutdown of the remote
	// computer with the reason for initiating the shutdown given as a parameter to the
	// call.<6>
	//
	// Return Values: The method returns ERROR_SUCCESS (0x00000000) on success; otherwise,
	// it returns a nonzero error code.
	BaseInitiateSystemShutdownEx(context.Context, *BaseInitiateSystemShutdownExRequest, ...dcerpc.CallOption) (*BaseInitiateSystemShutdownExResponse, error)

	// AlterContext alters the client context.
	AlterContext(context.Context, ...dcerpc.Option) error
}

winreg interface.

func NewWinregClient

func NewWinregClient(ctx context.Context, cc dcerpc.Conn, opts ...dcerpc.Option) (WinregClient, error)

type WinregServer

type WinregServer interface {

	// The BaseInitiateSystemShutdown method is used to initiate the shutdown of the remote
	// computer.<4>
	//
	// Return Values: The method returns ERROR_SUCCESS (0x00000000) on success; otherwise,
	// it returns a nonzero error code.
	BaseInitiateSystemShutdown(context.Context, *BaseInitiateSystemShutdownRequest) (*BaseInitiateSystemShutdownResponse, error)

	// The BaseAbortSystemShutdown method is used to terminate the shutdown of the remote
	// computer within the waiting period.<5>
	//
	// Return Values: The method returns ERROR_SUCCESS (0x00000000) on success; otherwise,
	// it returns a nonzero error code.
	BaseAbortSystemShutdown(context.Context, *BaseAbortSystemShutdownRequest) (*BaseAbortSystemShutdownResponse, error)

	// The BaseInitiateSystemShutdownEx method is used to initiate the shutdown of the remote
	// computer with the reason for initiating the shutdown given as a parameter to the
	// call.<6>
	//
	// Return Values: The method returns ERROR_SUCCESS (0x00000000) on success; otherwise,
	// it returns a nonzero error code.
	BaseInitiateSystemShutdownEx(context.Context, *BaseInitiateSystemShutdownExRequest) (*BaseInitiateSystemShutdownExResponse, error)
}

winreg server interface.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL