News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

Driver and exe joining

Started by white scorpion, April 11, 2005, 07:22:10 PM

Previous topic - Next topic

white scorpion

Hi All,

Currently i'm learning to write kernel drivers (in masm) and i wondered if it was possible to add the driver to the executable which will start it for distribution. meaning:

driver + executable = executable to be distributed.

i've once read it should be possible using the resources but i can't find any documentation about this on the net...
Anyone can help me with this?

Thanks in advance!

Brett Kuntz

Just add it into the .data section using some built-in masm function that'll let you open a file and auto-convert it to a db format. Then once you have it there, use CreateFile and WriteFile (or whatever) to file output the data into a file, then load it up from there.

Opcode

Hi,

There is a excellent example inside
the KMDKIT version 1.8 in the sample HiddenDriver.
It is in the path \KmdKit\examples\basic\HiddenDriver
inside the zip file.

Regards,
Opcode

Opcode


pbrennick

Adding it as a resource is a nice way of doing it.  four-f sure did a nice job.

Paul

white scorpion

Thanks for your responses... i have a copy of the KMDkit 1.8 and i know which program you mean, but to be honest i forgot all about it completely.. i think that program is all i need to figure it out... Thanks for reminding me ;-)))

Kind regards!

Mark V.
(White Scorpion).

thomasantony

Hi,
    Join the file as an RTDATA resource into the file. Then use, FindResource, LoadResource,LockResource, CreateFile, etc. (I don't know how you load a driver file). I have done this with exe files, MIDI files etc. with no problems. :U

Thomas  :U
There are 10 types of people in the world. Those who understand binary and those who don't.


Programmer's Directory. Submit for free

hutch--

If you want to avoid messing around with resources, have a look at the toy I posted a while ago called FDA.EXE. I posted the source for it shortly after. Takes any file including a binary file and creates an object file that you can link directly into your EXE/DLL and write it to disk when you need to do so. If the driver is not particularly large, (< 1 meg) you can use a toy in MASM32 called BINTODB.EXE to convert the binary file into DB format.
Download site for MASM32      New MASM Forum
https://masm32.com          https://masm32.com/board/index.php

white scorpion

Thomas > i'm already using that, i've done it in an app i released recently, works like a charm :lol:
HiddenDriver from Four-F gave me that solution (as stated above) opcode came with the idea...

Hutch > i can't seem to find that program, all searches on this forum come out empty :(


pbrennick

White Scorpion,
You can find it in the following topic:

http://www.masmforum.com/simple/index.php?topic=1132.msg8285#msg8285

It is in a zip attached to his post.  I got the same results you got but already knew where it was.  Evidently, searches do not include words in Topics or filenames of attachments.  That is why you could not find it, pretty funny, eh?

Paul

white scorpion

Thanks for your reply, i will go and check it out :lol:

thomasantony

Hi,
I found the bintodb.exe file in my masm32 directory :dance: :boohoo: :dance:

Thomas :U
There are 10 types of people in the world. Those who understand binary and those who don't.


Programmer's Directory. Submit for free

white scorpion

QuoteIf the driver is not particularly large, (< 1 meg) you can use a toy in MASM32 called BINTODB.EXE to convert the binary file into DB format.
apparently it is there indeed thomasanthony :lol:

i like Hutch's program as well, but i think i will stick to the resources as well since it is more convinient for distribution if you include a batch file which will assemble and link the program.