Blame include/ntapi/nt_string.h

dd89bb
#ifndef _NT_STRING_H_
dd89bb
#define _NT_STRING_H_
dd89bb
414ad3
#include "nt_abi.h"
dd89bb
#include "nt_object.h"
dd89bb
dd89bb
typedef void * __cdecl ntapi_memset(
dd89bb
	void *dest,
dd89bb
	int c,
dd89bb
	size_t count);
dd89bb
dd89bb
typedef int __cdecl ntapi_sprintf(
dd89bb
	char * buffer,
dd89bb
	const char * format,
dd89bb
	...);
dd89bb
3e65dd
typedef int __cdecl ntapi_snprintf(
3e65dd
	char * buffer,
3e65dd
	size_t size,
3e65dd
	const char * format,
3e65dd
	...);
3e65dd
0d6a53
typedef int __cdecl ntapi_vsprintf(
0d6a53
	char * buffer,
0d6a53
	const char * format,
0d6a53
	va_list ap);
0d6a53
0d6a53
typedef int __cdecl ntapi_vsnprintf(
0d6a53
	char * buffer,
0d6a53
	size_t size,
0d6a53
	const char * format,
0d6a53
	va_list ap);
0d6a53
dd89bb
dd89bb
typedef size_t __cdecl ntapi_strlen(const char * str);
dd89bb
dd89bb
dd89bb
typedef size_t __cdecl ntapi_wcslen(const wchar16_t * str);
dd89bb
dd89bb
dd89bb
typedef void ntapi_rtl_init_unicode_string(
dd89bb
    __out 	nt_unicode_string *	str_dest,
dd89bb
    __in	wchar16_t *		str_src);
dd89bb
dd89bb
dd89bb
/* yes, there exists a reason (but feel free to scold me nonetheless) */
dd89bb
typedef size_t __cdecl ntapi_tt_string_null_offset_multibyte(
dd89bb
	__in	const char *	str);
dd89bb
dd89bb
typedef size_t __cdecl ntapi_tt_string_null_offset_short(
dd89bb
	__in	const int16_t *	str);
dd89bb
dd89bb
typedef size_t __cdecl ntapi_tt_string_null_offset_dword(
dd89bb
	__in	const int32_t *	str);
dd89bb
dd89bb
typedef size_t __cdecl ntapi_tt_string_null_offset_qword(
dd89bb
	__in	const int64_t *	str);
dd89bb
dd89bb
typedef size_t __cdecl ntapi_tt_string_null_offset_ptrsize(
dd89bb
	__in	const intptr_t *str);
dd89bb
c30ed7
typedef int    __cdecl ntapi_tt_strcmp_multibyte(
c30ed7
	__in	const char *	a,
c30ed7
	__in	const char *	b);
c30ed7
060ead
typedef int    __cdecl ntapi_tt_strcmp_utf16(
060ead
	__in	const wchar16_t * a,
060ead
	__in	const wchar16_t * b);
060ead
964eed
typedef int    __cdecl ntapi_tt_strncmp_multibyte(
964eed
	__in	const char *	a,
964eed
	__in	const char *	b,
964eed
	__in	size_t		n);
964eed
a2ea1b
typedef int    __cdecl ntapi_tt_strncmp_utf16(
a2ea1b
	__in	const wchar16_t * a,
a2ea1b
	__in	const wchar16_t * b,
a2ea1b
	__in	size_t		  n);
a2ea1b
dd89bb
typedef void __cdecl		ntapi_tt_init_unicode_string_from_utf16(
dd89bb
	__out 	nt_unicode_string *	str_dest,
dd89bb
	__in	wchar16_t *		str_src);
dd89bb
dd89bb
dd89bb
typedef void * __cdecl		ntapi_tt_aligned_block_memset(
dd89bb
	__in	void *			block,
dd89bb
	__in	uintptr_t		val,
dd89bb
	__in	size_t			bytes);
dd89bb
dd89bb
typedef uintptr_t * __cdecl	ntapi_tt_aligned_block_memcpy(
dd89bb
	__in	uintptr_t *		dst,
dd89bb
	__in	const uintptr_t *	src,
dd89bb
	__in	size_t			bytes);
dd89bb
e29bce
typedef void * __cdecl		ntapi_tt_aligned_block_memlock(
e29bce
	__in	void *			block,
e29bce
	__in	size_t			bytes);
dd89bb
dd89bb
typedef wchar16_t * __cdecl	ntapi_tt_memcpy_utf16(
dd89bb
	__in	wchar16_t *		dst,
dd89bb
	__in	const wchar16_t *	src,
dd89bb
	__in	size_t			bytes);
dd89bb
dd89bb
dd89bb
typedef wchar16_t * __cdecl	ntapi_tt_aligned_memcpy_utf16(
dd89bb
	__in	uintptr_t *		dst,
dd89bb
	__in	const uintptr_t *	src,
dd89bb
	__in	size_t			bytes);
dd89bb
dd89bb
dd89bb
typedef void * __cdecl		ntapi_tt_generic_memset(
dd89bb
	__in	void *			dst,
dd89bb
	__in	uintptr_t		val,
dd89bb
	__in	size_t			bytes);
dd89bb
dd89bb
typedef void * __cdecl	ntapi_tt_generic_memcpy(
dd89bb
	__in	void *			dst,
dd89bb
	__in	const void *		src,
dd89bb
	__in	size_t			bytes);
dd89bb
dd89bb
typedef void __fastcall	ntapi_tt_uint16_to_hex_utf16(
b1f553
	__in	const uint16_t	key,
dd89bb
	__out	wchar16_t *	formatted_key);
dd89bb
dd89bb
dd89bb
typedef void __fastcall	ntapi_tt_uint32_to_hex_utf16(
b1f553
	__in	const uint32_t	key,
dd89bb
	__out	wchar16_t *	formatted_key);
dd89bb
dd89bb
dd89bb
typedef void __fastcall	ntapi_tt_uint64_to_hex_utf16(
b1f553
	__in	const uint64_t	key,
dd89bb
	__out	wchar16_t *	formatted_key);
dd89bb
dd89bb
dd89bb
typedef void __fastcall	ntapi_tt_uintptr_to_hex_utf16(
b1f553
	__in	const uintptr_t	key,
dd89bb
	__out	wchar16_t *	formatted_key);
dd89bb
dd89bb
dd89bb
typedef int32_t __fastcall ntapi_tt_hex_utf16_to_uint16(
b1f553
	__in	const wchar16_t	hex_key_utf16[4],
dd89bb
	__out	uint16_t *	key);
dd89bb
dd89bb
dd89bb
typedef int32_t __fastcall ntapi_tt_hex_utf16_to_uint32(
b1f553
	__in	const wchar16_t	hex_key_utf16[8],
dd89bb
	__out	uint32_t *	key);
dd89bb
dd89bb
dd89bb
typedef int32_t __fastcall ntapi_tt_hex_utf16_to_uint64(
b1f553
	__in	const wchar16_t	hex_key_utf16[16],
dd89bb
	__out	uint64_t *	key);
dd89bb
dd89bb
dd89bb
typedef int32_t __fastcall ntapi_tt_hex_utf16_to_uintptr(
b1f553
	__in	const wchar16_t	hex_key_utf16[],
dd89bb
	__out	uintptr_t *	key);
dd89bb
a41388
typedef int32_t __fastcall ntapi_tt_hex_utf8_to_uint16(
a41388
	__in	const unsigned char hex_key_utf16[4],
a41388
	__out	uint16_t *          key);
a41388
a41388
a41388
typedef int32_t __fastcall ntapi_tt_hex_utf8_to_uint32(
a41388
	__in	const unsigned char hex_key_utf16[8],
a41388
	__out	uint32_t *          key);
a41388
a41388
a41388
typedef int32_t __fastcall ntapi_tt_hex_utf8_to_uint64(
a41388
	__in	const unsigned char hex_key_utf16[16],
a41388
	__out	uint64_t *          key);
a41388
a41388
a41388
typedef int32_t __fastcall ntapi_tt_hex_utf8_to_uintptr(
a41388
	__in	const unsigned char hex_key_utf16[],
a41388
	__out	uintptr_t *         key);
dd89bb
dd89bb
typedef void __fastcall ntapi_tt_uint16_to_hex_utf8(
b1f553
	__in	const uint32_t	key,
dd89bb
	__out	unsigned char *	buffer);
dd89bb
dd89bb
dd89bb
typedef void __fastcall ntapi_tt_uint32_to_hex_utf8(
b1f553
	__in	const uint32_t	key,
dd89bb
	__out	unsigned char *	buffer);
dd89bb
dd89bb
dd89bb
typedef void __fastcall ntapi_tt_uint64_to_hex_utf8(
b1f553
	__in	const uint64_t	key,
dd89bb
	__out	unsigned char *	buffer);
dd89bb
dd89bb
dd89bb
typedef void __fastcall ntapi_tt_uintptr_to_hex_utf8(
b1f553
	__in	const uintptr_t	key,
dd89bb
	__out	unsigned char *	buffer);
dd89bb
aac1ec
aac1ec
typedef int32_t __stdcall	ntapi_tt_uintptr_to_dec_utf16(
aac1ec
	__in	uintptr_t	key,
aac1ec
	__out	wchar16_t *	wstrbuf,
aac1ec
	__in	size_t		buflen,
aac1ec
	__out	ssize_t *	length);
aac1ec
aac1ec
aac1ec
typedef int32_t __stdcall	ntapi_tt_uintptr_to_dec_utf8(
aac1ec
	__in	uintptr_t	key,
aac1ec
	__out	unsigned char *	strbuf,
aac1ec
	__in	size_t		buflen,
aac1ec
	__out	ssize_t *	length);
aac1ec
aac1ec
aac1ec
typedef int32_t __stdcall	ntapi_tt_uintptr_to_dec_null_utf16(
aac1ec
	__in	uintptr_t	key,
aac1ec
	__out	wchar16_t *	wstrbuf,
aac1ec
	__in	size_t		buflen,
aac1ec
	__out	ssize_t *	length);
aac1ec
aac1ec
aac1ec
typedef int32_t __stdcall	ntapi_tt_uintptr_to_dec_null_utf8(
aac1ec
	__in	uintptr_t	key,
aac1ec
	__out	unsigned char *	strbuf,
aac1ec
	__in	size_t		buflen,
aac1ec
	__out	ssize_t *	length);
aac1ec
23d954
typedef int32_t __stdcall	ntapi_tt_dec_utf16_to_uint16(
23d954
	__in	const wchar16_t *	wch_arg,
23d954
	__in	const wchar16_t *	wch_cap,
23d954
	__out	uint16_t *		key);
23d954
23d954
typedef int32_t __stdcall	ntapi_tt_dec_utf16_to_uint32(
23d954
	__in	const wchar16_t *	wch_arg,
23d954
	__in	const wchar16_t *	wch_cap,
23d954
	__out	uint32_t *		key);
23d954
23d954
typedef int32_t __stdcall	ntapi_tt_dec_utf16_to_uint64(
23d954
	__in	const wchar16_t *	wch_arg,
23d954
	__in	const wchar16_t *	wch_cap,
23d954
	__out	uint64_t *		key);
23d954
23d954
typedef int32_t __stdcall	ntapi_tt_dec_utf16_to_uintptr(
23d954
	__in	const wchar16_t *	wch_arg,
23d954
	__in	const wchar16_t *	wch_cap,
23d954
	__out	uintptr_t *		key);
23d954
dd89bb
#endif