mirror of
https://github.com/Alukym/VMProtect-Source.git
synced 2025-06-10 16:47:57 -05:00
Initial commit
This commit is contained in:
23
runtime/utils.h
Normal file
23
runtime/utils.h
Normal file
@ -0,0 +1,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
|
Reference in New Issue
Block a user