Rocksolid Light

Welcome to Rocksolid Light

mail  files  register  newsreader  groups  login

Message-ID:  

It's the Magic that counts. -- Larry Wall on Perl's apparent ugliness


devel / comp.os.ms-windows.programmer.win32 / Re: XPsp3 - How does NtAcceptConnectPort work ?

SubjectAuthor
* XPsp3 - How does NtAcceptConnectPort work ?R.Wieser
`* XPsp3 - How does NtAcceptConnectPort work ?JJ
 `- XPsp3 - How does NtAcceptConnectPort work ?R.Wieser

1
XPsp3 - How does NtAcceptConnectPort work ?

<t9kmg5$j0f$1@gioia.aioe.org>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=1089&group=comp.os.ms-windows.programmer.win32#1089

  copy link   Newsgroups: comp.os.ms-windows.programmer.win32
Path: i2pn2.org!i2pn.org!aioe.org!XakcSTEO51npqVb7OVl71w.user.46.165.242.75.POSTED!not-for-mail
From: address@not.available (R.Wieser)
Newsgroups: comp.os.ms-windows.programmer.win32
Subject: XPsp3 - How does NtAcceptConnectPort work ?
Date: Thu, 30 Jun 2022 19:28:30 +0200
Organization: Aioe.org NNTP Server
Lines: 34
Message-ID: <t9kmg5$j0f$1@gioia.aioe.org>
Injection-Info: gioia.aioe.org; logging-data="19471"; posting-host="XakcSTEO51npqVb7OVl71w.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
X-Notice: Filtered by postfilter v. 0.9.2
X-Newsreader: Microsoft Outlook Express 6.00.2900.5512
X-MSMail-Priority: Normal
X-RFC2646: Format=Flowed; Original
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5512
X-Priority: 3
 by: R.Wieser - Thu, 30 Jun 2022 17:28 UTC

Hello all,

I'm trying to create some basic LPC code, but am running in a bit of a
problem in regard to how NtAcceptConnectPort works. :-(

I've got some server-side code which uses the following functions in the
below order :

NtCreatePort
NtListenPort
NtAcceptConnectPort
NtCompleteConnectPort
NtReplyWaitReceivePort
....

On the client side I'm calling NtConnectPort twice (with some data
identifying each connection), to test opening two connections to the server.

The problem is that although I'm calling NtReplyWaitReceivePort with the
data-port handle returned from NtAcceptConnectPort the second connect
requests data is received by NtReplyWaitReceivePort.

Which, to me, is quite unexpected. It is as if the data-port handle is
absolutily ignored ...

Could someone explain to me how the above works / how I can make multiple
connections to the server-side program ?

Regards,
Rudy Wieser

Re: XPsp3 - How does NtAcceptConnectPort work ?

<1cxpk2m66m8ze.152wxzp777hfl.dlg@40tude.net>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=1090&group=comp.os.ms-windows.programmer.win32#1090

  copy link   Newsgroups: comp.os.ms-windows.programmer.win32
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: jj4public@outlook.com (JJ)
Newsgroups: comp.os.ms-windows.programmer.win32
Subject: Re: XPsp3 - How does NtAcceptConnectPort work ?
Date: Fri, 1 Jul 2022 06:21:46 +0700
Organization: A noiseless patient Spider
Lines: 43
Message-ID: <1cxpk2m66m8ze.152wxzp777hfl.dlg@40tude.net>
References: <t9kmg5$j0f$1@gioia.aioe.org>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Injection-Info: reader01.eternal-september.org; posting-host="c42fe45e3e78ec61370770688cab8863";
logging-data="2157275"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+tKDUGlTS54Cj/Z2mJHPHzkfxeRq8dDKk="
User-Agent: 40tude_Dialog/2.0.15.84
Cancel-Lock: sha1:eA5WE0lOS7VCfb+QZvfZLxaIF9s=
X-Face: \*\`0(1j~VfYC>ebz[&O.]=,Nm\oRM{of,liRO#7Eqi4|!]!(Gs=Akgh{J)605>C9Air?pa d{sSZ09u+A7f<^paR"/NH_#<mE1S"hde\c6PZLUB[t/s5-+Iu5DSc?P0+4%,Hl
X-Bitcoin: 1LcqwCQBQmhcWfWsVEAeyLchkAY8ZfuMnS
 by: JJ - Thu, 30 Jun 2022 23:21 UTC

On Thu, 30 Jun 2022 19:28:30 +0200, R.Wieser wrote:
> Hello all,
>
> I'm trying to create some basic LPC code, but am running in a bit of a
> problem in regard to how NtAcceptConnectPort works. :-(
>
> I've got some server-side code which uses the following functions in the
> below order :
>
> NtCreatePort
> NtListenPort
> NtAcceptConnectPort
> NtCompleteConnectPort
> NtReplyWaitReceivePort
> ....
>
> On the client side I'm calling NtConnectPort twice (with some data
> identifying each connection), to test opening two connections to the server.
>
> The problem is that although I'm calling NtReplyWaitReceivePort with the
> data-port handle returned from NtAcceptConnectPort the second connect
> requests data is received by NtReplyWaitReceivePort.
>
> Which, to me, is quite unexpected. It is as if the data-port handle is
> absolutily ignored ...
>
> Could someone explain to me how the above works / how I can make multiple
> connections to the server-side program ?
>
> Regards,
> Rudy Wieser

Those functions are not meant for user applications. There're network level
functions used for RPC much like FTP or HTTP, which don't yet include
information regarding the source and destination applications.

While the client part of it can be used for user applications, the server
part while it's possible, it should not be used - as there can only be one
effective listener, since RPC data is not sent using network broadcast.
IOTW, only one listener will receive the data.

If the server part is used by user application, it may interfere with the
RPC server. Making some data not received by the RPC server.

Re: XPsp3 - How does NtAcceptConnectPort work ?

<t9maeq$a56$1@gioia.aioe.org>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=1091&group=comp.os.ms-windows.programmer.win32#1091

  copy link   Newsgroups: comp.os.ms-windows.programmer.win32
Path: i2pn2.org!i2pn.org!usenet.goja.nl.eu.org!aioe.org!XakcSTEO51npqVb7OVl71w.user.46.165.242.75.POSTED!not-for-mail
From: address@not.available (R.Wieser)
Newsgroups: comp.os.ms-windows.programmer.win32
Subject: Re: XPsp3 - How does NtAcceptConnectPort work ?
Date: Fri, 1 Jul 2022 10:15:16 +0200
Organization: Aioe.org NNTP Server
Lines: 28
Message-ID: <t9maeq$a56$1@gioia.aioe.org>
References: <t9kmg5$j0f$1@gioia.aioe.org> <1cxpk2m66m8ze.152wxzp777hfl.dlg@40tude.net>
Injection-Info: gioia.aioe.org; logging-data="10406"; posting-host="XakcSTEO51npqVb7OVl71w.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
X-MSMail-Priority: Normal
X-Priority: 3
X-RFC2646: Format=Flowed; Original
X-Newsreader: Microsoft Outlook Express 6.00.2900.5512
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5512
X-Notice: Filtered by postfilter v. 0.9.2
 by: R.Wieser - Fri, 1 Jul 2022 08:15 UTC

JJ,

> the server part while it's possible, it should not be
> used - as there can only be one effective listener

Which is exactly what I'm after. Multiple programs communicating over a
single RS232 connection - in a similar way TCP/IP works.

> Making some data not received by the RPC server.

Its my preference (and the reason of using the posted functions) if *none*
of it is received by the *R*PC server. All of it is supposed to stay in the
local machine.

But, do you have any idea why the NtReplyWaitReceivePort, while being given
the handle returned by NtAcceptConnectPort, receives data that is send by
NtConnectPort (to create a new connection) ?

Although I've found some old MSDN information related to the arguments to
the NT port functions as well as a handfull of examples, I've not found
/any/ info about how those port functions interact (an their "gotyas").

Regards,
Rudy Wieser

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor