SQLExpress - Xb2.NET     ot4xb  
ot4xb.public
GetExtendedTcpTable
Thread Starter: Jack Duijf Started: 7/12/2008 10:17 AM UTC
Replies: 8
GetExtendedTcpTable
Hello Pablo,

Does ot4xb supoorts the function GetExtendedTcpTable?
My programm starts a Socket server on port 1038. In some computers there is socket error 10048 Port in use by another process.
The goal is to find the program or service information that uses a speciffic port.
My application should be able to show a message like:
Port 1038 is in use by Programm/Service "applicationId".

It takes lots of time to find the offending program or service using ProcessExplorer.

Regards,
Jack Duijf
Re: GetExtendedTcpTable
Hi,
See the attached sample

I will need to revise it again before publish it in the ot4xb.examples NG as not always possible to open the process names from the given PID but at least you can see the info in the most cases.

In this sample I was build a hash table with the running services, using the PID as key component and the Service Name as value, so I was able to retrieve at least the name of the service. Maybe the posible solution can be build also another has table of running processes and search instead of try to open the process to query the name.

So still not complete, but I think can be a good starting point. I will spend a few more time next weekend as this stuff can also very usefull for myself.

Regards,
Pablo Botella

This message includes the following attachments:

Re: GetExtendedTcpTable
Hello Pablo,

Thank you verry much for the sample.
Compiling this generates a error like:
LISTIPBINDING.obj: error ALK2102: unresolved external symbol _HDICT_NEW
LISTIPBINDING.obj: error ALK2102: unresolved external symbol _HDICT_REMOVEALL
LISTIPBINDING.obj: error ALK2102: unresolved external symbol _HDICT_SETPROP
LISTIPBINDING.obj: error ALK2102: unresolved external symbol _HDICT_DESTROY
LISTIPBINDING.obj: error ALK2102: unresolved external symbol _HDICT_GETPROP
ALINK: fatal error ALK4102: 5 external symbols unresolved

Do i mis some prg file ?

Regards,
Jack Duijf

"Pablo Botella" <pbn_NOSPAM_@pablob.com> schreef in bericht news:7fc742c4$4458dad7$e071@news.xbwin.com...
Hi,
See the attached sample

I will need to revise it again before publish it in the ot4xb.examples NG as not always possible to open the process names
from the given PID but at least you can see the info in the most cases.

In this sample I was build a hash table with the running services, using the PID as key component and the Service Name as value, so I was able to retrieve at least the name of the service. Maybe the posible solution can be build also another has table of running processes and search instead of try to open the process to query the name.

So still not complete, but I think can be a good starting point. I will spend a few more time next weekend as this stuff can also very usefull for myself.

Regards,
Pablo Botella
Re: GetExtendedTcpTable
oppps sorry forgot to include the the latest ot4xb build I was using here
Now published ot4xb - Build: 1_5_1_251  

http://news.xbwin.com/ot4xb.snapshots/3
Link with this version Regards,
Pablo Botella

This message includes the following attachments:

Re: GetExtendedTcpTable
Hello Pablo,

Thank you for the fix. Looks verry prommising.
Is the latest ot4xb safe for ditribution to our sites, or is it a pre-release.

Regards,
Jack Duijf



"Pablo Botella" <pbn_NOSPAM_@pablob.com> schreef in bericht news:6ac3932f$50309d39$e075@news.xbwin.com...
oppps sorry
forgot to include the the latest ot4xb build I was using here
Now published ot4xb - Build: 1_5_1_251

http://news.xbwin.com/ot4xb.snapshots/3
Link with this version
Regards,
Pablo Botella
Re: GetExtendedTcpTable
Hi,

Try this one. Seems to see the names of all processes, at least in XP
Still pending to test in Vista but I think going in the right direction :-)

Regards,
Pablo Botella

This message includes the following attachments:

Re: GetExtendedTcpTable
Is the latest ot4xb safe for ditribution to our sites, or is it a pre-release.
Still pending to implement serialization and iteration methods for hash tables but the current stuff seems very stable, so I think you can include this build in production without any trouble.
Re: GetExtendedTcpTable
Still pending to test in Vista
Tested. Works Ok :-)
Re: GetExtendedTcpTable
Hello Pablo,

Thank you verry much, it works indeed verry smoothly in Vista.
I wil build this into my socket component:
If open the Xbase servicecontroler to

Regards,
Jack Duijf


"Pablo Botella" <pbn_NOSPAM_@pablob.com> schreef in bericht news:1d5e9860$1ec4d7ee$e077@news.xbwin.com...
Hi,

Try this one. Seems to see the names of all processes, at least in XP
Still pending to test in Vista but I think going in the right direction :-)

Regards,
Pablo Botella