blob: 66944e7d8e09b97790ffd4bdffa1d6d555d6ae4d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
#ifndef UTILS_H
#define UTILS_H
void ShowMessage(const VMP_CHAR *message);
#ifdef VMP_GNU
#elif defined(WIN_DRIVER)
HMODULE GetModuleHandleA(const char *name);
#else
void *InternalGetProcAddress(HMODULE module, const char *proc_name);
__forceinline void InitUnicodeString(PUNICODE_STRING DestinationString, PCWSTR SourceString)
{
if (SourceString)
DestinationString->MaximumLength = (DestinationString->Length = (USHORT)(wcslen(SourceString) * sizeof(WCHAR))) + sizeof(UNICODE_NULL);
else
DestinationString->MaximumLength = DestinationString->Length = 0;
DestinationString->Buffer = (PWCH)SourceString;
}
#endif
#endif
|