#include "xml2sdb.h"
#include "sdbpapi.h"
#include "tinyxml2.h"
#include <time.h>
#include <algorithm>
Go to the source code of this file.
|
| C_ASSERT (sizeof(GUID)==16) |
|
| C_ASSERT (sizeof(ULONG)==4) |
|
| C_ASSERT (sizeof(LARGE_INTEGER)==8) |
|
| C_ASSERT (sizeof(WCHAR)==2) |
|
| C_ASSERT (sizeof(wchar_t)==2) |
|
| C_ASSERT (sizeof(TAG)==2) |
|
| C_ASSERT (sizeof(TAGID)==4) |
|
VOID NTAPI | RtlSecondsSince1970ToTime (IN ULONG SecondsSince1970, OUT PLARGE_INTEGER Time) |
|
bool | IsEmptyGuid (const GUID &g) |
|
void | RandomGuid (GUID &g) |
|
std::string | ToString (XMLHandle node) |
|
std::string | ToNodeName (XMLHandle node) |
|
std::string | ReadStringNode (XMLHandle dbNode, const char *nodeName) |
|
DWORD | ReadQWordNode (XMLHandle dbNode, const char *nodeName) |
|
DWORD | ReadDWordNode (XMLHandle dbNode, const char *nodeName) |
|
unsigned char | char2byte (char hexChar, bool *success=NULL) |
|
static bool | StringToGuid (const std::string &str, GUID &guid) |
|
bool | ReadGuidNode (XMLHandle dbNode, const char *nodeName, GUID &guid) |
|
bool | ReadBinaryNode (XMLHandle dbNode, const char *nodeName, std::vector< BYTE > &data) |
|
template<typename T > |
void | ReadGeneric (XMLHandle dbNode, std::list< T > &result, const char *nodeName) |
|
template<typename T > |
bool | WriteGeneric (PDB pdb, std::list< T > &data, Database &db) |
|
static void | InsertTagid (const sdbstring &name, TAGID tagid, std::map< sdbstring, TAGID > &lookup, const char *type) |
|
static TAGID | FindTagid (const sdbstring &name, const std::map< sdbstring, TAGID > &lookup) |
|
bool | xml_2_db (const char *xml, const WCHAR *sdb) |
|
◆ C_ASSERT
◆ REG_DWORD
◆ REG_QWORD
◆ REG_SZ
◆ C_ASSERT() [1/7]
◆ C_ASSERT() [2/7]
◆ C_ASSERT() [3/7]
◆ C_ASSERT() [4/7]
◆ C_ASSERT() [5/7]
◆ C_ASSERT() [6/7]
◆ C_ASSERT() [7/7]
◆ char2byte()
◆ FindTagid()
◆ InsertTagid()
◆ IsEmptyGuid()
◆ RandomGuid()
◆ ReadBinaryNode()
Definition at line 222 of file xml2sdb.cpp.
223{
226
229 return false;
230
233 {
235 }
236 return true;
237}
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
GLuint GLsizei GLsizei * length
unsigned char char2byte(char hexChar, bool *success=NULL)
std::string ReadStringNode(XMLHandle dbNode, const char *nodeName)
◆ ReadDWordNode()
◆ ReadGeneric()
◆ ReadGuidNode()
◆ ReadQWordNode()
◆ ReadStringNode()
Definition at line 79 of file xml2sdb.cpp.
80{
83 {
84 const char* rawVal =
elem->Attribute(nodeName);
85 if (rawVal)
86 return std::string(rawVal);
87 }
89}
XMLElement * ToElement()
Safe cast to XMLElement. This can return null.
std::string ToString(XMLHandle node)
Referenced by InExclude::fromXml(), ShimRef::fromXml(), FlagRef::fromXml(), Shim::fromXml(), Flag::fromXml(), Data::fromXml(), Layer::fromXml(), MatchingFile::fromXml(), Exe::fromXml(), Database::fromXml(), ReadBinaryNode(), ReadGuidNode(), and ReadQWordNode().
◆ RtlSecondsSince1970ToTime()
Definition at line 406 of file time.c.
408{
410}
static PLARGE_INTEGER Time
◆ StringToGuid()
static bool StringToGuid |
( |
const std::string & |
str, |
|
|
GUID & |
guid |
|
) |
| |
|
static |
Definition at line 123 of file xml2sdb.cpp.
124{
125 const char *lpszGUID =
str.c_str();
128 bool expectBrace = true;
130 {
132 {
133 case 0:
134 if (*lpszGUID != '{')
135 {
137 expectBrace = false;
138 continue;
139 }
140 break;
141
142 case 9:
143 case 14:
144 case 19:
145 case 24:
146 if (*lpszGUID != '-')
147 return false;
148 break;
149
150 case 37:
151 return expectBrace == (*lpszGUID == '}');
152
153 default:
154 {
155 CHAR ch = *lpszGUID, ch2 = lpszGUID[1];
157 bool converted = true;
158
160 if (!converted)
161 return false;
162
164 {
165#ifndef WORDS_BIGENDIAN
166
167
168
169 case 1:
171 break;
172 case 3:
174 break;
175 case 5:
177 break;
178 case 7:
180 lpOut += 4;
181 break;
182
183 case 10:
184 case 15:
186 break;
187 case 12:
188 case 17:
190 lpOut += 2;
191 break;
192#endif
193
194 default:
196 lpOut++;
197 break;
198 }
199
200 lpszGUID++;
202 }
203 }
204
205 lpszGUID++;
207 }
208 return false;
209}
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Referenced by ReadGuidNode().
◆ ToNodeName()
◆ ToString()
◆ WriteGeneric()
◆ xml_2_db()
Definition at line 765 of file xml2sdb.cpp.
766{
769 {
771 }
772 return false;
773}
bool fromXml(const char *fileName)
Referenced by run_one().
◆ GUID_NULL
◆ szCompilerVersion