forked from imReker/rkNativeLib
-
Notifications
You must be signed in to change notification settings - Fork 0
/
rkNativeLib.h
62 lines (53 loc) · 1.89 KB
/
rkNativeLib.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
#pragma once
#undef LoadLibraryExW
#undef CreateFile
#undef GetFileAttributes
#undef SetVolumeMountPoint
#undef CreateProcess
typedef HMODULE(WINAPI*PLOADLIBRARYEXW)(
_In_ LPCWSTR lpLibFileName,
_Reserved_ HANDLE hFile,
_In_ DWORD dwFlags
);
PLOADLIBRARYEXW LoadLibraryExW = 0;
namespace Reker {
namespace NativeLib {
using namespace Platform;
public ref class RKFile sealed {
public:
static uint32 CreateFile(String^ szFileName, uint32 dwDesiredAccess, uint32 dwShareMode, uint32 dwCreationDisposition, uint32 dwFlagsAndAttributes, String^ szFileName2, bool bHard);
static uint32 GetFileAttributes(String^ szFileName);
static uint32 SetVolumeMountPoint(String^ szVolumeMountPoint, String^ szVolumeName);
static uint32 CreateProcess(String^ szFileName);
};
public ref class RKShell sealed {
public:
static bool IsKidZoneActive();
static uint32 LaunchSessionByUri(String^ szUri);
static uint32 AdjustVolume(int32 numberOfSteps);
static uint32 RequestShutdown(int32 requestType);
};
public enum class RegistryHive {
HKCR = (int)HKEY_CLASSES_ROOT,
HKCU = (int)HKEY_CURRENT_USER,
HKLM = (int)HKEY_LOCAL_MACHINE,
HKU = (int)HKEY_USERS,
HKCC = (int)HKEY_CURRENT_CONFIG
};
public ref class RKRegistry sealed {
public:
static uint32 ReadDWORD(RegistryHive hive, String^ szPath, String^ szValue, uint32* lpData);
static uint32 WriteDWORD(RegistryHive hive, String^ szPath, String^ szValue, uint32 dwData);
static uint32 ReadString(RegistryHive hive, String^ szPath, String^ szValue, String^ szData);
static uint32 WriteString(RegistryHive hive, String^ szPath, String^ szValue, String^ szData);
};
public ref class RKPhoneOM sealed {
public:
static uint32 PhoneDial(String^ szNumber);
};
public ref class RKNativeLib sealed {
public:
static uint32 AdjustPrivilege();
};
}
}