From - Fri Sep 12 10:09:06 1997
Path: news.mitre.org!blanket.mitre.org!nntprelay.mathworks.com!howland.erols.net!usc!newshub.cts.com!relief.cts.com!not-for-mail
From: "Jamey Kirby" <jkirby@gloryroad.net>
Newsgroups: comp.os.ms-windows.programmer.nt.kernel-mode
Subject: Re: starting another driver in kernel-mode
Date: Wed, 27 Aug 1997 08:37:34 -0700
Organization: CTS Network Services
Lines: 37
Message-ID: <872696151.692056@optional.cts.com>
References: <3403D6A1.EFCC2246@nmp.nokia.com>
NNTP-Posting-Host: optional.cts.com
X-Newsreader: Microsoft Outlook Express 4.71.1008.3
X-MimeOle: Produced By Microsoft MimeOLE Engine V4.71.1008.3
Cache-Post-Path: optional.cts.com!unknown@jkirby.cts.com

Here is some sample code that will load another driver. ZwLoadDriver() is
undocumented, so you must first provide a prototype.

sprintf(ntNameBuffer,
"\\REGISTRY\\Machine\\System\\CurrentControlSet\\Services\\YourDriver");

RtlInitString(&ntNameString, ntNameBuffer);

ntStatus = RtlAnsiStringToUnicodeString (
            &ntUnicodeString,
            &ntNameString,
            TRUE);

ntStatus = ZwLoadDriver(&ntUnicodeString);

RtlFreeUnicodeString(&ntUnicodeString);

Hope this helps,

Jamey Kirby
Senior Partner
Magnuson, Kirby & Associates, LLC.
jkirby@gloryroad.net


Mikko Jaakkola wrote in article <3403D6A1.EFCC2246@nmp.nokia.com>...

>Hi everybody!
>
>I need to start another driver through my driver in kernel-mode. What
>would be the best way to do such thing? Will the driver starting status
>"automatic" do it automatically when open is called for the driver?
>
>Regards, Mikko Jaakkola, Nokia Mobile Phones Ltd.
>


