This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- GetTcpTable InstallScript
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Aug 12, 2010
05:10 PM
GetTcpTable InstallScript
Hello Everybody,
i tried to get the iphlpapi.getTcpTable Function to work, but it didn't work.
I dont know how to get the table. Maybe somebody can help?
Here's my code:
i tried to get the iphlpapi.getTcpTable Function to work, but it didn't work.
I dont know how to get the table. Maybe somebody can help?
Here's my code:
// Included header files ----------------------------------------------------
#include "ifx.h"
#define HEAP_ZERO_MEMORY 0x00000008
prototype number Iphlpapi.GetTcpTable(POINTER, POINTER, BOOL);
prototype Kernel32.HeapAlloc(NUMBER, NUMBER, NUMBER);
prototype Kernel32.GetProcessHeap();
typedef MIB_TCPROW
begin
int dwState;
int dwLocalAddr;
int dwLocalPort;
int dwRemotAddr;
int dwRemotePort;
end;
typedef MIB_TCPTABLE
begin
INT dwNumEntries;
MIB_TCPROW POINTER table();
end;
//TestFunction
function OnFirstUIBefore()
number iCount, error, pdwSize, entries, test;
string str, str1;
MIB_TCPTABLE POINTER pTcpTable;
MIB_TCPROW POINTER pTcpRow;
begin
error = 0;
error = GetTcpTable(pTcpTable, &pdwSize, TRUE);
pTcpTable = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, pdwSize);
error = 0;
error = GetTcpTable(pTcpTable, &pdwSize, TRUE);
if (error == 0) then
entries = pTcpTable->dwNumEntries;
NumToStr(str, entries);
MessageBox("dwNumEntries: " + str, INFORMATION);
for iCount = 0 to (pTcpTable->dwNumEntries -1)
pTcpRow = pTcpTable->table(iCount);
test= pTcpRow->dwState;
//&TcpRow = TcpTable->table(iCount);
//test = TcpRow.dwState;
//test = TcpRow->dwState;
NumToStr(str, test);
MessageBox("State: " + str, INFORMATION);
endfor;
else
MessageBox("kein Fehler!", INFORMATION);
endif;
abort;
end;
(1) Reply
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Aug 23, 2010
03:18 AM
... knows...?
