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 › (C++) Prototype class from foreign DLL

Question(C++) Prototype class from foreign DLL

Posts 1–4 of 4 · Page 1 of 1
VXP
VXP
(C++) Prototype class from foreign DLL
My specific help request is this:

I have a certain DLL file which I've loaded with LoadLibrary, and it works fine.

I can call a function CalcLpqCheckSum just fine, parameters are CalcLpqCheckSum(void*, int)

However, other functions all appear to be classes:

[IMG]kingofkings4.000webhostapp.com/ida_mpgh_q.png[/IMG]

I can reference them just fine in my code but when I call the function my application freezes and crashes.
Depending on what I do, I get various 32bit return values.

[IMG]kingofkings4.000webhostapp.com/ida_mpgh_q2.png[/IMG]

How do I properly create a prototype of a class from a foreign DLL in my program?

Also, can anyone tell me what is going on in the first picture? I lack the understanding of how these functions are designed and how to prototype them.

Even if I prototype directly from a function address I still can't call the LpqSystem function with or without parameters. It crashes regardless.
#1 · 6y ago
ElonTusk
ElonTusk
Quote Originally Posted by VXP View Post
My specific help request is this:

I have a certain DLL file which I've loaded with LoadLibrary, and it works fine.

I can call a function CalcLpqCheckSum just fine, parameters are CalcLpqCheckSum(void*, int)

However, other functions all appear to be classes:

[IMG]kingofkings4.000webhostapp.com/ida_mpgh_q.png[/IMG]

I can reference them just fine in my code but when I call the function my application freezes and crashes.
Depending on what I do, I get various 32bit return values.

[IMG]kingofkings4.000webhostapp.com/ida_mpgh_q2.png[/IMG]

How do I properly create a prototype of a class from a foreign DLL in my program?

Also, can anyone tell me what is going on in the first picture? I lack the understanding of how these functions are designed and how to prototype them.

Even if I prototype directly from a function address I still can't call the LpqSystem function with or without parameters. It crashes regardless.

I am a bit confused as to what you're doing. If I understand your post correctly, you have some DLL file, and you are unpacking that file using some library called "LoadLibrary", and then you would like to construct the protoype for a specific class? What exactly are you trying to do? Maybe explain the bigger picture, so that way it will easier for others to chime in and help.
#2 · 6y ago
Azuki
Azuki
Quote Originally Posted by VXP View Post
-snip-
If you say the parameters are a void pointer and an int, why do you call it like LpqSystem(void*)?
The void* is also certain the this pointer, so the current object.

Attach the debugger to CalcLpqCheckSum and check out what variables are passed to LpqSystem, if the void* parameter is the pointer to the current object then that's great and you don't have to call the function with that parameter.
#3 · 6y ago
VXP
VXP
Quote Originally Posted by Azuki View Post
Attach the debugger to CalcLpqCheckSum and check out what variables are passed to LpqSystem, if the void* parameter is the pointer to the current object then that's great and you don't have to call the function with that parameter.
So if I called LpqSystem(this*); it should work?
Sorry for asking I just don't have the time at the moment to mess around, I'll come back to this.
#4 · 6y ago
Posts 1–4 of 4 · Page 1 of 1

Post a Reply

Similar Threads

  • Extracting classes from dynamically loaded libraries.By radnomguywfq3 in C++/C Programming
    3Last post 17y ago
  • Help with hooking from a dllBy Anddos in C++/C Programming
    5Last post 16y ago
  • [Help] Dealing with pointers from a dllBy ctpsolo in C++/C Programming
    11Last post 16y ago
  • New Update from WH.dll pls the LINK!!By SacredGold in CrossFire Hacks & Cheats
    19Last post 16y ago
  • [B]is there a new update from wh.dll[/B]By SacredGold in CrossFire Discussions
    14Last post 16y ago

Tags for this Thread

#c++#class#dll#external#king of kings 3#vxp