BlankHi All,
I’m new to the driver development, and trying to enable one kernel mode
diver connect to a LPC port which is created under user mode, but the
NtConnectPort always return 0xc0000005 ( the client code can work under user
mode ), does any one know what’s wrong?
Here is the call to NtConnectPort:
#define PORTNAME L"\MyPort"
RtlInitUnicodeString(&uString, PORTNAME);
rc = NtConnectPort(&PortHandle,
&uString,NULL,0,0,0,ConnectDataBuffer,&Size);
And the user mode port name is \MyPort, for the kernel mode driver, which
name should be used? Same as the user mode’s or others ?
Thanks in advanced.
-sxw
Try \.\BaseNamedObjects\MyPort.
-Srin.
-----Original Message-----
From: Xinwei Sun [mailto:xxxxx@yahoo.com]
Sent: Sunday, June 01, 2003 9:34 AM
To: NT Developers Interest List
Subject: [ntdev] about the LPC calls
BlankHi All,
I’m new to the driver development, and trying to enable one kernel
mode
diver connect to a LPC port which is created under user mode, but the
NtConnectPort always return 0xc0000005 ( the client code can work
under
user
mode ), does any one know what’s wrong?
Here is the call to NtConnectPort:
#define PORTNAME L"\MyPort"
RtlInitUnicodeString(&uString, PORTNAME);
rc = NtConnectPort(&PortHandle,
&uString,NULL,0,0,0,ConnectDataBuffer,&Size);
And the user mode port name is \MyPort, for the kernel mode driver,
which
name should be used? Same as the user mode’s or others ?
Thanks in advanced.
-sxw
You are currently subscribed to ntdev as: xxxxx@nai.com
To unsubscribe send a blank email to xxxxx@lists.osr.com
Thank you very much, Srin.
I’d tried the new name, but the return value is still 0xc0005, and even when
the server is not
started, the call to NtConnectPort also returns the same value, I’m
wondering whether this
problem is not relative to naming problem.
Thanks,
-sxw
???:xxxxx@ntdev…
Try \.\BaseNamedObjects\MyPort.
-Srin.
> -----Original Message-----
> From: Xinwei Sun [mailto:xxxxx@yahoo.com]
> Sent: Sunday, June 01, 2003 9:34 AM
> To: NT Developers Interest List
> Subject: [ntdev] about the LPC calls
>
> BlankHi All,
>
> I’m new to the driver development, and trying to enable one kernel
mode
> diver connect to a LPC port which is created under user mode, but the
> NtConnectPort always return 0xc0000005 ( the client code can work
under
> user
> mode ), does any one know what’s wrong?
>
> Here is the call to NtConnectPort:
>
> #define PORTNAME L"\MyPort"
> RtlInitUnicodeString(&uString, PORTNAME);
> rc = NtConnectPort(&PortHandle,
> &uString,NULL,0,0,0,ConnectDataBuffer,&Size);
>
> And the user mode port name is \MyPort, for the kernel mode driver,
which
> name should be used? Same as the user mode’s or others ?
>
> Thanks in advanced.
>
> -sxw
>
>
>
> —
> You are currently subscribed to ntdev as: xxxxx@nai.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com
c0000005 is STATUS_ACCESS_VIOLATION. I’d guess one of the paramters
you’re passing into NtConnectPort is bad, or at least isn’t valid from
your thread’s previous mode.
-p
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Xinwei Sun
Sent: Monday, June 02, 2003 8:51 AM
To: NT Developers Interest List
Subject: [ntdev] Re: about the LPC calls
Thank you very much, Srin.
I’d tried the new name, but the return value is still
0xc0005, and even when the server is not started, the call to
NtConnectPort also returns the same value, I’m wondering
whether this problem is not relative to naming problem.
Thanks,
-sxw
???:xxxxx@ntdev…
>
> Try \.\BaseNamedObjects\MyPort.
>
> -Srin.
>
> > -----Original Message-----
> > From: Xinwei Sun [mailto:xxxxx@yahoo.com]
> > Sent: Sunday, June 01, 2003 9:34 AM
> > To: NT Developers Interest List
> > Subject: [ntdev] about the LPC calls
> >
> > BlankHi All,
> >
> > I’m new to the driver development, and trying to enable one kernel
> mode
> > diver connect to a LPC port which is created under user
> mode, but the
> > NtConnectPort always return 0xc0000005 ( the client code can work
> under
> > user
> > mode ), does any one know what’s wrong?
> >
> > Here is the call to NtConnectPort:
> >
> > #define PORTNAME L"\MyPort"
> > RtlInitUnicodeString(&uString, PORTNAME); rc =
> > NtConnectPort(&PortHandle,
> > &uString,NULL,0,0,0,ConnectDataBuffer,&Size);
> >
> > And the user mode port name is \MyPort, for the kernel mode driver,
> which
> > name should be used? Same as the user mode’s or others ?
> >
> > Thanks in advanced.
> >
> > -sxw
> >
> >
> >
> > —
> > You are currently subscribed to ntdev as: xxxxx@nai.com To
> > unsubscribe send a blank email to xxxxx@lists.osr.com
>
>
>
>
>
>
> —
> You are currently subscribed to ntdev as:
> xxxxx@microsoft.com To unsubscribe send a blank email to
> xxxxx@lists.osr.com
>
>