mirror of
https://github.com/Metick/DMALibrary.git
synced 2026-11-18 06:06:49 +08:00
Initial Commit
This commit is contained in:
37
Example/Example.cpp
Normal file
37
Example/Example.cpp
Normal file
@@ -0,0 +1,37 @@
|
||||
// Example.cpp : This file contains the 'main' function. Program execution begins and ends there.
|
||||
//
|
||||
|
||||
#include <iostream>
|
||||
#include <DMALibrary/Memory/Memory.h>
|
||||
|
||||
int main()
|
||||
{
|
||||
if (!mem.Init("explorer.exe", true))
|
||||
{
|
||||
std::cout << "Failed to initilize DMA" << std::endl;
|
||||
return 1;
|
||||
}
|
||||
|
||||
std::cout << "DMA initilized" << std::endl;
|
||||
|
||||
if (!mem.GetKeyboard().InitKeyboard())
|
||||
{
|
||||
std::cout << "Failed to initialize keyboard hotkeys through kernel." << std::endl;
|
||||
return 1;
|
||||
}
|
||||
|
||||
//example keyboard usage.
|
||||
//mem.GetKeyboard().IsKeyDown(VK_F5);
|
||||
|
||||
auto all_modules = mem.GetModuleList("explorer.exe");
|
||||
std::cout << "Explorer.exe Modules: " << std::endl;
|
||||
for (size_t i = 0; i < all_modules.size(); i++)
|
||||
{
|
||||
std::cout << "Module: " << all_modules[i] << std::endl;
|
||||
}
|
||||
|
||||
std::cout << "Hello World!\n";
|
||||
//pause();
|
||||
Sleep(10000);
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user