MCPcopy Index your code
hub / github.com/rabbitstack/fibratus / QueryObjectName

Function QueryObjectName

pkg/handle/object.go:70–80  ·  view source on GitHub ↗

QueryObjectName returns the object name of the specified object.

(obj windows.Handle)

Source from the content-addressed store, hash-verified

68
69// QueryObjectName returns the object name of the specified object.
70func QueryObjectName(obj windows.Handle) (string, error) {
71 nameInfo, err := sys.QueryObject[sys.ObjectNameInformation](obj, sys.ObjectNameInformationClass)
72 if err != nil {
73 return "", fmt.Errorf("unable to query object name: %v", err)
74 }
75 length := nameInfo.ObjectName.Length
76 if length > 0 {
77 return nameInfo.ObjectName.String(), nil
78 }
79 return "", nil
80}
81
82// QueryName gets the name of the underlying handle reference and extra metadata if it is available.
83func QueryName(handle windows.Handle, typ string, withTimeout bool) (string, htypes.Meta, error) {

Callers 2

QueryNameFunction · 0.85
timeoutFnFunction · 0.85

Calls 2

QueryObjectFunction · 0.92
StringMethod · 0.65

Tested by

no test coverage detected