|
From: xm on 2 Apr 2008 03:36 In AddDevice function of my USB device kernel mode driver, I called both IoCreateSymbolicLink(..symbolicName1..) and IoRegisterDeviceInterface() after IoCreateDevice(). so my device will have 2 symbolic names - one is symbolicName1 defined myself by IoCreateSymbolicLink and another one is system generated (something like \\?\usb\vid_xx&pid_xx&xx&x{xx} by IoRegisterDeviceInterface, let's call it symbolicName2). Now, in user mode, if i use symbolicName2 for CreateFile, everything is fine. I can connect to control pipe, in pipe and out pipe. if i use symbolicName1 for CreateFile, I can only connect to one pipe, any subsequent connection will fail (error code 0x5, access is denied) I am using XP SP2. does that means I can not use symbolicName1 at all? it is more user friendly than symbolicName2.
From: Doron Holan [MSFT] on 2 Apr 2008 12:44 both the hard named sym link and the device interface symlink point to the same stack, so the name in and of itself should not matter. how are you connecting to a pipe? with an additional namespace string after the symlink name? d -- Please do not send e-mail directly to this alias. this alias is for newsgroup purposes only. This posting is provided "AS IS" with no warranties, and confers no rights. "xm" <xm(a)discussions.microsoft.com> wrote in message news:106D4A52-450B-4659-9B87-A84B1D178483(a)microsoft.com... > In AddDevice function of my USB device kernel mode driver, I called both > IoCreateSymbolicLink(..symbolicName1..) and IoRegisterDeviceInterface() > after > IoCreateDevice(). so my device will have 2 symbolic names - one is > symbolicName1 defined myself by IoCreateSymbolicLink and another one is > system generated (something like \\?\usb\vid_xx&pid_xx&xx&x{xx} by > IoRegisterDeviceInterface, let's call it symbolicName2). > Now, in user mode, if i use symbolicName2 for CreateFile, everything is > fine. I can connect to control pipe, in pipe and out pipe. if i use > symbolicName1 for CreateFile, I can only connect to one pipe, any > subsequent > connection will fail (error code 0x5, access is denied) > I am using XP SP2. > does that means I can not use symbolicName1 at all? it is more user > friendly > than symbolicName2. > > > >
From: xm on 2 Apr 2008 20:41 Thanks for your response. Yes, to connect to a pipe, I used \\?\usb\vid_xx&pid_xx&xx&x{xx}\PIPE00 or \\.\symbolicName1\PIPE00. While 3 connections to \\?\usb\vid_xx&pid_xx&xx&x{xx} \\?\usb\vid_xx&pid_xx&xx&x{xx}\PIPE00 \\?\usb\vid_xx&pid_xx&xx&x{xx}\\PIPE01 are ok. only one connection can be established to \\.\symbolicName1 \\.\symbolicName1\PIPE00 \\.\symbolicName1\PIPE01 "Doron Holan [MSFT]" wrote: > both the hard named sym link and the device interface symlink point to the > same stack, so the name in and of itself should not matter. how are you > connecting to a pipe? with an additional namespace string after the symlink > name? > > d > > -- > Please do not send e-mail directly to this alias. this alias is for > newsgroup purposes only. > This posting is provided "AS IS" with no warranties, and confers no rights. > > > "xm" <xm(a)discussions.microsoft.com> wrote in message > news:106D4A52-450B-4659-9B87-A84B1D178483(a)microsoft.com... > > In AddDevice function of my USB device kernel mode driver, I called both > > IoCreateSymbolicLink(..symbolicName1..) and IoRegisterDeviceInterface() > > after > > IoCreateDevice(). so my device will have 2 symbolic names - one is > > symbolicName1 defined myself by IoCreateSymbolicLink and another one is > > system generated (something like \\?\usb\vid_xx&pid_xx&xx&x{xx} by > > IoRegisterDeviceInterface, let's call it symbolicName2). > > Now, in user mode, if i use symbolicName2 for CreateFile, everything is > > fine. I can connect to control pipe, in pipe and out pipe. if i use > > symbolicName1 for CreateFile, I can only connect to one pipe, any > > subsequent > > connection will fail (error code 0x5, access is denied) > > I am using XP SP2. > > does that means I can not use symbolicName1 at all? it is more user > > friendly > > than symbolicName2. > > > > > > > > > >
From: Doron Holan [MSFT] on 3 Apr 2008 00:26 are you creating your PDEVICE_OBJECT as exclusive (TRUE for the 2nd to last parameter to IoCreateDevice)? the device interface symlink points to the PDO, your hard coded symlink points to your FDO. if so, pass in FALSE and see if it works d -- Please do not send e-mail directly to this alias. this alias is for newsgroup purposes only. This posting is provided "AS IS" with no warranties, and confers no rights. "xm" <xm(a)discussions.microsoft.com> wrote in message news:175A4256-7A3D-498A-98DF-A64A4CBD395F(a)microsoft.com... > Thanks for your response. > Yes, to connect to a pipe, I used \\?\usb\vid_xx&pid_xx&xx&x{xx}\PIPE00 or > \\.\symbolicName1\PIPE00. > > While 3 connections to > \\?\usb\vid_xx&pid_xx&xx&x{xx} > \\?\usb\vid_xx&pid_xx&xx&x{xx}\PIPE00 > \\?\usb\vid_xx&pid_xx&xx&x{xx}\\PIPE01 are ok. only one connection can be > established to > \\.\symbolicName1 > \\.\symbolicName1\PIPE00 > \\.\symbolicName1\PIPE01 > > > > "Doron Holan [MSFT]" wrote: > >> both the hard named sym link and the device interface symlink point to >> the >> same stack, so the name in and of itself should not matter. how are you >> connecting to a pipe? with an additional namespace string after the >> symlink >> name? >> >> d >> >> -- >> Please do not send e-mail directly to this alias. this alias is for >> newsgroup purposes only. >> This posting is provided "AS IS" with no warranties, and confers no >> rights. >> >> >> "xm" <xm(a)discussions.microsoft.com> wrote in message >> news:106D4A52-450B-4659-9B87-A84B1D178483(a)microsoft.com... >> > In AddDevice function of my USB device kernel mode driver, I called >> > both >> > IoCreateSymbolicLink(..symbolicName1..) and IoRegisterDeviceInterface() >> > after >> > IoCreateDevice(). so my device will have 2 symbolic names - one is >> > symbolicName1 defined myself by IoCreateSymbolicLink and another one is >> > system generated (something like \\?\usb\vid_xx&pid_xx&xx&x{xx} by >> > IoRegisterDeviceInterface, let's call it symbolicName2). >> > Now, in user mode, if i use symbolicName2 for CreateFile, everything is >> > fine. I can connect to control pipe, in pipe and out pipe. if i use >> > symbolicName1 for CreateFile, I can only connect to one pipe, any >> > subsequent >> > connection will fail (error code 0x5, access is denied) >> > I am using XP SP2. >> > does that means I can not use symbolicName1 at all? it is more user >> > friendly >> > than symbolicName2. >> > >> > >> > >> > >> >>
From: xm on 3 Apr 2008 03:56
You are right. after I changed that flag from TRUE to FALSE. it works. Just wondering why both (TRUE of FALSE) works for device interface symlink? Thank you, Doron. "Doron Holan [MSFT]" wrote: > are you creating your PDEVICE_OBJECT as exclusive (TRUE for the 2nd to last > parameter to IoCreateDevice)? the device interface symlink points to the > PDO, your hard coded symlink points to your FDO. if so, pass in FALSE and > see if it works > > d > > -- > Please do not send e-mail directly to this alias. this alias is for > newsgroup purposes only. > This posting is provided "AS IS" with no warranties, and confers no rights. > > > "xm" <xm(a)discussions.microsoft.com> wrote in message > news:175A4256-7A3D-498A-98DF-A64A4CBD395F(a)microsoft.com... > > Thanks for your response. > > Yes, to connect to a pipe, I used \\?\usb\vid_xx&pid_xx&xx&x{xx}\PIPE00 or > > \\.\symbolicName1\PIPE00. > > > > While 3 connections to > > \\?\usb\vid_xx&pid_xx&xx&x{xx} > > \\?\usb\vid_xx&pid_xx&xx&x{xx}\PIPE00 > > \\?\usb\vid_xx&pid_xx&xx&x{xx}\\PIPE01 are ok. only one connection can be > > established to > > \\.\symbolicName1 > > \\.\symbolicName1\PIPE00 > > \\.\symbolicName1\PIPE01 > > > > > > > > "Doron Holan [MSFT]" wrote: > > > >> both the hard named sym link and the device interface symlink point to > >> the > >> same stack, so the name in and of itself should not matter. how are you > >> connecting to a pipe? with an additional namespace string after the > >> symlink > >> name? > >> > >> d > >> > >> -- > >> Please do not send e-mail directly to this alias. this alias is for > >> newsgroup purposes only. > >> This posting is provided "AS IS" with no warranties, and confers no > >> rights. > >> > >> > >> "xm" <xm(a)discussions.microsoft.com> wrote in message > >> news:106D4A52-450B-4659-9B87-A84B1D178483(a)microsoft.com... > >> > In AddDevice function of my USB device kernel mode driver, I called > >> > both > >> > IoCreateSymbolicLink(..symbolicName1..) and IoRegisterDeviceInterface() > >> > after > >> > IoCreateDevice(). so my device will have 2 symbolic names - one is > >> > symbolicName1 defined myself by IoCreateSymbolicLink and another one is > >> > system generated (something like \\?\usb\vid_xx&pid_xx&xx&x{xx} by > >> > IoRegisterDeviceInterface, let's call it symbolicName2). > >> > Now, in user mode, if i use symbolicName2 for CreateFile, everything is > >> > fine. I can connect to control pipe, in pipe and out pipe. if i use > >> > symbolicName1 for CreateFile, I can only connect to one pipe, any > >> > subsequent > >> > connection will fail (error code 0x5, access is denied) > >> > I am using XP SP2. > >> > does that means I can not use symbolicName1 at all? it is more user > >> > friendly > >> > than symbolicName2. > >> > > >> > > >> > > >> > > >> > >> > > |