I’m trying to append a second binary file2.dll to the end of a driver file1.sys so that I hope os loader will only load files1.sys’s portion into memory and then code in my driver will load file2.dll from some offset as necessary. Would something like that be possible? Thanks in advance!
Why do you want to do this?
d
dent from a phpne with no keynoard
-----Original Message-----
From: xxxxx@msn.com
Sent: August 18, 2010 7:58 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] question about append a bianry file to the end of a kernel driver file
I’m trying to append a second binary file2.dll to the end of a driver file1.sys so that I hope os loader will only load files1.sys’s portion into memory and then code in my driver will load file2.dll from some offset as necessary. Would something like that be possible? Thanks in advance!
—
NTDEV is sponsored by OSR
For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars
To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer
It don’t know if it would work or not (it would depend on what the loader
checks or not), but it would likely get flagged by an AV. You could work
around this by embedding the dll in the driver as a resource, but there’s no
support for resources in the kernel, so you’d (realistically) have to have
some sort of user mode support as well.
So, I guess the real question is why do you want to do this.
mm
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of xxxxx@msn.com
Sent: Wednesday, August 18, 2010 10:59 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] question about append a bianry file to the end of a kernel
driver file
I’m trying to append a second binary file2.dll to the end of a driver
file1.sys so that I hope os loader will only load files1.sys’s portion into
memory and then code in my driver will load file2.dll from some offset as
necessary. Would something like that be possible? Thanks in advance!
NTDEV is sponsored by OSR
For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars
To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer
Mostly end user and installer issue. I know this might sound ridiculous but I can’t send two files to them.
I imagine that you’ve already thought about this, but couldn’t you put them
in an installer with a selfextractor? If it’s about one file on disk, you
could have the installer create the dll as a named stream of the driver
file.
I’m not suggesting that either of this is a great idea, but what you’re
talking about is messier.
Good luck,
mm
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of xxxxx@msn.com
Sent: Wednesday, August 18, 2010 11:07 PM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] question about append a bianry file to the end of a
kernel driver file
Mostly end user and installer issue. I know this might sound ridiculous but
I can’t send two files to them.
NTDEV is sponsored by OSR
For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars
To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer
If your driver is pnp, it already has 2 files (the INF and sys), most likely 3 (the catalog), so what is the harm in one more? You can always create a self extracting EXE or MSI to install everything if you want to send your customer only one file
d
-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of xxxxx@msn.com
Sent: Wednesday, August 18, 2010 8:07 PM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] question about append a bianry file to the end of a kernel driver file
Mostly end user and installer issue. I know this might sound ridiculous but I can’t send two files to them.
NTDEV is sponsored by OSR
For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars
To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer
xxxxx@msn.com wrote:
I’m trying to append a second binary file2.dll to the end of a driver file1.sys so that I hope os loader will only load files1.sys’s portion into memory and then code in my driver will load file2.dll from some offset as necessary. Would something like that be possible? Thanks in advance!
No. The PE file header includes a checksum, and the NT kernels will
bluescreen if the checksum does not match. Is file2.dll a user-mode
DLL? If so, you don’t really want it to load with the SYS, because you
couldn’t call it. You could embed file2.dll as a resource in the SYS
file, I suppose, but you’d still have to have some application pull the
resource out.
–
Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.
For the eighty ZILLIONTH time on this list:
Please tell us the end-result you’re trying to achieve, instead of asking us how to implement a solution in a particular way that doesn’t make a great deal of sense.
“Mostly end user and installer issue. I know this might sound ridiculous but I can’t send two files to them” isn’t really a description. It’s a VERY PARTIAL description. Tell us more… Do you REALLY mean “DLL” (like in user-mode DLL) or do you mean “kernel-mode DLL AKA Export Driver”??
Pleeeeeaaaaazzzzeee. We’re all engineers here. You need to be specific and detailed.
As a star, please complete the following paragraph:
…
I have a problem that I need to solve, and I’m hoping you can help me. In general, I need to [your goal here] – BUT, the big issue is that I can’t [your set of restrictions here]. I’ve tried to [list things you’ve tried here], but I haven’t managed to make them work. I’m currently considering [describe the solution you think you want]… does that make sense? Is there a better way to solve my overall problem?
…
Peter
OSR
> As a star, please complete the following paragraph:
…
I have a problem that I need to solve, and I’m hoping you can help me. In general, I need to [your goal
here] – BUT, the big issue is that I can’t [your set of restrictions here]. I’ve tried to [list things you’ve
tried here], but I haven’t managed to make them work. I’m currently considering [describe the solution
you think you want]… does that make sense? Is there a better way to solve my overall problem?
“To memories!”, as it is said in Russian blogs ![]()
Well - to OSR list rules ![]()
A ready template ![]()
–
Maxim S. Shatskih
Windows DDK MVP
xxxxx@storagecraft.com
http://www.storagecraft.com
Actually, it is not OSR list rules; it is common sense in asking any
technical question. The mispractice of stupid questions is not limited to
this set of threads; I regularly berate people on other newsgroups I
participate in where they essentially ask one of several questions
“My program doesn’t work, what did I do wrong?” [This question has many
forms all of which are isomorphic to renaming with this question]
“Here is the source code, why doesn’t it work?” [accompanied by perhaps 20%
of the source, none of which is relevant to the question, and which almost
never includes any declarations of any variables so their scope and type are
unknown and unknowable. Or one line is shown, and no context so we have no
idea when and where it is executed].
“I get error code in [Compiling|Linking], what did I do wrong?”
[where the error is some numeric code, and text is never given. So
it is usually something like “undefined variable” or “unresolved external
symbol” but since they don’t give the name of the variable or any context,
there is no way to tell what they are talking about. This includes the
people who don’t know the difference between a compiler and linker.]
“How do I do ?” for some insane idea, usually incompatible with
anything that is remotely construable as possible under Windows, or perhaps
any other known operating system. Once the purpose of the question is
ascertained, there are usually several alternative (and feasible) ways to
accomplish the goal. (Example: “How do I allocate contiguous kernel memory
from an application?”, by someone who didn’t understand anything about
virtual memory, paging, kernel/user address space separation, or pretty much
anything else, but it took dozens of messages to disabuse him of the idea;
all he needed was a block of application memory, but for some reason thought
it would be “more efficient” if it could be allocated in the kernel. He had
read that arrays had to be allocated “as contiguous memory”.).
I would like to borrow this template to post in other NGs (with due credit
to Peter).
joe
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Maxim S. Shatskih
Sent: Thursday, August 19, 2010 4:12 PM
To: Windows System Software Devs Interest List
Subject: Re:[ntdev] question about append a bianry file to the end of a
kernel driver file
> As a star, please complete the following paragraph:
>
> …
> I have a problem that I need to solve, and I’m hoping you can help me. In
general, I need to [your goal
>here] – BUT, the big issue is that I can’t [your set of restrictions
here]. I’ve tried to [list things you’ve
>tried here], but I haven’t managed to make them work. I’m currently
considering [describe the solution
>you think you want]… does that make sense? Is there a better way to
solve my overall problem?
“To memories!”, as it is said in Russian blogs ![]()
Well - to OSR list rules ![]()
A ready template ![]()
–
Maxim S. Shatskih
Windows DDK MVP
xxxxx@storagecraft.com
http://www.storagecraft.com
—
NTDEV is sponsored by OSR
For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars
To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer
–
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
LOL… Credit OSR’s Hector Rodriguez; It’s actually HIS template (except I re-wrote it to remove the gratuitous insults and rude phrases in Spanish). He’ll get a good laugh when I tell him.
Peter
OSR