Blame src/vfd/ntapi_vfd_helper.c

dd89bb
/********************************************************/
dd89bb
/*  ntapi: Native API core library                      */
64e606
/*  Copyright (C) 2013--2021  SysDeer Technologies, LLC */
dd89bb
/*  Released under GPLv2 and GPLv3; see COPYING.NTAPI.  */
dd89bb
/********************************************************/
dd89bb
dd89bb
#include <psxtypes/psxtypes.h>
dd89bb
#include <ntapi/nt_status.h>
dd89bb
#include <ntapi/nt_object.h>
dd89bb
#include <ntapi/nt_vfd.h>
dd89bb
#include "ntapi_impl.h"
dd89bb
dd89bb
void __stdcall __ntapi_vfd_dev_name_init(
dd89bb
	__out	nt_vfd_dev_name *	devname,
dd89bb
	__in	const nt_guid *		guid)
dd89bb
{
dd89bb
	uint32_t * prefix = (uint32_t *)devname->prefix;
dd89bb
dd89bb
	/* compiler-independent */
dd89bb
	prefix[0] = 0x44005C;
dd89bb
	prefix[1] = 0x760065;
dd89bb
	prefix[2] = 0x630069;
dd89bb
	prefix[3] = 0x5C0065;
dd89bb
701eb2
	__ntapi->tt_guid_to_string_utf16(
dd89bb
		guid,
dd89bb
		&devname->guid);
dd89bb
dd89bb
	devname->name.strlen = sizeof(devname->prefix) + sizeof(devname->guid);
dd89bb
	devname->name.maxlen = 0;
dd89bb
	devname->name.buffer = (uint16_t *)&devname->prefix;
dd89bb
dd89bb
	return;
dd89bb
}