UMDF - CreateSymbolicLink for an user

Is it possible to create a symbolic link to for an user, or all users, from
a UMDF driver to \DosDevice\k: or simulair?

Was thinking using Impersonate, but the driver fails and restart as soon
as I use the device object in the impersonate callback.
Creating files or simulair works as impersonated user,
but not creating a symbolic link.

Perhaps there is an easier way also. Like using DefineDosDevice to a
special interface in the user mode app?

Regards,
Daniel

You cannot make any object calls in the impersonation callback.

What happens when you call IWDFDevice::CreateSymbolicLink outside of impersonation?

-p

From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Daniel ?berg
Sent: Thursday, October 11, 2007 12:45 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] UMDF - CreateSymbolicLink for an user

Is it possible to create a symbolic link to for an user, or all users, from
a UMDF driver to \DosDevice\k<file:>: or simulair?

Was thinking using Impersonate, but the driver fails and restart as soon
as I use the device object in the impersonate callback.
Creating files or simulair works as impersonated user,
but not creating a symbolic link.

Perhaps there is an easier way also. Like using DefineDosDevice to a
special interface in the user mode app?

Regards,
Daniel


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</file:>

Well, first let’s say that I’m running on Windows Vista, with DDK 6000.

The call to CreateSymbolicLink goes successfull but I assume that the
link is created for the localservice account, because my normal user
never recieves any new device letter. Therefore my Impersonate idea.

But hopefully there is a better way?

Daniel
“Peter Wieland” skrev i meddelandet news:xxxxx@ntdev…
You cannot make any object calls in the impersonation callback.

What happens when you call IWDFDevice::CreateSymbolicLink outside of impersonation?

-p

From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Daniel ?berg
Sent: Thursday, October 11, 2007 12:45 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] UMDF - CreateSymbolicLink for an user

Is it possible to create a symbolic link to for an user, or all users, from

a UMDF driver to \DosDevice\k: or simulair?

Was thinking using Impersonate, but the driver fails and restart as soon

as I use the device object in the impersonate callback.

Creating files or simulair works as impersonated user,

but not creating a symbolic link.

Perhaps there is an easier way also. Like using DefineDosDevice to a

special interface in the user mode app?

Regards,

Daniel


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

What path are you providing for your symbolic link?

-p

From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Daniel ?berg
Sent: Thursday, October 11, 2007 1:45 PM
To: Windows System Software Devs Interest List
Subject: Re:[ntdev] UMDF - CreateSymbolicLink for an user

Well, first let’s say that I’m running on Windows Vista, with DDK 6000.

The call to CreateSymbolicLink goes successfull but I assume that the
link is created for the localservice account, because my normal user
never recieves any new device letter. Therefore my Impersonate idea.

But hopefully there is a better way?

Daniel
“Peter Wieland” > skrev i meddelandet news:xxxxx@ntdev…
You cannot make any object calls in the impersonation callback.

What happens when you call IWDFDevice::CreateSymbolicLink outside of impersonation?

-p

From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Daniel ?berg
Sent: Thursday, October 11, 2007 12:45 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] UMDF - CreateSymbolicLink for an user

Is it possible to create a symbolic link to for an user, or all users, from
a UMDF driver to \DosDevice\k<file:>: or simulair?

Was thinking using Impersonate, but the driver fails and restart as soon
as I use the device object in the impersonate callback.
Creating files or simulair works as impersonated user,
but not creating a symbolic link.

Perhaps there is an easier way also. Like using DefineDosDevice to a
special interface in the user mode app?

Regards,
Daniel


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


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</file:>

Tried \DosDevice\k: and also \DosDevice\Global\k:
and of course is these not used before.

Also tried with DefineDosDevice, but was not really sure what to
use for path here. It feels like it worked a bit different in the WDM
time…

Daniel
“Peter Wieland” skrev i meddelandet news:xxxxx@ntdev…
What path are you providing for your symbolic link?

-p

From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Daniel ?berg
Sent: Thursday, October 11, 2007 1:45 PM
To: Windows System Software Devs Interest List
Subject: Re:[ntdev] UMDF - CreateSymbolicLink for an user

Well, first let’s say that I’m running on Windows Vista, with DDK 6000.

The call to CreateSymbolicLink goes successfull but I assume that the

link is created for the localservice account, because my normal user

never recieves any new device letter. Therefore my Impersonate idea.

But hopefully there is a better way?

Daniel

“Peter Wieland” skrev i meddelandet news:xxxxx@ntdev…

You cannot make any object calls in the impersonation callback.

What happens when you call IWDFDevice::CreateSymbolicLink outside of impersonation?

-p

From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Daniel ?berg
Sent: Thursday, October 11, 2007 12:45 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] UMDF - CreateSymbolicLink for an user

Is it possible to create a symbolic link to for an user, or all users, from

a UMDF driver to \DosDevice\k: or simulair?

Was thinking using Impersonate, but the driver fails and restart as soon

as I use the device object in the impersonate callback.

Creating files or simulair works as impersonated user,

but not creating a symbolic link.

Perhaps there is an easier way also. Like using DefineDosDevice to a

special interface in the user mode app?

Regards,

Daniel


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


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

Just a guess, but you probably have to communicate with the mountmanager to dynamically bring drive letters online.

d

From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Daniel ?berg
Sent: Thursday, October 11, 2007 3:15 PM
To: Windows System Software Devs Interest List
Subject: Re:[ntdev] Re:UMDF - CreateSymbolicLink for an user

Tried \DosDevice\k<file:>: and also \DosDevice\Global\k<file:>:
and of course is these not used before.

Also tried with DefineDosDevice, but was not really sure what to
use for path here. It feels like it worked a bit different in the WDM
time…

Daniel
“Peter Wieland” > skrev i meddelandet news:xxxxx@ntdev…
What path are you providing for your symbolic link?

-p

From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Daniel ?berg
Sent: Thursday, October 11, 2007 1:45 PM
To: Windows System Software Devs Interest List
Subject: Re:[ntdev] UMDF - CreateSymbolicLink for an user

Well, first let’s say that I’m running on Windows Vista, with DDK 6000.

The call to CreateSymbolicLink goes successfull but I assume that the
link is created for the localservice account, because my normal user
never recieves any new device letter. Therefore my Impersonate idea.

But hopefully there is a better way?

Daniel
“Peter Wieland” > skrev i meddelandet news:xxxxx@ntdev…
You cannot make any object calls in the impersonation callback.

What happens when you call IWDFDevice::CreateSymbolicLink outside of impersonation?

-p

From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Daniel ?berg
Sent: Thursday, October 11, 2007 12:45 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] UMDF - CreateSymbolicLink for an user

Is it possible to create a symbolic link to for an user, or all users, from
a UMDF driver to \DosDevice\k<file:>: or simulair?

Was thinking using Impersonate, but the driver fails and restart as soon
as I use the device object in the impersonate callback.
Creating files or simulair works as impersonated user,
but not creating a symbolic link.

Perhaps there is an easier way also. Like using DefineDosDevice to a
special interface in the user mode app?

Regards,
Daniel


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


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


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</file:></file:></file:>

You might want to look at IOCTL_MOUNTMGR_NEXT_DRIVE_LETTER is the WDK, and mountmgr.h.

Good luck,

mm

You’ll need to make the link in \DosDevices\Global or it won’t be visible outside the services session.

And how do you determine that they are not working? Are you looking for them in the explorer? Did you write a program to open \.\k<file:>: and that’s failing?

-p

From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Daniel ?berg
Sent: Thursday, October 11, 2007 3:15 PM
To: Windows System Software Devs Interest List
Subject: Re:[ntdev] Re:UMDF - CreateSymbolicLink for an user

Tried \DosDevice\k<file:>: and also \DosDevice\Global\k<file:>:
and of course is these not used before.

Also tried with DefineDosDevice, but was not really sure what to
use for path here. It feels like it worked a bit different in the WDM
time…

Daniel
“Peter Wieland” > skrev i meddelandet news:xxxxx@ntdev…
What path are you providing for your symbolic link?

-p

From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Daniel ?berg
Sent: Thursday, October 11, 2007 1:45 PM
To: Windows System Software Devs Interest List
Subject: Re:[ntdev] UMDF - CreateSymbolicLink for an user

Well, first let’s say that I’m running on Windows Vista, with DDK 6000.

The call to CreateSymbolicLink goes successfull but I assume that the
link is created for the localservice account, because my normal user
never recieves any new device letter. Therefore my Impersonate idea.

But hopefully there is a better way?

Daniel
“Peter Wieland” > skrev i meddelandet news:xxxxx@ntdev…
You cannot make any object calls in the impersonation callback.

What happens when you call IWDFDevice::CreateSymbolicLink outside of impersonation?

-p

From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Daniel ?berg
Sent: Thursday, October 11, 2007 12:45 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] UMDF - CreateSymbolicLink for an user

Is it possible to create a symbolic link to for an user, or all users, from
a UMDF driver to \DosDevice\k<file:>: or simulair?

Was thinking using Impersonate, but the driver fails and restart as soon
as I use the device object in the impersonate callback.
Creating files or simulair works as impersonated user,
but not creating a symbolic link.

Perhaps there is an easier way also. Like using DefineDosDevice to a
special interface in the user mode app?

Regards,
Daniel


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


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


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</file:></file:></file:></file:>

…or rather IOCTL_MOUNTMGR_CREATE_POINT.

@OSR_Community_User said:
…or rather IOCTL_MOUNTMGR_CREATE_POINT.

That would work even better!


Alexandra from NTT

You know what would be even better? Not replying to a12 year old post!