Skip to content
MPGHThe Dark Arts
/
RegisterLog in
Forum
Community
What's NewLatest posts across the boardTrendingHottest threads right nowSubscribedThreads you follow
Discussion
GeneralIntroductionsEntertainmentDebate FortFlaming & Rage
Board
News & AnnouncementsMPGH TimesSuggestions & HelpGiveaways
More Sections
Art & Graphic DesignProgrammingHackingCryptocurrency
Hacks & Cheats
Games
ValorantCS2 / CS:GOCall of Duty / WarzoneFortniteApex LegendsEscape From Tarkov
+14 moreLeague of LegendsGTA VMinecraftRustROTMGBattlefieldTroveBattleOnCombat ArmsCrossFireBlackshotRuneScapeDayZDead by Daylight
Resources
Game Hacking TutorialsReverse EngineeringGeneral Game HackingAnti-CheatConsole Game Hacking
Tools
Game Hacking ToolsTrainers & CheatsHack/Release NewsNew
Submit a release →Share your cheat, tool, or config with the community.
AINEW
AI Tools
General & DiscussionPrompt EngineeringLLM JailbreaksHotAI Agents & AutomationLocal / Open Models
AI × Gaming
AI Aimbots & VisionML Anti-CheatGame Bots & Automation
Create
AI Coding / Vibe CodingAI Art & MediaAI Voice & TTS
The AI frontier →Where game hacking meets modern machine learning. Jump in.
Marketplace
Buy & Sell
SellingBuyingTradingUser Services
Trust & Safety
Middleman LoungeMarketplace TalkVouch Copy Profiles
Money
Cryptocurrency TalkCurrency ExchangeWork & Job Offers
Start selling →List accounts, services, and goods. Use the middleman to trade safe.
MPGH The Dark Arts

A community for offensive security research, reverse engineering, and AI.

Community

ForumMarketplaceSearch

Account

RegisterLog in

Legal

Privacy PolicyForum RulesHelp & FAQ
© 2026 MPGH · All rights reserved.Built by the community, for the community. For educational purposes onlyContent is shared for security research and education — we don't condone illegal use. You're responsible for complying with applicable laws. Use at your own risk.
Home › Forum › Programming › C++/C Programming › [Release/Source Code]Some API's made Easier

[Release/Source Code]Some API's made Easier

Posts 1–6 of 6 · Page 1 of 1
'Bruno
'Bruno
[Release/Source Code]Some API's made Easier
Well, since last few days i have been writing an application in C# for multiple stuff. In there i have been using some WinAPI's. It annoys me sometimes to use those API's in C# as they are way better used in C++ imo.

So i decided to create a Library in C++ to just import (.dll), and use it like a charm. I have been passing some of them to it, actually only have 2 of them in it, and and rand extra function that its quite useless anyway.

What is now easier:
  • Sendinput API:
    • Keyboard; (send keystrokes)
      • Params: message , hWnd
    • Mouse; (send mouse clicks)
      • Params: x, y coords
  • Get Some process Handle. (just random, first created to test, but didn't remove it)


Instead now of writing the whole API function params, you can easily just type the message/coords and it will all be done quite easily. This makes even easier for other languages to use it.

Example of usage on another language (C#):

  • Import Dll:


Code:
[DllImport("MultiAPIs.dll")]
public static extern int sendInputMsg(string message, IntPtr hWindow);

[DllImport("MultiAPIs.dll")]
public static extern int sendInputMouse(int x, int y);
  • Usage:


Code:
sendInputMsg("Hello World", windowHandle);
Code:
sendInputMouse(100,100);


  • Library Source Code:


[php]//
// Multi APIs
// Created by Bruno Monteiro in 2010
// MultiAPIs.cpp
//

#include "stdafx.h"
#include <windows.h>

extern "C" __declspec(dllexport)HANDLE GetHandle(LPCWSTR appName);
extern "C" __declspec(dllexport)int sendInputMouse(int x, int y);
extern "C" __declspec(dllexport)int sendInputMsg(char message[], HWND handle);

//basic msg sending
int sendInputMsg(char message[], HWND hWnd)
{
SetForegroundWindow(hWnd);
int msgSize = 0;

for(int i=0; message[i] != '\0'; i++)
msgSize++;

INPUT sInput; //INPUT struct used on SendInput
sInput.type = INPUT_KEYBOARD; //will be doing keyboard input, not mouse or hardware (ki)
sInput.ki.dwFlags = KEYEVENTF_EXTENDEDKEY;

for(int i=0; i < msgSize; i++)
{
sInput.ki.wVk = ((UCHAR)VkKeyScan(message[i])); //Converts the Char to a VirtualKey
SendInput(1, &sInput, sizeof(sInput));
Sleep(10);
}

sInput.ki.wVk = (UCHAR)0x0D; //Enter, Virtual Key hex code
SendInput(1, &sInput, sizeof(sInput));

return 0;
}

int sendInputMouse(int x, int y)
{
SetCursorPos(x,y);

INPUT sInput; //INPUT struct used on SendInput
sInput.type = INPUT_MOUSE; //will be doing mouse input, not keyboard or hardware (mi)
sInput.mi.dwFlags = MOUSEEVENTF_LEFTDOWN; //left button press
SendInput(1, &sInput, sizeof(sInput)); //sends Mouse left buttom Down Press
sInput.mi.dwFlags = MOUSEEVENTF_LEFTUP; //left button release
SendInput(1, &sInput, sizeof(sInput)); //obvious?

return 0;
}

//gets processs HANDLE (opened ready for hacking) by it's name
HANDLE GetOpenHandle(LPCWSTR appName)
{
DWORD* idProcess = new DWORD;
GetWindowThreadProcessId(FindWindow(0, appName), idProcess);
return OpenProcess(PROCESS_ALL_ACCESS, 0, *idProcess);
} [/php]

It's Still small, but i will keep updating it whenever i have time and feel like it.

Now feel free to compare the code with usage and without the usage of the dll.

ATTENTION: I'm not a very well coder using APIs, but i keep trying my best, as result probably those API's code could be better. Still, use it if you want.


Viruscan:
VirusTotal

For those who might wand the Dll:
Download Attachment at the end
#1 · 16y ago
NextGen1
NextGen1
Nice Work.



/Approved
#2 · 16y ago
Hell_Demon
Hell_Demon
Why use C# for that tho, you know C++ why not use it o_O
#3 · 16y ago
'Bruno
'Bruno
Quote Originally Posted by Hell_Demon View Post
Why use C# for that tho, you know C++ why not use it o_O
sexy forms
#4 · 16y ago
Void
Void
SendInputMessage simulates one character press at a time? Isn't that a little CPU consuming if you use it plenty?

Regardless, great work.
#5 · 16y ago
'Bruno
'Bruno
Quote Originally Posted by Void View Post
SendInputMessage simulates one character press at a time? Isn't that a little CPU consuming if you use it plenty?

Regardless, great work.
Yea it does, i could create an array of that struct, and send the whole input at one time, but still not much difference i guess?
#6 · 16y ago
Posts 1–6 of 6 · Page 1 of 1

Post a Reply

Similar Threads

  • [Release][Source Code] DLL InjectionBy Tukjedude in C++/C Programming
    12Last post 16y ago
  • Open Source Release. Semi-Useless Timer Source Code!By User1 in Visual Basic Programming
    6Last post 17y ago
  • <releasing 2 morrow> new opk hack ~source code~ C++By pikamew4 in Combat Arms Hack Coding / Programming / Source Code
    21Last post 16y ago
  • [Release] WarHax DLL Source CodeBy OneWhoSighs in WarRock - International Hacks
    20Last post 18y ago
  • Source code +Help+ReleaseBy maxius12 in CrossFire Hacks & Cheats
    33Last post 16y ago

Tags for this Thread

None