I am trying to use GetExtendedTcpTable function, but when I want to compile this program:
#include <Windows.h>
#include <Iprtrmib.h>
#include <Iphlpapi.h>
void main() {
PVOID x = (PVOID)malloc(10000);
PDWORD size = 10000;
DWORD result = GetExtendedTcpTable(
&x,
&size,
TRUE,
AF_INET,
TCP_TABLE_OWNER_PID_ALL,
NULL);
}
linker throws an error
LNK2019 unresolved external symbol _GetExtendedTcpTable@24 referenced in function _main
Why is this error, why I cant use GetExtendedTcptable?