From 8bb7ed968db64e9b12a6447e2eec3586ef9e935c Mon Sep 17 00:00:00 2001 From: Dirk Date: Tue, 10 Jun 2014 14:19:40 +0200 Subject: Windows system name changer during bootup. --- windows/bootpgm/win32/account.cpp | 60 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 windows/bootpgm/win32/account.cpp (limited to 'windows/bootpgm/win32/account.cpp') diff --git a/windows/bootpgm/win32/account.cpp b/windows/bootpgm/win32/account.cpp new file mode 100644 index 00000000..24a3c32e --- /dev/null +++ b/windows/bootpgm/win32/account.cpp @@ -0,0 +1,60 @@ +#include "stdafx.h" + +#include "account.h" + +void *get_entry(char *data,unsigned int cEntries,unsigned int index,unsigned int *length) +{ + data_entry *entries = reinterpret_cast(data); + if (length != 0) + *length = entries[index].length; + + return data + sizeof(data_entry) * cEntries + entries[index].position; +} + +void *get_V_entry(char *data,unsigned int index, unsigned int *length) +{ + return get_entry(data,17,index,length); +} + +entry *read_entries(char *data,unsigned int cEntries) +{ + data_entry *entries = reinterpret_cast(data); + entry *fixed = new entry[cEntries]; + for(unsigned int i=0;i(buffer); + + int pos = 0; + + for(unsigned int i=0;i