Win NT Kernel Mode Driver Help needed
You guys are such good teachers, I wanted to do something a little more difficult.
I would like to make this workable for Win 98.
Thanks.
;:::::::::::::::::::::::::::::::::::::::::::::::::
::::::::::::::::::::::::::::::::::::::::::::::::::
;
; beeper.asm - Kernel Mode Driver for Windows NT
; Makes beep thorough computer speaker
;
;:::::::::::::::::::::::::::::::::::::::::::::::::
::::::::::::::::::::::::::::::::::::::::::::::::::
386
model flat, stdcall
option casemap:none
;:::::::::::::::::::::::::::::::::::::::::::::::::
::::::::::::::::::::::::::::::::::::::...
Finding Job Info for a Kernel mode printer driver under Win NT 4We are writing a plugin for a kernel mode MS (Adobe) PostScript
driver for windows NT. In kernel mode the normal win32 functions
to EnumPrinters and EnumJobs are not allowed. Is there some
other way to get this info in kernel mode? We need to get JobID,
The Submission string, Date, user, machine name, Document,
and number of pages.
d02@whidbey.coom wrote:
> We are writing a plugin for a kernel mode MS (Adobe) PostScript
> driver for windows NT. In kernel mode the normal win32 functions
> to EnumPrinters and EnumJobs are not allowed. Is there some
> other way to ...
create custom network packethi @all
I would like to create a custom network packet with:
layer 2: ethernet
layer 3: ip
At first, I want to create a ip packet and set some header fields (for
example the TOS-byte) by myself. After that, I take the created
ip-packet and nest it into a new ethernet packet, which I create too.
Also, I would like to change the header fields in the ethernet packet
(e.g. cos-field). Over a raw socket, I'll send the packet to a other
station in the network.
Has anyone a solution or any experience? thanks for help...
--
Posted via http://www.ruby-forum.com/.
On Oct 13, 2007, at 3:46 AM,...
inet_ntoa in nt kernel mode ??I need DebugPrint ip address in Ascii string not long or int number.
When we programe application in user mode , we can use inet_ntoa. How
can we do in kernel mode ?
I try to write the same code of inet_ntoa as user mode application .
but it seems we can't use sprintf function either.
// ip print function (not thread safe )
char * inet_ntoa(unsigned int ip_addr)
{
int i ;
static char str_ip_addr[16];
char * p_addr=(char*)&ip_addr;
for(i=0;i<(sizeof(unsigned int )/sizeof(char));i++)
{
sprintf(str_ip_addr,"%u",&p_addr);
}
return str_ip_addr;
}
...
NT kernel-mode stackI was playing with a sample driver trying to create a kernel stack
overflow crash-dump by making my IRP_MJ_READ handler call another
function coded as:
void pkk_crash (void)
{
static int i = 0;
char a [x]; // x = various values [I tried upto 10MB]
pkk_crash (); // infinite recursion
}
What I observed was this:
1) If I do only this much then I see 100% CPU utilization, almost all
in kernel, till the system started to rearrange virtual memory size
(when I got impatient and rebooted by hand)
2) If I add a statement in the code such as
DbgPrint ("addr of a = %p\n",...
Win Win Win Win......Win Win Win Win......
Win cash Rs.10,000.
SMS BLUFF to 57333 (Only For Indian)
Free Registration! -
Register here Free:- http://offr.biz/HLDDT337130BVGMJPF
(....Free Offer is Valid Only For First 250 members who Registered...)
-------------------------------------------------------------------------------
...
Tests on com1 in kernel mode (Win XP)Hello,
I'm doing some tests under XP, but the results seem strange.
In a kernel mode driver, I must be able to directly access the IO ports,
isn't it ? So I make direct access to ports corresponding to com1 (I know
it's not regular, but this is for tests only), ie 3F8 to 3FF.
IO write seem to have no effect, IO read always give FF.
If I make the same test while Hyperterminal is running, results seem to be
OK !!!
Com1 works properly when used by Windows XP (Hyperterminal for example). The
resources used are really 3F8 to 3FF.
I supposed the problem might be that th...
Kernel mode or user modeAfter the shared memory (memory mapped file) has been created and a
pointer (void* m_Ptr) associated to the view of the shared memory
(MapViewOfFIle).
Is reading or writing the pointer (m_Ptr) a kernel mode or a user mode
operation?
Thanks
Amit
"amit gulati" <amitgulati@cox.net> wrote in message
news:c1qgil$ahg$1@news2.news.larc.nasa.gov...
> After the shared memory (memory mapped file) has been created and a
> pointer (void* m_Ptr) associated to the view of the shared memory
> (MapViewOfFIle).
>
> Is reading or writing the pointer (m_Ptr...
User Mode and Kernel ModeHi,
Its a old question, and still haunts me some times.
How does the OS change from the user mode to kernel mode.
As per some or the books we have the Assembly call "trap" which actually
changes the OS mode to kernel mode.
So we have the System call which calls the trap somewhere down the line to
change the mode.
The Kernel Address space and the User Address space are two different area
and they information is transferred though proc structures.
In the same line what are executions modes which are hardware related.
Intel hardware have more than 3 executions mo...
Is there a way to create and write to a file while operating in kernel mode?
Hi...
Is there a way to create and write to a file while operating in kernel
mode which can later be accessed in user mode for viewing kernel
supplied information? Do we have to use ZwCreateFile and ZwWriteFile
to achieve the same?
Actually I am performing local kernel debugging using windbg and
viewing the output of various DbgPrint statements using debugger
command: "!dbgprint".
The problem I am facing here is that it looks like the DbgPrint buffer
is too small and the output of previous DbgPrint's overlaps/overwrites
the current DbgPrint output making things di...
How to send a tcp packet to same machine from a kernel module by creating a sk_buff structHi all,
Can somebody tell me or point me to correct resource .
I want to know how can i send a fabricated TCP packet from my kernel
module using
sk_buff . So basically how do i create this struct, make it look like a
sk_buff having incoming
tcp packet on some device and add it to queue from which sk_buff are
processed by upper layers. So kernel TCP layer should see it as normal
packet.
Thanks,
TellMeMore
...
pthread is user mode thread, right?How can I create a kernel thread?Thanks,
On 2005-06-12, yijun_lily@yahoo.com <yijun_lily@yahoo.com> wrote:
> pthread is user mode thread, right?
Maybe. That depends on what you mean by "user mode". A
pthread thread executes in user-mode. If you want code to
execute in kernel-mode you're going to have to write a driver
module.
> How can I create a kernel thread?
What do you mean by "kernel thread" and why do you want to
create one?
--
Grant Edwards grante Yow! In Newark the
at laundromats are open 24
...
Can't access NT service created kernel object on VistaHi All,
I have app1 and app2. app1 create some kernel objects (events). If
app1 runs in normal (as a console program) the app2 can access those
objects using OpenEvents. If app2 runs in service mode the OpenEvent
returns error #2 (system can't find the file specified). I already
pass a SECURITY_ATTRIBUTES struct with a NULL DACL to CreateEvent in
app1 in order that the kernel objects created in nt service can be
accessed by any app. I don't have a such a problem on Windows XP,
only on Vista.
Many thanks
Timmy
...
Linux : How to send a tcp packet to same machine from a kernel module by creating a sk_buff structHi all,
Can somebody tell me or point me to correct resource .
I want to know how can i send a fabricated TCP packet from my kernel
module using
sk_buff . So basically how do i create this struct, make it look like a
sk_buff having incoming
tcp packet on some device and add it to queue from which sk_buff are
processed by upper layers. So kernel TCP layer should see it as normal
packet.
Thanks,
TellMeMore
...