The error message tells you that the program is trying to write to the address 0x14, which is obviously an invalid address to write to. Being so close to 0, the reason for this address is most likely that you passed an invalid pointer to GetTcpTable2 which is using it as a base address to some struct and then trying to write to some member of that struct which should be located at [base address + 20 bytes] (hex 0x14).
See
GetTcpTable2 function (iphlpapi.h) | Microsoft Docs[
^] : You need to pass two pointers: the first to a TCP Table struct that is supposed to hold the info that is retrieved, the second a pointer to a variable holding the size of the buffer you passed in the first parameter.
The parameters you are actually passing are
*table
and
¤tTableSize
- the first is a dereference from a variable that may or may not be a pointer, but most probably it's not a pointer. The second is... well, no idea until you fix that obvious typo you have here. Check the example code on the site I linked above for reference, then it shouldn't be so hard to resolve this.