summaryrefslogtreecommitdiffhomepage
path: root/src/vfd
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2015-07-27 04:01:18 -0400
committermidipix <writeonce@midipix.org>2015-07-27 04:01:18 -0400
commitdd89bb8ad4fe184a34b5dbdda237e640fc82121b (patch)
tree5e80d2da35f5892f92be29f57982b2708e6bd99b /src/vfd
parentdcdadc2702712fa750ed255ed1dfa354522797a0 (diff)
downloadntapi-dd89bb8ad4fe184a34b5dbdda237e640fc82121b.tar.bz2
ntapi-dd89bb8ad4fe184a34b5dbdda237e640fc82121b.tar.xz
entered advanced internal development stage.
Diffstat (limited to 'src/vfd')
-rw-r--r--src/vfd/ntapi_vfd_helper.c34
1 files changed, 34 insertions, 0 deletions
diff --git a/src/vfd/ntapi_vfd_helper.c b/src/vfd/ntapi_vfd_helper.c
new file mode 100644
index 0000000..054a388
--- /dev/null
+++ b/src/vfd/ntapi_vfd_helper.c
@@ -0,0 +1,34 @@
+/********************************************************/
+/* ntapi: Native API core library */
+/* Copyright (C) 2013,2014,2015 Z. Gilboa */
+/* Released under GPLv2 and GPLv3; see COPYING.NTAPI. */
+/********************************************************/
+
+#include <psxtypes/psxtypes.h>
+#include <ntapi/nt_status.h>
+#include <ntapi/nt_object.h>
+#include <ntapi/nt_vfd.h>
+#include "ntapi_impl.h"
+
+void __stdcall __ntapi_vfd_dev_name_init(
+ __out nt_vfd_dev_name * devname,
+ __in const nt_guid * guid)
+{
+ uint32_t * prefix = (uint32_t *)devname->prefix;
+
+ /* compiler-independent */
+ prefix[0] = 0x44005C;
+ prefix[1] = 0x760065;
+ prefix[2] = 0x630069;
+ prefix[3] = 0x5C0065;
+
+ __ntapi->tt_guid_to_utf16_string(
+ guid,
+ &devname->guid);
+
+ devname->name.strlen = sizeof(devname->prefix) + sizeof(devname->guid);
+ devname->name.maxlen = 0;
+ devname->name.buffer = (uint16_t *)&devname->prefix;
+
+ return;
+}