Does anybody have a code snippet that shows how to generate a GUID in a
kernel-mode driver?

Thank you

Re: Creating a GUID in Kernel-mode by Walter

Walter
Wed Feb 25 15:51:56 CST 2004

Michael Pierce wrote:
> Does anybody have a code snippet that shows how to generate a GUID in a
> kernel-mode driver?

I'll bite. Why do you need to do this?

--
Walter Oney, Consulting and Training
Basic and Advanced Driver Programming Seminars
Check out our schedule at http://www.oneysoft.com

Re: Creating a GUID in Kernel-mode by Mark

Mark
Wed Feb 25 18:59:31 CST 2004

Well I can think of a reason why it would have been useful for some stuff I
was working on, as I needed a new guid, and waiting for the system to be
started enough for a service to provide the guid was a bit annoying. I ended
up working around my problem, but the solution was a bit compromised.

--

=====================
Mark Roddy
Windows 2003/XP/2000 Consulting
Hollis Technology Solutions 603-321-1032
www.hollistech.com
markr@hollistech.com


"Walter Oney" <waltoney@oneysoft.com> wrote in message
news:403D18FC.6F091F1A@oneysoft.com...
> Michael Pierce wrote:
> > Does anybody have a code snippet that shows how to generate a GUID in a
> > kernel-mode driver?
>
> I'll bite. Why do you need to do this?
>
> --
> Walter Oney, Consulting and Training
> Basic and Advanced Driver Programming Seminars
> Check out our schedule at http://www.oneysoft.com



Re: Creating a GUID in Kernel-mode by Don

Don
Wed Feb 25 19:17:01 CST 2004

Actually, I'm struggling with this now for a customer, who needs to map some
data to unique tags with restrictions that going to user space would make
impossible.

--
Don Burn (MVP, Windows DDK)
Windows 2k/XP/2k3 Filesystem and Driver Consulting
Remove StopSpam from the email to reply

"Mark Roddy" <markr@hollistech.com> wrote in message
news:eG3PMPA$DHA.3120@TK2MSFTNGP11.phx.gbl...
> Well I can think of a reason why it would have been useful for some stuff
I
> was working on, as I needed a new guid, and waiting for the system to be
> started enough for a service to provide the guid was a bit annoying. I
ended
> up working around my problem, but the solution was a bit compromised.
>
> --
>
> =====================
> Mark Roddy
> Windows 2003/XP/2000 Consulting
> Hollis Technology Solutions 603-321-1032
> www.hollistech.com
> markr@hollistech.com
>
>
> "Walter Oney" <waltoney@oneysoft.com> wrote in message
> news:403D18FC.6F091F1A@oneysoft.com...
> > Michael Pierce wrote:
> > > Does anybody have a code snippet that shows how to generate a GUID in
a
> > > kernel-mode driver?
> >
> > I'll bite. Why do you need to do this?
> >
> > --
> > Walter Oney, Consulting and Training
> > Basic and Advanced Driver Programming Seminars
> > Check out our schedule at http://www.oneysoft.com
>
>



Re: Creating a GUID in Kernel-mode by Eliyas

Eliyas
Wed Feb 25 19:23:06 CST 2004


ExUuidCreate

--
-Eliyas
This posting is provided "AS IS" with no warranties, and confers no rights.
http://www.microsoft.com/whdc/hwdev/driver/kb-drv.mspx




Re: Creating a GUID in Kernel-mode by Walter

Walter
Wed Feb 25 21:02:38 CST 2004

"Eliyas Yakub [MSFT]" wrote:
> ExUuidCreate

Duh. But why is it useful?

--
Walter Oney, Consulting and Training
Basic and Advanced Driver Programming Seminars
Check out our schedule at http://www.oneysoft.com

Re: Creating a GUID in Kernel-mode by Brian

Brian
Wed Feb 25 22:42:48 CST 2004

"Walter Oney" <waltoney@oneysoft.com> wrote in message
news:403D61CE.EDC93989@oneysoft.com...
> "Eliyas Yakub [MSFT]" wrote:
> > ExUuidCreate
>
> Duh. But why is it useful?

Say you're building widgets, and you want each widget to have a unique serial
number. Most devices have a EEPROM, so use 16 bytes for a serial number (GUID).
The first time a driver sees a device with its serial number all zeros, generate
a GUID and write it to the device. Now the device has a guaranteed unique
serial number.

-Brian

Brian Catlin, Sannas Consulting 310-944-9492
Windows Network, Video, WDM Device Driver Training & Consulting
See WWW.AZIUS.COM.bad for courses and scheduling
REMOVE .BAD FROM EMAIL AND WEB ADDRESS



Re: Creating a GUID in Kernel-mode by Tobias

Tobias
Thu Feb 26 01:23:41 CST 2004


"Walter Oney" <waltoney@oneysoft.com> schrieb im Newsbeitrag
news:403D61CE.EDC93989@oneysoft.com...
> "Eliyas Yakub [MSFT]" wrote:
> > ExUuidCreate
>
> Duh. But why is it useful?

For example: we have implemented a whole H.323 stack in kernel-mode.
Within the H.225 communication there is the need to exchange guids...

Tobias



Re: Creating a GUID in Kernel-mode by Mark

Mark
Thu Feb 26 19:28:30 CST 2004

Or you have multiple devices each with unique serial numbers, but you want
to hide all of these devices using a virtual device and it needs a unique
serial number too, and it can't use any of the physical device serial
numbers because those can all go away and appear elsewhere. What's a poor
kernel programmer to do? Do a guid!

--

=====================
Mark Roddy
Windows 2003/XP/2000 Consulting
Hollis Technology Solutions 603-321-1032
www.hollistech.com
markr@hollistech.com


"Walter Oney" <waltoney@oneysoft.com> wrote in message
news:403D61CE.EDC93989@oneysoft.com...
> "Eliyas Yakub [MSFT]" wrote:
> > ExUuidCreate
>
> Duh. But why is it useful?
>
> --
> Walter Oney, Consulting and Training
> Basic and Advanced Driver Programming Seminars
> Check out our schedule at http://www.oneysoft.com



Re: Creating a GUID in Kernel-mode by Maxim

Maxim
Sat Feb 28 10:59:41 CST 2004

> The first time a driver sees a device with its serial number all zeros,
generate
> a GUID and write it to the device. Now the device has a guaranteed unique
> serial number.

Ha-ha-ha!

If the talk is about USB devices, then this will give the same behaviour as
missing the unique ID at all. In both cases, you will have a new device each
re-insert :)

--
Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
maxim@storagecraft.com
http://www.storagecraft.com



Re: Creating a GUID in Kernel-mode by Maxim

Maxim
Sat Feb 28 10:57:57 CST 2004

ExUuidCreate for w2k and later.

Looks impossible on NT4.

--
Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
maxim@storagecraft.com
http://www.storagecraft.com


"Michael Pierce" <Michael.Pierce@_RE_MOVE_tentechnologies.com> wrote in message
news:T85%b.83546$n62.61979@twister.nyroc.rr.com...
> Does anybody have a code snippet that shows how to generate a GUID in a
> kernel-mode driver?
>
> Thank you
>
>