Go to the source code of this file.
◆ DBGPRINT_BUFSIZE
◆ AsciiToUnicode() [1/2]
wstring AsciiToUnicode |
( |
const char * |
AsciiString | ) |
|
Converts an ASCII string to a Unicode one.
- Parameters
-
AsciiString | Constant pointer to a char array containing the ASCII string |
- Returns
- The Unicode string as std::wstring
Definition at line 220 of file tools.cpp.
224 wstring ReturnString;
_In_ ULONG _In_ ULONG _In_ ULONG Length
WDF_EXTERN_C_START typedef _Must_inspect_result_ _In_opt_ PCUNICODE_STRING UnicodeString
#define MultiByteToWideChar
Referenced by AddPrinterA(), AddPrintProcessorA(), AsciiToUnicode(), DeleteFormA(), DeletePrinterDriverExA(), DeletePrintProcessorA(), DeletePrintProvidorA(), EnumPrinterDriversA(), CWineTest::GetNextTestInfo(), ResetPrinterA(), SetJobA(), SetPrinterA(), and StartDocDlgA().
◆ AsciiToUnicode() [2/2]
Converts an ASCII string to a Unicode one.
- Parameters
-
AsciiString | Pointer to a std::string containing the ASCII string |
- Returns
- The Unicode string as std::wstring
Definition at line 246 of file tools.cpp.
◆ EscapeString() [1/2]
Escapes a string according to RFC 1738. Required for passing parameters to the web service.
- Parameters
-
Input | Constant pointer to a char array, which contains the input buffer to escape. |
- Returns
- The escaped string as std::string.
Definition at line 24 of file tools.cpp.
26 string ReturnedString;
30 if(
strchr(
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_.~", *
Input))
33 ReturnedString += *
Input;
38 ReturnedString +=
'%';
45 return ReturnedString;
char * strchr(const char *String, int ch)
Referenced by EscapeString(), CConfiguration::GetConfigurationFromFile(), and CWebService::Submit().
◆ EscapeString() [2/2]
Escapes a string according to RFC 1738. Required for passing parameters to the web service.
- Parameters
-
Input | Pointer to a std::string, which contains the input buffer to escape. |
- Returns
- The escaped string as std::string.
Definition at line 59 of file tools.cpp.
◆ GetINIValue()
Gets a value from a specified INI file and returns it converted to ASCII.
- Parameters
-
AppName | Constant pointer to a WCHAR array with the INI section to look in (lpAppName parameter passed to GetPrivateProfileStringW) |
KeyName | Constant pointer to a WCHAR array containing the key to look for in the specified section (lpKeyName parameter passed to GetPrivateProfileStringW) |
FileName | Constant pointer to a WCHAR array containing the path to the INI file |
- Returns
- Returns the data of the value as std::string or an empty string if no data could be retrieved.
Definition at line 187 of file tools.cpp.
191 string ReturnedString;
200 AsciiBuffer =
new char[
Length + 1];
203 ReturnedString = AsciiBuffer;
204 delete[] AsciiBuffer;
207 return ReturnedString;
INT WINAPI GetPrivateProfileStringW(LPCWSTR section, LPCWSTR entry, LPCWSTR def_val, LPWSTR buffer, UINT len, LPCWSTR filename)
_In_ ULONG _In_ ULONG _In_ ULONG Length
#define WideCharToMultiByte
static CHAR AppName[MAX_PATH]
_Must_inspect_result_ _In_ WDFDEVICE _In_ PCUNICODE_STRING KeyName
Referenced by CConfiguration::GetConfigurationFromFile().
◆ IsNumber()
Determines whether a string contains entirely numeric values.
- Parameters
-
Input | Constant pointer to a char array containing the input to check. |
- Returns
- true if the string is entirely numeric, false otherwise.
Definition at line 74 of file tools.cpp.
Referenced by CWebService::GetSuiteID(), and CWebService::GetTestID().
◆ StringOut()
Outputs a string through the standard output and the debug output. The string may have LF or CRLF line endings.
- Parameters
-
String | The std::string to output |
Definition at line 96 of file tools.cpp.
99 size_t i,
start = 0, last_newline = 0,
size = 0, curr_pos = 0;
117 curr_pos = NewString.size();
135 start = last_newline;
142 last_newline = curr_pos;
149 if(forcePrint ==
true || NewString[curr_pos - 1] ==
'\n')
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_INTERRUPT_CONFIG Configuration
_Must_inspect_result_ _In_ WDFDEVICE _In_ WDFSTRING String
#define memcpy(s1, s2, n)
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 CWineTest::GetNextTestInfo(), LdrpAllocateUnicodeString(), CJournaledTestList::LoadJournalFile(), CWineTest::Run(), CWineTest::RunTest(), ShutdownSystem(), wmain(), and CJournaledTestList::WriteInitialJournalFile().
◆ UnicodeToAscii() [1/2]
◆ UnicodeToAscii() [2/2]
Converts a Unicode string to an ASCII one.
- Parameters
-
UnicodeString | Pointer to a std::wstring containing the Unicode string |
- Returns
- The ASCII string as std::string
Definition at line 287 of file tools.cpp.
◆ HexCharacters
const char HexCharacters[] = "0123456789ABCDEF" |
|
static |