Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


DLLs in MASM

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
Slugsnack
Grandmaster Cheater Supreme
Reputation: 71

Joined: 24 Jan 2007
Posts: 1857

PostPosted: Wed Jul 02, 2008 3:00 pm    Post subject: DLLs in MASM Reply with quote

I have recently created a memory scanner in MASM32 in DLL form that can be injected into a given process and can scan for an array of bytes or a string in a given memory region. This is all working perfectly, and all is going as I want except I want to be able to allow variable input for things like start and end memory address for scan and also the bytes (currently I have hardcoded a few things I wanted scanned for).

I wanted to make these options available via a console. Normally in an executable, I would've used StdIn and StdOut but for some reason these don't work in the DLL. Does anyone have any idea how to fix this ?

I have debugged the StdOut call and it fails on GetStdHandle. In normal executables, this would happen if you assembled/linked without the "console assemble & link" option and just used the "assemble & link" option.

I am using the default DLL "makeit.bat" file:

Code:
@echo off
if exist Updater.obj del Updater.obj
if exist Updater.dll del Updater.dll
\masm32\bin\ml /c /coff Updater.asm
\masm32\bin\Link /SUBSYSTEM:WINDOWS /DLL /DEF:Updater.def Updater.obj
del Updater.obj
del Updater.exp
dir Updater.*
pause


I just have no idea why it's not working and won't let me use the console instructions (btw StdIn + StdOut are 'higher level macro instructions').
Back to top
View user's profile Send private message
Slugsnack
Grandmaster Cheater Supreme
Reputation: 71

Joined: 24 Jan 2007
Posts: 1857

PostPosted: Wed Jul 02, 2008 3:42 pm    Post subject: Reply with quote

Works, much appreciated.
Back to top
View user's profile Send private message
Slugsnack
Grandmaster Cheater Supreme
Reputation: 71

Joined: 24 Jan 2007
Posts: 1857

PostPosted: Thu Jul 03, 2008 12:38 pm    Post subject: Reply with quote

Was what I was initially looking for, thanks.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites