MCPcopy Create free account
hub / github.com/qilingframework/qiling / make_unicode_string

Function make_unicode_string

qiling/os/windows/structs.py:121–135  ·  view source on GitHub ↗

Generate a UNICODE_STRING structure class.

(archbits: int)

Source from the content-addressed store, hash-verified

119# https://learn.microsoft.com/en-us/windows/win32/api/ntdef/ns-ntdef-_unicode_string
120@lru_cache(maxsize=2)
121def make_unicode_string(archbits: int):
122 """Generate a UNICODE_STRING structure class.
123 """
124
125 native_type = struct.get_native_type(archbits)
126 Struct = struct.get_aligned_struct(archbits)
127
128 class UNICODE_STRING(Struct):
129 _fields_ = (
130 ('Length', ctypes.c_uint16),
131 ('MaximumLength', ctypes.c_uint16),
132 ('Buffer', native_type)
133 )
134
135 return UNICODE_STRING
136
137
138# https://learn.microsoft.com/en-us/windows/win32/api/ntdef/ns-ntdef-string

Callers 6

__replMethod · 0.90
read_punicode_stringFunction · 0.85
make_driver_objectFunction · 0.85
make_object_type_infoFunction · 0.85
init_registry_pathMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected