Posted: Wed Jul 02, 2008 3:00 pm Post subject: DLLs in MASM
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').
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