View previous topic :: View next topic |
Author |
Message |
Phenax Newbie cheater Reputation: 0
Joined: 29 Mar 2009 Posts: 16
|
Posted: Sun Dec 23, 2012 11:47 pm Post subject: DirectX hook in exe trainer exported |
|
|
Hello,
My DirectX hook code runs fine when I run it through Lua Engine
But if I export an EXE with the code, it gives Error: Access Violation.
Exporting with DirectX isn't in yet? Or what. Also, any way to detect if DirectX has alreayd been hooked?
Code: |
function hookD3D()
reinitializeSymbolhandler()
d3dhook_initializeHook()
end
function showMsg(color, size, message)
cleanupMsg()
font = createFont()
font_setSize(font, size)
font_setColor(font, color)
fontmap = d3dhook_createFontmap(font)
local textWidth = d3dhook_fontmap_getTextWidth(fontmap, message)
displayText = d3dhook_createTextContainer(fontmap, textWidth, size, message)
d3dhook_renderobject_setX(displayText, 0)
d3dhook_renderobject_setY(displayText, -1)
end
function cleanupMsg()
object_destroy(displayText)
object_destroy(fontmap)
object_destroy(font)
end
function testGfx()
hookD3D()
showMsg(0xffffff, 32, 'Test')
end
testGfx()
|
|
|
Back to top |
|
|
Dark Byte Site Admin Reputation: 458
Joined: 09 May 2003 Posts: 25288 Location: The netherlands
|
Posted: Mon Dec 24, 2012 5:35 am Post subject: |
|
|
Is it a tiny trainer, ce trainer, or gigantic trainer?
If gigantic, make sure you have added the d3dhook dll's to the package
And you can call d3dhook_initializeHook() as often as you wish, it automatically detects if it's already hooked or not
_________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Like my help? Join me on Patreon so i can keep helping |
|
Back to top |
|
|
Phenax Newbie cheater Reputation: 0
Joined: 29 Mar 2009 Posts: 16
|
Posted: Mon Dec 24, 2012 5:37 am Post subject: |
|
|
Dark Byte wrote: | Is it a tiny trainer, ce trainer, or gigantic trainer?
If gigantic, make sure you have added the d3dhook dll's to the package
And you can call d3dhook_initializeHook() as often as you wish, it automatically detects if it's already hooked or not |
Much appreciated, dark_byte. I'm using the gigantic trainer, and I wasn't adding the d3dhook dll's to the package.
Regards
|
|
Back to top |
|
|
Phenax Newbie cheater Reputation: 0
Joined: 29 Mar 2009 Posts: 16
|
Posted: Thu Dec 27, 2012 3:34 pm Post subject: |
|
|
Dark Byte wrote: |
And you can call d3dhook_initializeHook() as often as you wish, it automatically detects if it's already hooked or not |
For me, Cheat Engine goes unresponsive (thus I must end it) when I try to initialize a hook after it's already hooked.
|
|
Back to top |
|
|
Dark Byte Site Admin Reputation: 458
Joined: 09 May 2003 Posts: 25288 Location: The netherlands
|
Posted: Thu Dec 27, 2012 4:15 pm Post subject: |
|
|
Do you mean when it's hooked by another instance of a trainer ? Or in the same session ?
_________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Like my help? Join me on Patreon so i can keep helping |
|
Back to top |
|
|
Phenax Newbie cheater Reputation: 0
Joined: 29 Mar 2009 Posts: 16
|
Posted: Fri Dec 28, 2012 12:45 am Post subject: |
|
|
Dark Byte wrote: | Do you mean when it's hooked by another instance of a trainer ? Or in the same session ? |
In the same session - but I just misinterpreted I think, I can obviously just use a variable to control this. It seems to work fine in another instance of a trainer, I assumed that it wouldn't from these results. I think I'm fine now.
Regards,
|
|
Back to top |
|
|
|