Who knows the WINS API (winsrpc.dll) ?

  • Thread starter Thread starter Walter Holler
  • Start date Start date
W

Walter Holler

Hi,

given none of Microsoft's utilities for WINS (winscl, netsh, winsmgmt)
really works as required,
I'd like to write my own program to dump all entries, search for and delete
junk that has accumulated over time.

All those utilities seem to use WINSRPC.DLL, but I can not find the API
declarations for it and MS support was no help yet...

Has someone got the specification for the functions in WINSRPC.DLL ?

TIA
Walter
 
It is unpublished.

I do a ton of wins management (about 400 wins servers), what can't you do in
netsh that you are trying to do?

joe
 
Thanks for your reply,

I do not understand why MS is keeping that API a secret.

I found two problems with NETSH:

1) a "show database" does only output the lower half of the version Id

2) the "delete records" seems to work at random only.

Walter
 
It isn't so much a secret as it is deprecated, they want to kill it
entirely. I understand where you are coming from though, I wanted that API
info about 7 years ago when working on NT4 SP2/3.

1. The records just scanned I couldn't find any that had a record that
extended into the upper half of the version to look at.

2. I do not have a problem with this call, what specific ways are you trying
to use it and what kind of names aren't being removed? Do you get an error
when it fails?

--
www.joeware.net


Walter Holler said:
Thanks for your reply,

I do not understand why MS is keeping that API a secret.

I found two problems with NETSH:

1) a "show database" does only output the lower half of the version Id

2) the "delete records" seems to work at random only.

Walter


Joe Richards said:
It is unpublished.

I do a ton of wins management (about 400 wins servers), what can't you
do
 
Hello Joe,

thanks for your understanding - but have you been able to get the API info?

We would like to kill WINS too, but still to many apps depend on it.

See example of some junk below.

Kind regards,
Walter

Joe Richards said:
It isn't so much a secret as it is deprecated, they want to kill it
entirely. I understand where you are coming from though, I wanted that API
info about 7 years ago when working on NT4 SP2/3.

1. The records just scanned I couldn't find any that had a record that
extended into the upper half of the version to look at.

About half of the servers has a high value of 24001000, all others 0.
2. I do not have a problem with this call, what specific ways are you trying
to use it and what kind of names aren't being removed? Do you get an error
when it fails?

We have thousands of records with unprintable names and/or unusual 16th
byte.

wins server>Show database server={10.132.192.4} endchar=21
-/-
NAME -T-S- VERSION -G- IPADDRESS - EXPIRATION DATE
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
xAndrep? [21h]-D-T- 3fdde90 -U- 10.175.2.42 -2004-02-10 02:00:03
xBeate?? [21h]-D-T- 4130104 -U- 10.175.0.31 -2004-02-10 02:00:03
xBeateH? [21h]-D-T- 41d5206 -U- 10.175.0.31 -2004-01-31 15:46:12
xBeateP? [21h]-D-T- 405dc16 -U- 10.175.0.31 -2004-02-10 02:00:03
-/-

## show one specific junk record

wins server>Show Recbyversion server=10.132.192.4 maxver={24001000,3F00AEC}
minver={24001000,3F00AEC}

Total No of records retrieved for the server 10.132.192.4 : 1
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

?U>? [20h] :
Record Type : DYNAMIC
Record State : ACTIVE
Record Version : { 24001000 3f00aec }
Record Node Type : 3
Record Group : UNIQUE
Record Expiration Date: Dienstag, 10. Februar 2004 02:00:03
IP Address : 10.132.212.90
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Got 1 records in this round

Total No Of records Searched = (1)
Total no of records matched : 1
Command completed successfully.

## try to delete by number

wins server>delete records minver={24001000,3F00AEC}
maxver={24001000,3F00AEC}

Command completed successfully.

## show again and it is still there

wins server>Show Recbyversion server=10.132.192.4 maxver={24001000,3F00AEC}
minver={24001000,3F00AEC}

Total No of records retrieved for the server 10.132.192.4 : 1

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

?U>? [20h] :
Record Type : DYNAMIC
Record State : ACTIVE
Record Version : { 24001000 3f00aec }
Record Node Type : 3
Record Group : UNIQUE
Record Expiration Date: Dienstag, 10. Februar 2004 02:00:03
IP Address : 10.132.212.90
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Got 1 records in this round
Total No Of records Searched = (1)
Total no of records matched : 1

Command completed successfully.
wins server>
 
Again that info isn't published.

Have you jetpacked your databases? It sounds like there is corruption. If
that doesn't help and in your shoes I would seriously consider shutting WINS
down on all WINS Servers and deleting the database and logs on all servers
and restart WINS and rebuild the database. You can force servers to quickly
reregister by doing NBTSTAT -RR on them.

--
www.joeware.net


Walter Holler said:
Hello Joe,

thanks for your understanding - but have you been able to get the API info?

We would like to kill WINS too, but still to many apps depend on it.

See example of some junk below.

Kind regards,
Walter

Joe Richards said:
It isn't so much a secret as it is deprecated, they want to kill it
entirely. I understand where you are coming from though, I wanted that API
info about 7 years ago when working on NT4 SP2/3.

1. The records just scanned I couldn't find any that had a record that
extended into the upper half of the version to look at.

About half of the servers has a high value of 24001000, all others 0.
2. I do not have a problem with this call, what specific ways are you trying
to use it and what kind of names aren't being removed? Do you get an error
when it fails?

We have thousands of records with unprintable names and/or unusual 16th
byte.

wins server>Show database server={10.132.192.4} endchar=21
-/-
NAME -T-S- VERSION -G- IPADDRESS - EXPIRATION DATE
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
xAndrep? [21h]-D-T- 3fdde90 -U- 10.175.2.42 -2004-02-10 02:00:03
xBeate?? [21h]-D-T- 4130104 -U- 10.175.0.31 -2004-02-10 02:00:03
xBeateH? [21h]-D-T- 41d5206 -U- 10.175.0.31 -2004-01-31 15:46:12
xBeateP? [21h]-D-T- 405dc16 -U- 10.175.0.31 -2004-02-10 02:00:03
-/-

## show one specific junk record

wins server>Show Recbyversion server=10.132.192.4 maxver={24001000,3F00AEC}
minver={24001000,3F00AEC}

Total No of records retrieved for the server 10.132.192.4 : 1
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

?U>? [20h] :
Record Type : DYNAMIC
Record State : ACTIVE
Record Version : { 24001000 3f00aec }
Record Node Type : 3
Record Group : UNIQUE
Record Expiration Date: Dienstag, 10. Februar 2004 02:00:03
IP Address : 10.132.212.90
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Got 1 records in this round

Total No Of records Searched = (1)
Total no of records matched : 1
Command completed successfully.

## try to delete by number

wins server>delete records minver={24001000,3F00AEC}
maxver={24001000,3F00AEC}

Command completed successfully.

## show again and it is still there

wins server>Show Recbyversion server=10.132.192.4 maxver={24001000,3F00AEC}
minver={24001000,3F00AEC}

Total No of records retrieved for the server 10.132.192.4 : 1

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

?U>? [20h] :
Record Type : DYNAMIC
Record State : ACTIVE
Record Version : { 24001000 3f00aec }
Record Node Type : 3
Record Group : UNIQUE
Record Expiration Date: Dienstag, 10. Februar 2004 02:00:03
IP Address : 10.132.212.90
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Got 1 records in this round
Total No Of records Searched = (1)
Total no of records matched : 1

Command completed successfully.
wins server>
 
Back
Top