how to use undocumented kernel functions

I use the undocumented kernel functions,such as
KeI386AllocateGdtSelectors(),KeI386ReleaseGdtSelectors() in my sys
driver,but I don’t know how to link the functions in my program,please tell
me the steps to link the undocumented functions in a program.Thanks


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

If the function is exported in the kernel - then no problem at all, it is already in NTOSKRNL.LIB and all you need is a prototype
for compilation.
If not exported - then only hardcore hackery can help you.

Max

----- Original Message -----
From:
To: “NT Developers Interest List”
Sent: Monday, December 17, 2001 5:48 AM
Subject: [ntdev] how to use undocumented kernel functions

> I use the undocumented kernel functions,such as
> KeI386AllocateGdtSelectors(),KeI386ReleaseGdtSelectors() in my sys
> driver,but I don’t know how to link the functions in my program,please tell
> me the steps to link the undocumented functions in a program.Thanks
>
> —
> You are currently subscribed to ntdev as: xxxxx@storagecraft.com
> To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com
>


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

I think the original question was how to link unexported kernel functions
into an application. Why do we even entertain these questions? The answer is
that the person asking the question should not be writing kernel mode
software.

-----Original Message-----
From: Maxim S. Shatskih [mailto:xxxxx@storagecraft.com]
Sent: Monday, December 17, 2001 7:19 AM
To: NT Developers Interest List
Subject: [ntdev] Re: how to use undocumented kernel functions

If the function is exported in the kernel - then no problem at all, it is
already in NTOSKRNL.LIB and all you need is a prototype for compilation. If
not exported - then only hardcore hackery can help you.

Max

----- Original Message -----
From:
To: “NT Developers Interest List”
Sent: Monday, December 17, 2001 5:48 AM
Subject: [ntdev] how to use undocumented kernel functions

> I use the undocumented kernel functions,such as
> KeI386AllocateGdtSelectors(),KeI386ReleaseGdtSelectors() in my sys
> driver,but I don’t know how to link the functions in my program,please
> tell me the steps to link the undocumented functions in a
> program.Thanks
>
> —
> You are currently subscribed to ntdev as: xxxxx@storagecraft.com To
> unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com
>


You are currently subscribed to ntdev as: xxxxx@stratus.com To
unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

Use the Microsoft Library Manager (lib.exe) to generate a lib file. Link
your driver with it. And of course your driver will not load if these
functions are not exported.

Alexey Logachyov
xxxxx@vba.com.by
VirusBlokAda Ltd.
http://www.vba.com.by

----- Original Message -----
From:
To: “NT Developers Interest List”
Sent: Monday, December 17, 2001 5:48 AM
Subject: [ntdev] how to use undocumented kernel functions

> I use the undocumented kernel functions,such as
> KeI386AllocateGdtSelectors(),KeI386ReleaseGdtSelectors() in my sys
> driver,but I don’t know how to link the functions in my program,please
tell
> me the steps to link the undocumented functions in a program.Thanks
>
> —
> You are currently subscribed to ntdev as: xxxxx@vba.com.by
> To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

> I think the original question was how to link unexported kernel functions

into an application. Why do we even entertain these questions? The answer is
that the person asking the question should not be writing kernel mode
software.

Into the app? Oh yes. I assumed he wanted to link them to the kernel-mode binary.

The DOS mindset is still alive. One of the atrocities of DOS and smaller Windows is that they allow nasty design styles like
accessing hardware from user mode.

Max


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

>-----Ursprungliche Nachricht-----

Von: Roddy, Mark [mailto:xxxxx@stratus.com]
Gesendet: Montag, 17. Dezember 2001 14:38
An: NT Developers Interest List
Betreff: [ntdev] Re: how to use undocumented kernel functions

I think the original question was how to link unexported
kernel functions
into an application. Why do we even entertain these questions?
The answer is
that the person asking the question should not be writing kernel mode
software.

Is this a personal thing between you and the poster of this question
or does this apply to all people who use unexported kernel functions,
e.g. the guys at sysinternals, NuMega, …
I mean, even these people may have started their dreadful hackery by
asking someone a couple of questions and i (unlike you, right?)
would surely miss their work!

Cheers,

Holger


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

Mark (Roddy),

some people on this list (like myself) are new to driver development. They
are here to read quietly and learn, and maybe ask a question or two, in the
hopes of getting a sensible answer.

Also, some people on this list (like myself) are doing driver development
out of their own personal curiosity, not because they are writing
commercial-grade drivers for a living. They just want to explore NT’s inner
workings, just for fun. Or just to gain a deeper understanding that would
benefit their day-job in usermode.

And, in my opinion, one of the best ways to learn is to make mistakes, and
trying to *really* understand why they were mistakes in the first place.
This often involves asking the experts for help.

So why not answer the “how to link undocumented functions” question in that
spirit? Maybe it’s just a naive question from a newbie who doesn’t know any
better. So educate that guy, don’t flame him. Just state the facts, give
your informed opinion on the topic. Or, if you too tired from the same old
stupid newbie questions, don’t answer at all and let others do that.

I know your name is well-known in driver-land, and I read everything you
post to this forum with much interest, because I think I can learn from it.
But please (and this might make me unpopular here, but so be it) drop the
“holier than thou”, elitist attitude.

Gert-Jan

-----Original Message-----
From: Holger Thiele [mailto:xxxxx@DAVID-GmbH.de]
Sent: Tuesday, December 18, 2001 9:10 AM
To: NT Developers Interest List
Subject: [ntdev] Re: how to use undocumented kernel functions

>-----Ursprungliche Nachricht-----
>Von: Roddy, Mark [mailto:xxxxx@stratus.com]
>Gesendet: Montag, 17. Dezember 2001 14:38
>An: NT Developers Interest List
>Betreff: [ntdev] Re: how to use undocumented kernel functions
>
>
>I think the original question was how to link unexported
>kernel functions
>into an application. Why do we even entertain these questions?
>The answer is
>that the person asking the question should not be writing kernel mode
>software.

Is this a personal thing between you and the poster of this question
or does this apply to all people who use unexported kernel functions,
e.g. the guys at sysinternals, NuMega, …
I mean, even these people may have started their dreadful hackery by
asking someone a couple of questions and i (unlike you, right?)
would surely miss their work!

Cheers,

Holger


You are currently subscribed to ntdev as: xxxxx@fenestrae.com
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

The question was “how do I link undocumented kernel functions into my
application?”, not “how do I link undocumented kernel functions into my
driver?”, which the poster indicated he already knew how to do. If you
think the actual question, not the one you misread, was legitimate,
please explain.

Hacking the kernel is in general a bad idea. There may be legitimate
reasons to use unexported functions, but typically the reasons are not
too good. However, a developer who does not understand the difference
between kernel mode and user mode, and who is asking how to link
unexported kernel functions into his application remains a developer who
should not be doing kernel mode development until he has a much better
understanding of the basic concepts.

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of
Gert-Jan Bartelds
Sent: Tuesday, December 18, 2001 4:49 AM
To: NT Developers Interest List
Subject: [ntdev] Re: how to use undocumented kernel functions

Mark (Roddy),

some people on this list (like myself) are new to driver
development. They are here to read quietly and learn, and
maybe ask a question or two, in the hopes of getting a
sensible answer.

Also, some people on this list (like myself) are doing driver
development out of their own personal curiosity, not because
they are writing commercial-grade drivers for a living. They
just want to explore NT’s inner workings, just for fun. Or
just to gain a deeper understanding that would benefit their
day-job in usermode.

And, in my opinion, one of the best ways to learn is to make
mistakes, and trying to *really* understand why they were
mistakes in the first place. This often involves asking the
experts for help.

So why not answer the “how to link undocumented functions”
question in that spirit? Maybe it’s just a naive question
from a newbie who doesn’t know any better. So educate that
guy, don’t flame him. Just state the facts, give your
informed opinion on the topic. Or, if you too tired from the
same old stupid newbie questions, don’t answer at all and let
others do that.

I know your name is well-known in driver-land, and I read
everything you post to this forum with much interest,
because I think I can learn from it. But please (and this
might make me unpopular here, but so be it) drop the “holier
than thou”, elitist attitude.

Gert-Jan

> -----Original Message-----
> From: Holger Thiele [mailto:xxxxx@DAVID-GmbH.de]
> Sent: Tuesday, December 18, 2001 9:10 AM
> To: NT Developers Interest List
> Subject: [ntdev] Re: how to use undocumented kernel functions
>
>
> >-----Ursprungliche Nachricht-----
> >Von: Roddy, Mark [mailto:xxxxx@stratus.com]
> >Gesendet: Montag, 17. Dezember 2001 14:38
> >An: NT Developers Interest List
> >Betreff: [ntdev] Re: how to use undocumented kernel functions
> >
> >
> >I think the original question was how to link unexported
> >kernel functions
> >into an application. Why do we even entertain these questions?
> >The answer is
> >that the person asking the question should not be writing
kernel mode
> >software.
>
> Is this a personal thing between you and the poster of this question
> or does this apply to all people who use unexported kernel
functions,
> e.g. the guys at sysinternals, NuMega, …
> I mean, even these people may have started their dreadful
hackery by
> asking someone a couple of questions and i (unlike you, right?)
> would surely miss their work!
>
> Cheers,
>
> Holger
>
> —
> You are currently subscribed to ntdev as: xxxxx@fenestrae.com To
> unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com
>


You are currently subscribed to ntdev as:
xxxxx@hollistech.com To unsubscribe send a blank email to
leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

Re-read the original question and get back to me about its
appropriateness, ok? I have no problem at all with reasoned hackery.

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Holger Thiele
Sent: Tuesday, December 18, 2001 3:10 AM
To: NT Developers Interest List
Subject: [ntdev] Re: how to use undocumented kernel functions

>-----Ursprungliche Nachricht-----
>Von: Roddy, Mark [mailto:xxxxx@stratus.com]
>Gesendet: Montag, 17. Dezember 2001 14:38
>An: NT Developers Interest List
>Betreff: [ntdev] Re: how to use undocumented kernel functions
>
>
>I think the original question was how to link unexported
>kernel functions
>into an application. Why do we even entertain these questions?
>The answer is
>that the person asking the question should not be writing kernel mode
>software.

Is this a personal thing between you and the poster of this question
or does this apply to all people who use unexported kernel functions,
e.g. the guys at sysinternals, NuMega, …
I mean, even these people may have started their dreadful hackery by
asking someone a couple of questions and i (unlike you,
right?) would surely miss their work!

Cheers,

Holger


You are currently subscribed to ntdev as:
xxxxx@hollistech.com To unsubscribe send a blank email to
leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

Mark,

a clear statement goes a long way towards avoiding
misunderstandings!

I get your point. It’s just that i don’t think
“the person asking the question should not be writing kernel mode software”
is a sensible answer to a technical question, especially
if you don’t even know his or her motivation.

Then again, Gert-Jan Bartelds’ answer beats mine in the very respect
of appropriate wording, too, so maybe i just better keep my loud mouth
shut on this issue :wink:

Cheers,

Holger

-----Ursprungliche Nachricht-----
Von: Mark Roddy [mailto:xxxxx@hollistech.com]
Gesendet: Dienstag, 18. Dezember 2001 12:33
An: NT Developers Interest List
Betreff: [ntdev] Re: how to use undocumented kernel functions

Re-read the original question and get back to me about its
appropriateness, ok? I have no problem at all with reasoned hackery.

> -----Original Message-----
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com] On Behalf Of Holger Thiele
> Sent: Tuesday, December 18, 2001 3:10 AM
> To: NT Developers Interest List
> Subject: [ntdev] Re: how to use undocumented kernel functions
>
>
> >-----Ursprungliche Nachricht-----
> >Von: Roddy, Mark [mailto:xxxxx@stratus.com]
> >Gesendet: Montag, 17. Dezember 2001 14:38
> >An: NT Developers Interest List
> >Betreff: [ntdev] Re: how to use undocumented kernel functions
> >
> >
> >I think the original question was how to link unexported
> >kernel functions
> >into an application. Why do we even entertain these questions?
> >The answer is
> >that the person asking the question should not be writing
kernel mode
> >software.
>
> Is this a personal thing between you and the poster of this question
> or does this apply to all people who use unexported kernel
functions,
> e.g. the guys at sysinternals, NuMega, …
> I mean, even these people may have started their dreadful hackery by
> asking someone a couple of questions and i (unlike you,
> right?) would surely miss their work!
>
> Cheers,
>
> Holger
>
> —
> You are currently subscribed to ntdev as:
> xxxxx@hollistech.com To unsubscribe send a blank email to
> leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com
>
>


You are currently subscribed to ntdev as: xxxxx@david-gmbh.de
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

Mark Roddy wrote:

The question was “how do I link undocumented kernel functions into my
application?”, not “how do I link undocumented kernel functions into my
driver?”, which the poster indicated he already knew how to do.

I’m sorry to say I indeed misread the original question. I’ll try to be more
careful next time.

If you think the actual question, not the one you misread, was legitimate,
please explain.

My objection to your answer didn’t have anything to do with whether I think
the original poster’s question was particularly smart or particularly dumb.
My objection was about the *way* you answered his question. I still think
the original poster’s question – however dumb or uninformed or
“mode-mixed-up” – is legitimate. It may be a stupid question, but it is on
topic and it deserves answering in a less condescending way.

There are people on this list with varying backgrounds. For some the
questions may be stupid, for some they may be very interesting. Sometimes
stupid questions lead to very interesting answers and discussions. For some
the answers may be completely incomprehensible, for some the answers may
bring solutions, and some may already know all the answers. Just remember
that when you’re about to post a “guys like you should not do
kernel-programming”-reply.

Hacking the kernel is in general a bad idea. There may be legitimate
reasons to use unexported functions, but typically the reasons are not
too good.

As a newbie I stay away from unexported functions. So I agree with you here.

However, a developer who does not understand the difference
between kernel mode and user mode, and who is asking how to link
unexported kernel functions into his application remains a
developer who
should not be doing kernel mode development until he has a much better
understanding of the basic concepts.

Absolutely. So you should’ve told him to go back to the literature (like
OSR’s book, or Dekker&Newcomer, or Solomon) and review the appropriate
chapters (usually the first 3 or so…)

cheers,

Gert-Jan


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

Ok, fair enough, I am frequently exasperated with these sorts of questions
and descend into rudeness. Guilty as charged. I’ll try to find a way to word
an appropriate response to the inappropriate in the future.

One small effort in my defense here, I have no problem with helping
‘newbies’ who are trying to do things the right way, I do it all the time.
It is the clueless person who is determined to violate the rules, WITH NO
UNDERSTANDING OF THE CONCEPTS, that sets me off. But you are right, I should
have been less rude.

-----Original Message-----
From: Gert-Jan Bartelds [mailto:xxxxx@Fenestrae.com]
Sent: Tuesday, December 18, 2001 8:16 AM
To: NT Developers Interest List
Subject: [ntdev] Re: how to use undocumented kernel functions

Mark Roddy wrote:

The question was “how do I link undocumented kernel functions into my
application?”, not “how do I link undocumented kernel functions into
my driver?”, which the poster indicated he already knew how to do.

I’m sorry to say I indeed misread the original question. I’ll try to be more
careful next time.

If you think the actual question, not the one you misread, was
legitimate, please explain.

My objection to your answer didn’t have anything to do with whether I think
the original poster’s question was particularly smart or particularly dumb.
My objection was about the *way* you answered his question. I still think
the original poster’s question – however dumb or uninformed or
“mode-mixed-up” – is legitimate. It may be a stupid question, but it is on
topic and it deserves answering in a less condescending way.

There are people on this list with varying backgrounds. For some the
questions may be stupid, for some they may be very interesting. Sometimes
stupid questions lead to very interesting answers and discussions. For some
the answers may be completely incomprehensible, for some the answers may
bring solutions, and some may already know all the answers. Just remember
that when you’re about to post a “guys like you should not do
kernel-programming”-reply.

Hacking the kernel is in general a bad idea. There may be legitimate
reasons to use unexported functions, but typically the reasons are not
too good.

As a newbie I stay away from unexported functions. So I agree with you here.

However, a developer who does not understand the difference between
kernel mode and user mode, and who is asking how to link unexported
kernel functions into his application remains a developer who
should not be doing kernel mode development until he has a much better
understanding of the basic concepts.

Absolutely. So you should’ve told him to go back to the literature (like
OSR’s book, or Dekker&Newcomer, or Solomon) and review the appropriate
chapters (usually the first 3 or so…)

cheers,

Gert-Jan


You are currently subscribed to ntdev as: xxxxx@stratus.com To
unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

Stick to your guns mark, be rude. Too many bad ideas are entertained on
this list for way too long because there is some half-baked way to make it
happen. Don’t be afraid to call a really bad idea a really bad idea.

Todd

-----Original Message-----
From: Roddy, Mark [mailto:xxxxx@stratus.com]
Sent: Tuesday, December 18, 2001 8:29 AM
To: NT Developers Interest List
Subject: [ntdev] Re: how to use undocumented kernel functions

Ok, fair enough, I am frequently exasperated with these sorts
of questions
and descend into rudeness. Guilty as charged. I’ll try to
find a way to word
an appropriate response to the inappropriate in the future.

One small effort in my defense here, I have no problem with helping
‘newbies’ who are trying to do things the right way, I do it
all the time.
It is the clueless person who is determined to violate the
rules, WITH NO
UNDERSTANDING OF THE CONCEPTS, that sets me off. But you are
right, I should
have been less rude.

-----Original Message-----
From: Gert-Jan Bartelds [mailto:xxxxx@Fenestrae.com]
Sent: Tuesday, December 18, 2001 8:16 AM
To: NT Developers Interest List
Subject: [ntdev] Re: how to use undocumented kernel functions

Mark Roddy wrote:

> The question was “how do I link undocumented kernel
functions into my
> application?”, not “how do I link undocumented kernel
functions into
> my driver?”, which the poster indicated he already knew how to do.

I’m sorry to say I indeed misread the original question. I’ll
try to be more
careful next time.

> If you think the actual question, not the one you misread, was
> legitimate, please explain.

My objection to your answer didn’t have anything to do with
whether I think
the original poster’s question was particularly smart or
particularly dumb.
My objection was about the *way* you answered his question. I
still think
the original poster’s question – however dumb or uninformed or
“mode-mixed-up” – is legitimate. It may be a stupid
question, but it is on
topic and it deserves answering in a less condescending way.

There are people on this list with varying backgrounds. For some the
questions may be stupid, for some they may be very
interesting. Sometimes
stupid questions lead to very interesting answers and
discussions. For some
the answers may be completely incomprehensible, for some the
answers may
bring solutions, and some may already know all the answers.
Just remember
that when you’re about to post a “guys like you should not do
kernel-programming”-reply.

> Hacking the kernel is in general a bad idea. There may be
legitimate
> reasons to use unexported functions, but typically the
reasons are not
> too good.

As a newbie I stay away from unexported functions. So I agree
with you here.

> However, a developer who does not understand the difference between
> kernel mode and user mode, and who is asking how to link unexported
> kernel functions into his application remains a developer who
> should not be doing kernel mode development until he has a
much better
> understanding of the basic concepts.

Absolutely. So you should’ve told him to go back to the
literature (like
OSR’s book, or Dekker&Newcomer, or Solomon) and review the appropriate
chapters (usually the first 3 or so…)

cheers,

Gert-Jan


You are currently subscribed to ntdev as: xxxxx@stratus.com To
unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntdev as: xxxxx@greshamstorage.com
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

Well rudeness is wrong. However I only said that I would *try* to find
appropriate responses to the inappropriate. I suspect I will continue to
fail :slight_smile:

-----Original Message-----
From: Todd Flanagan [mailto:xxxxx@greshamstorage.com]
Sent: Tuesday, December 18, 2001 9:11 AM
To: NT Developers Interest List
Subject: [ntdev] Re: how to use undocumented kernel functions

Stick to your guns mark, be rude. Too many bad ideas are entertained on
this list for way too long because there is some half-baked way to make it
happen. Don’t be afraid to call a really bad idea a really bad idea.

Todd

-----Original Message-----
From: Roddy, Mark [mailto:xxxxx@stratus.com]
Sent: Tuesday, December 18, 2001 8:29 AM
To: NT Developers Interest List
Subject: [ntdev] Re: how to use undocumented kernel functions

Ok, fair enough, I am frequently exasperated with these sorts
of questions
and descend into rudeness. Guilty as charged. I’ll try to
find a way to word
an appropriate response to the inappropriate in the future.

One small effort in my defense here, I have no problem with helping
‘newbies’ who are trying to do things the right way, I do it all the
time. It is the clueless person who is determined to violate the
rules, WITH NO
UNDERSTANDING OF THE CONCEPTS, that sets me off. But you are
right, I should
have been less rude.

-----Original Message-----
From: Gert-Jan Bartelds [mailto:xxxxx@Fenestrae.com]
Sent: Tuesday, December 18, 2001 8:16 AM
To: NT Developers Interest List
Subject: [ntdev] Re: how to use undocumented kernel functions

Mark Roddy wrote:

> The question was “how do I link undocumented kernel
functions into my
> application?”, not “how do I link undocumented kernel
functions into
> my driver?”, which the poster indicated he already knew how to do.

I’m sorry to say I indeed misread the original question. I’ll
try to be more
careful next time.

> If you think the actual question, not the one you misread, was
> legitimate, please explain.

My objection to your answer didn’t have anything to do with
whether I think
the original poster’s question was particularly smart or
particularly dumb.
My objection was about the *way* you answered his question. I
still think
the original poster’s question – however dumb or uninformed or
“mode-mixed-up” – is legitimate. It may be a stupid
question, but it is on
topic and it deserves answering in a less condescending way.

There are people on this list with varying backgrounds. For some the
questions may be stupid, for some they may be very interesting.
Sometimes stupid questions lead to very interesting answers and
discussions. For some
the answers may be completely incomprehensible, for some the
answers may
bring solutions, and some may already know all the answers.
Just remember
that when you’re about to post a “guys like you should not do
kernel-programming”-reply.

> Hacking the kernel is in general a bad idea. There may be
legitimate
> reasons to use unexported functions, but typically the
reasons are not
> too good.

As a newbie I stay away from unexported functions. So I agree
with you here.

> However, a developer who does not understand the difference between
> kernel mode and user mode, and who is asking how to link unexported
> kernel functions into his application remains a developer who
> should not be doing kernel mode development until he has a
much better
> understanding of the basic concepts.

Absolutely. So you should’ve told him to go back to the
literature (like
OSR’s book, or Dekker&Newcomer, or Solomon) and review the appropriate
chapters (usually the first 3 or so…)

cheers,

Gert-Jan


You are currently subscribed to ntdev as: xxxxx@stratus.com To
unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntdev as: xxxxx@greshamstorage.com
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntdev as: xxxxx@stratus.com To
unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

> -----Original Message-----

From: Roddy, Mark [mailto:xxxxx@stratus.com]
Sent: Tuesday, December 18, 2001 3:08 PM
To: NT Developers Interest List
Subject: [ntdev] Re: how to use undocumented kernel functions

Well rudeness is wrong. However I only said that I would *try* to find
appropriate responses to the inappropriate. I suspect I will
continue to fail :slight_smile:

I like that :slight_smile:

Gert-Jan


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

Oh come on Mark, no you won’t. You’re a curmudgeon — just like me,
although I’m the one with the potty mouth.

We need curmudgeons. We add spice to what would otherwise be a very bland
diatribe. :slight_smile:

Gary G. Little
Broadband Storage, Inc.
xxxxx@broadstor.com
xxxxx@inland.net
(949) 7372731

-----Original Message-----
From: Roddy, Mark [mailto:xxxxx@stratus.com]
Sent: Tuesday, December 18, 2001 5:29 AM
To: NT Developers Interest List
Subject: [ntdev] Re: how to use undocumented kernel functions

Ok, fair enough, I am frequently exasperated with these sorts of questions
and descend into rudeness. Guilty as charged. I’ll try to find a way to word
an appropriate response to the inappropriate in the future.

One small effort in my defense here, I have no problem with helping
‘newbies’ who are trying to do things the right way, I do it all the time.
It is the clueless person who is determined to violate the rules, WITH NO
UNDERSTANDING OF THE CONCEPTS, that sets me off. But you are right, I should
have been less rude.

-----Original Message-----
From: Gert-Jan Bartelds [mailto:xxxxx@Fenestrae.com]
Sent: Tuesday, December 18, 2001 8:16 AM
To: NT Developers Interest List
Subject: [ntdev] Re: how to use undocumented kernel functions

Mark Roddy wrote:

The question was “how do I link undocumented kernel functions into my
application?”, not “how do I link undocumented kernel functions into
my driver?”, which the poster indicated he already knew how to do.

I’m sorry to say I indeed misread the original question. I’ll try to be more
careful next time.

If you think the actual question, not the one you misread, was
legitimate, please explain.

My objection to your answer didn’t have anything to do with whether I think
the original poster’s question was particularly smart or particularly dumb.
My objection was about the *way* you answered his question. I still think
the original poster’s question – however dumb or uninformed or
“mode-mixed-up” – is legitimate. It may be a stupid question, but it is on
topic and it deserves answering in a less condescending way.

There are people on this list with varying backgrounds. For some the
questions may be stupid, for some they may be very interesting. Sometimes
stupid questions lead to very interesting answers and discussions. For some
the answers may be completely incomprehensible, for some the answers may
bring solutions, and some may already know all the answers. Just remember
that when you’re about to post a “guys like you should not do
kernel-programming”-reply.

Hacking the kernel is in general a bad idea. There may be legitimate
reasons to use unexported functions, but typically the reasons are not
too good.

As a newbie I stay away from unexported functions. So I agree with you here.

However, a developer who does not understand the difference between
kernel mode and user mode, and who is asking how to link unexported
kernel functions into his application remains a developer who
should not be doing kernel mode development until he has a much better
understanding of the basic concepts.

Absolutely. So you should’ve told him to go back to the literature (like
OSR’s book, or Dekker&Newcomer, or Solomon) and review the appropriate
chapters (usually the first 3 or so…)

cheers,

Gert-Jan


You are currently subscribed to ntdev as: xxxxx@stratus.com To
unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntdev as: xxxxx@broadstor.com
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

Like filtering SCSIPORT to get around SCSIPORT limitations?

Jamey

-----Original Message-----
From: Roddy, Mark [mailto:xxxxx@stratus.com]
Sent: Tuesday, December 18, 2001 5:29 AM
To: NT Developers Interest List
Subject: [ntdev] Re: how to use undocumented kernel functions

Ok, fair enough, I am frequently exasperated with these sorts of
questions and descend into rudeness. Guilty as charged. I’ll try to find
a way to word an appropriate response to the inappropriate in the
future.

One small effort in my defense here, I have no problem with helping
‘newbies’ who are trying to do things the right way, I do it all the
time. It is the clueless person who is determined to violate the rules,
WITH NO UNDERSTANDING OF THE CONCEPTS, that sets me off. But you are
right, I should have been less rude.

-----Original Message-----
From: Gert-Jan Bartelds [mailto:xxxxx@Fenestrae.com]
Sent: Tuesday, December 18, 2001 8:16 AM
To: NT Developers Interest List
Subject: [ntdev] Re: how to use undocumented kernel functions

Mark Roddy wrote:

The question was “how do I link undocumented kernel functions into my
application?”, not “how do I link undocumented kernel functions into
my driver?”, which the poster indicated he already knew how to do.

I’m sorry to say I indeed misread the original question. I’ll try to be
more careful next time.

If you think the actual question, not the one you misread, was
legitimate, please explain.

My objection to your answer didn’t have anything to do with whether I
think the original poster’s question was particularly smart or
particularly dumb. My objection was about the *way* you answered his
question. I still think the original poster’s question – however dumb
or uninformed or “mode-mixed-up” – is legitimate. It may be a stupid
question, but it is on topic and it deserves answering in a less
condescending way.

There are people on this list with varying backgrounds. For some the
questions may be stupid, for some they may be very interesting.
Sometimes stupid questions lead to very interesting answers and
discussions. For some the answers may be completely incomprehensible,
for some the answers may bring solutions, and some may already know all
the answers. Just remember that when you’re about to post a “guys like
you should not do kernel-programming”-reply.

Hacking the kernel is in general a bad idea. There may be legitimate
reasons to use unexported functions, but typically the reasons are not

too good.

As a newbie I stay away from unexported functions. So I agree with you
here.

However, a developer who does not understand the difference between
kernel mode and user mode, and who is asking how to link unexported
kernel functions into his application remains a developer who
should not be doing kernel mode development until he has a much better
understanding of the basic concepts.

Absolutely. So you should’ve told him to go back to the literature (like
OSR’s book, or Dekker&Newcomer, or Solomon) and review the appropriate
chapters (usually the first 3 or so…)

cheers,

Gert-Jan


You are currently subscribed to ntdev as: xxxxx@stratus.com To
unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntdev as: xxxxx@broadstor.com To
unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntdev as: xxxxx@storagecraft.com To
unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

OK fine you are having a bad day indeed. Could you please explain what
exactly is improper about writing a filter driver in order to modify the
behavior of a standard driver?

-----Original Message-----
From: Jamey Kirby [mailto:xxxxx@storagecraft.com]
Sent: Tuesday, December 11, 2001 12:32 PM
To: NT Developers Interest List
Subject: [ntdev] Re: how to use undocumented kernel functions

Like filtering SCSIPORT to get around SCSIPORT limitations?

Jamey

-----Original Message-----
From: Roddy, Mark [mailto:xxxxx@stratus.com]
Sent: Tuesday, December 18, 2001 5:29 AM
To: NT Developers Interest List
Subject: [ntdev] Re: how to use undocumented kernel functions

Ok, fair enough, I am frequently exasperated with these sorts of questions
and descend into rudeness. Guilty as charged. I’ll try to find a way to word
an appropriate response to the inappropriate in the future.

One small effort in my defense here, I have no problem with helping
‘newbies’ who are trying to do things the right way, I do it all the time.
It is the clueless person who is determined to violate the rules, WITH NO
UNDERSTANDING OF THE CONCEPTS, that sets me off. But you are right, I should
have been less rude.

-----Original Message-----
From: Gert-Jan Bartelds [mailto:xxxxx@Fenestrae.com]
Sent: Tuesday, December 18, 2001 8:16 AM
To: NT Developers Interest List
Subject: [ntdev] Re: how to use undocumented kernel functions

Mark Roddy wrote:

The question was “how do I link undocumented kernel functions into my
application?”, not “how do I link undocumented kernel functions into
my driver?”, which the poster indicated he already knew how to do.

I’m sorry to say I indeed misread the original question. I’ll try to be more
careful next time.

If you think the actual question, not the one you misread, was
legitimate, please explain.

My objection to your answer didn’t have anything to do with whether I think
the original poster’s question was particularly smart or particularly dumb.
My objection was about the *way* you answered his question. I still think
the original poster’s question – however dumb or uninformed or
“mode-mixed-up” – is legitimate. It may be a stupid question, but it is on
topic and it deserves answering in a less condescending way.

There are people on this list with varying backgrounds. For some the
questions may be stupid, for some they may be very interesting. Sometimes
stupid questions lead to very interesting answers and discussions. For some
the answers may be completely incomprehensible, for some the answers may
bring solutions, and some may already know all the answers. Just remember
that when you’re about to post a “guys like you should not do
kernel-programming”-reply.

Hacking the kernel is in general a bad idea. There may be legitimate
reasons to use unexported functions, but typically the reasons are not

too good.

As a newbie I stay away from unexported functions. So I agree with you here.

However, a developer who does not understand the difference between
kernel mode and user mode, and who is asking how to link unexported
kernel functions into his application remains a developer who should
not be doing kernel mode development until he has a much better
understanding of the basic concepts.

Absolutely. So you should’ve told him to go back to the literature (like
OSR’s book, or Dekker&Newcomer, or Solomon) and review the appropriate
chapters (usually the first 3 or so…)

cheers,

Gert-Jan


You are currently subscribed to ntdev as: xxxxx@stratus.com To
unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntdev as: xxxxx@broadstor.com To
unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntdev as: xxxxx@storagecraft.com To
unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntdev as: xxxxx@stratus.com To
unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

sorry,what I want to know is how to link undocumented functions(such as
KeI386AllocateGdtSelectors) into a sys driver,not into a program!please
tell me the steps in detail.Thanks!


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

You do not need any additional steps to do this - they are already in NTOSKRNL.LIB.

Max

----- Original Message -----
From:
To: “NT Developers Interest List”
Sent: Wednesday, December 19, 2001 2:34 AM
Subject: [ntdev] how to use undocumented kernel functions

> sorry,what I want to know is how to link undocumented functions(such as
> KeI386AllocateGdtSelectors) into a sys driver,not into a program!please
> tell me the steps in detail.Thanks!
>
> —
> You are currently subscribed to ntdev as: xxxxx@storagecraft.com
> To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com
>


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com