MIB_UDPROW_OWNER_MODULE size / datatypes

Tech-Archive recommends: Speed Up your PC by fixing your registry



I am having trouble using the GetExtendedUDPtable function when using the
verbose Owner_Module structure.

When I call the function the first entry in the Table seems correct
0.0.0.0:445, the rest of the data is garbage and contains invalid addresses
like 413.5.22.25.

I think the problem may be that my structure is the wrong size so the data
is overlapping, or I am not understanding how to define the structure.


Can some one compare the two and point out what is wrong , for instance I do
not truly understand TCPIP_OWNING_MODULE_SIZE how do I determin this at
runtime, and if as it says it is an array of strings who do I know how each
string is, do I split it at each null char (if it's an ascii sz)?

# Orignal / MSDN structure

typedef struct {
DWORD dwLocalAddr;
DWORD dwLocalPort;
DWORD dwOwningPid;
LARGE_INTEGER liCreateTimestamp;
PVOID pOwningModuleInfo [TCPIP_OWNING_MODULE_SIZE];
} MIB_UDPROW_OWNER_MODULE,

# My VB.NET structure

Public Structure MIB_UDPROW_OWNER_MODULE

Dim dwLocalAddr As Integer
Dim dwLocalPort As Integer
Dim dwOwningPid As Integer
Dim liCreateTimestamp As Int64 ' Windows time stamp (C++ Large integer)
Dim pOwningModuleInfo As Integer ' Pointer to owning module strings


End Structure

Sorry to be a pain.

Mike.




















.



Relevant Pages

  • RE: UDF behaving very oddly -assistance or please suggest alternat
    ... OK i have used IF formulas to test whether the text strings in the cells are ... "Tom Ogilvy" wrote: ... Dim cs As Integer ...
    (microsoft.public.excel.programming)
  • Re: characters...
    ... Below is a subroutine that assumes your original list is in A1:A10. ... modify for the actual location of the original strings as well as for the ... Dim rngCell As Range ... you also say that you only want the first letter of the last ...
    (microsoft.public.excel.programming)
  • Problem beim Vergleich von Strings
    ... Ich habe ein suspektes Problem beim Vergleichen von Strings unter Excel ... Dim datenArray() As DatenEintrag ...
    (microsoft.public.de.excel)
  • Re: Remove from a collection
    ... Dim sTmr As String ... Dim lCount As Long ... For 10000 items of Longs ... For 1000 items of Strings ...
    (microsoft.public.vb.general.discussion)
  • Re: VBA - Collections/Arrays/Sorting
    ... I converted the items to strings on the way into the collection because I ... > had the need to sort a multi-dimensional array of several hundred thousand ... >> Dim i As Long, ... >> Dim PasteRowCount As Long ...
    (microsoft.public.excel)