Desktop Functions: Smart Device Functions:
|
Search Results for "IntPtr" in [All]ntdll
static unsafe void InitializeObjectAttributes(out OBJECT_ATTRIBUTES InitializedAttributes, ref UNICODE_STRING ObjectName, uint Attributes, IntPtr RootDirectory, IntPtr SecurityDescriptor)
InitializedAttributes.ObjectName = (IntPtr)objectNamePtr;
static extern bool IsProcessCritical(IntPtr hProcess, ref bool Critical);
Declare Function IsProcessCritical Lib "kernel32.dll" (hProcess As IntPtr, ByRef Critical As Boolean) As Boolean
static extern NTSTATUS NtAllocateVirtualMemory(IntPtr ProcessHandle, ref IntPtr BaseAddress, UInt32 ZeroBits, ref UInt32 RegionSize, UInt32 AllocationType, UInt32 Protect);
def NtAllocateVirtualMemory(ProcessHandle as IntPtr, ref BaseAddress as IntPtr, ZeroBits as UInt32, ref RegionSize as UInt32, AllocationType as UInt32, Protect as UInt32) as NTSTATUS: 4: NtClose
static extern int NtClose(IntPtr hObject);
Public Shared Function NtClose(ByVal hObject As IntPtr) As Integer
def NtClose(hObject as IntPtr) as UInt32: 5: NtCreateFile
public static extern int NtCreateFile(out SafeFileHandle handle, FileAccess access, OBJECT_ATTRIBUTES* objectAttributes, IO_STATUS_BLOCK* ioStatus, ref long allocSize, uint fileAttributes, FileShare share, uint createDisposition, uint createOptions, IntPtr eaBuffer, uint eaLength);
IntPtr eaBuffer,
public IntPtr information;
public IntPtr RootDirectory;
public IntPtr ObjectName;
public IntPtr SecurityDescriptor;
public IntPtr SecurityQualityOfService;
public IntPtr Buffer;
IntPtr _RootHandle; //This will need to be initialized with the root handle, can use CreateFile from kernel32.dll
IntPtr buffer = Marshal.AllocHGlobal(4096);
IntPtr refPtr = Marshal.AllocHGlobal(8);
IntPtr objAttIntPtr = Marshal.AllocHGlobal(Marshal.SizeOf(objAttributes));
objAttributes.ObjectName = objAttIntPtr;
objAttributes.SecurityDescriptor = IntPtr.Zero;
objAttributes.SecurityQualityOfService = IntPtr.Zero;
IntPtr.Zero, System.Convert.ToUInt32(0));
ref IntPtr SectionHandle,
IntPtr ObjectAttributes,
IntPtr FileHandle);
def NtCreateSection(ref SectionHandle as IntPtr, DesiredAccess as UInt32, ObjectAttributes as IntPtr, ref MaximumSize as LARGE_INTEGER, SectionPageProtection as UInt32, AllocationAttributes as UInt32, FileHandle as IntPtr) as UInt32:
IntPtr SectionHandle = IntPtr.Zero;
uint res = NtCreateSection(ref SectionHandle, SECTION_ALL_ACCESS, IntPtr.Zero, ref MaximumSize, EXECUTE_READ_WRITE, SEC_COMMIT,IntPtr.Zero);
static extern NTSTATUS NtCreateThreadEx(ref IntPtr threadHandle, UInt32 desiredAccess, IntPtr objectAttributes, IntPtr processHandle, IntPtr startAddress, IntPtr parameter, bool inCreateSuspended, Int32 stackZeroBits, Int32 sizeOfStack, Int32 maximumStackSize, IntPtr attributeList);
ref threadHandle as IntPtr
objectAttributes as IntPtr
processHandle as IntPtr,
startAddress as IntPtr,
parameter as IntPtr,
attributeList as IntPtr) as UInt32:
static extern UInt32 NtCreateUserProcess(ref IntPtr ProcessHandle, ref IntPtr ThreadHandle, AccessMask ProcessDesiredAccess, AccessMask ThreadDesiredAccess, IntPtr ProcessObjectAttributes, IntPtr ThreadObjectAttributes, UInt32 ProcessFlags, UInt32 ThreadFlags, IntPtr ProcessParameters, ref PS_CREATE_INFO CreateInfo, ref PS_ATTRIBUTE_LIST AttributeList);
ref ProcessHandle as IntPtr,
ref ThreadHandle as IntPtr,
ProcessObjectAttributes as IntPtr,
ThreadObjectAttributes as IntPtr,
ProcessParameters as IntPtr,
Size as UIntPtr
Size as UIntPtr
Value as IntPtr
ReturnLength as IntPtr
TotalLength as UIntPtr
<DllImport("ntdll")> Private Shared Function NtGetContextThread(ByVal hThr As IntPtr, ByVal CNTXT As UInteger()) As <MarshalAs(UnmanagedType.Bool)> Boolean
def NtGetContextThread(ThreadHandle as IntPtr, ref lpContext as Context) as UInt32:
def NtGetContextThread(ThreadHandle as IntPtr, lpContext as IntPtr) as UInt32:
IntPtr SectionHandle,
IntPtr ProcessHandle,
ref IntPtr BaseAddress,
UIntPtr ZeroBits,
UIntPtr CommitSize,
SectionHandle as IntPtr,
ProcessHandle as IntPtr,
ref BaseAddress as IntPtr,
ZeroBits as IntPtr,
CommitSize as IntPtr,
SectionOffset as IntPtr, 11: NtOpenProcess
static extern NTSTATUS NtOpenProcess(ref IntPtr ProcessHandle, UInt32 AccessMask, ref OBJECT_ATTRIBUTES ObjectAttributes, ref CLIENT_ID ClientId);
def NtOpenProcess(ref ProcessHandle as IntPtr, AccessMask as UInt32, ref ObjectAttributes as OBJECT_ATTRIBUTES, ref ClientId as CLIENT_ID) as UInt32:
RootDirectory as IntPtr
ObjectName as IntPtr
SecurityDescriptor as IntPtr
SecurityQualityOfService as IntPtr
UniqueProcess as IntPtr
UniqueThread as IntPtr
static extern NTSTATUS NtProtectVirtualMemory(IntPtr ProcessHandle, ref IntPtr BaseAddress, ref UInt32 NumberOfBytesToProtect, UInt32 NewAccessProtection, ref UInt32 OldAccessProtection);
def NtProtectVirtualMemory(ProcessHandle as IntPtr, ref BaseAddress as IntPtr, ref NumberOfBytesToProtect as UInt32, NewAccessProtection as UInt32, ref OldAccessProtection as UInt32) as NTSTATUS:
IntPtr Buffer,
[DllImport("ntdll.dll", SetLastError=true)] static extern IntPtr NtQueryInformationFile(IntPtr fileHandle, ref IO_STATUS_BLOCK IoStatusBlock, IntPtr pInfoBlock, uint length, FILE_INFORMATION_CLASS fileInformation);
Declare Function NtQueryInformationFile Lib "ntdll.dll" (ByVal fileHandle As IntPtr, ByRef IoStatusBlock As IO_STATUS_BLOCK, ByVal pInfoBlock As IntPtr, ByVal length As UInteger, ByVal fileInformation As FILE_INFORMATION_CLASS) As IntPtr
static extern IntPtr NtQueryInformationFile(SafeFileHandle fileHandle, ref IO_STATUS_BLOCK IoStatusBlock, IntPtr pInfoBlock, uint length, FILE_INFORMATION_CLASS fileInformation);
IntPtr p_fbi = IntPtr.Zero;
IntPtr iprc = NtQueryInformationFile(fs.SafeFileHandle, ref iosb, p_fbi, (uint)Marshal.SizeOf(fbi), FILE_INFORMATION_CLASS.FileBasicInformation);
brc = iprc == IntPtr.Zero && iosb.status == 0;
if(p_fbi != IntPtr.Zero) { Marshal.FreeHGlobal(p_fbi); }
static extern int NtQueryInformationProcess(IntPtr processHandle, int processInformationClass, IntPtr processInformation, uint processInformationLength, IntPtr returnLength);
static extern int NtQueryInformationProcess(IntPtr hProcess, PROCESSINFOCLASS pic, out PROCESS_BASIC_INFORMATION pbi, int cb, out int pSize);
public static extern void NtQueryInformationProcess(IntPtr ProcessHandle, PROCESSINFOCLASS ProcessInformationClass, out PROCESS_EXTENDED_BASIC_INFORMATION ProcessInformation, uint ProcessInformationLength, out uint ReturnLength);
processHandle As IntPtr, processInformationClass As Integer, _
processInformation As IntPtr, processInformationLength As Integer, _
returnLength As IntPtr) As Integer
hProcess as IntPtr,
Reserved1 as IntPtr
PebAddress as IntPtr
Reserved2 as (IntPtr)
UniquePid as IntPtr
Reserved3 as IntPtr
public static IntPtr GetPEBAddress()
IntPtr hProc = OpenProcess(0x001F0FFF, false, Process.GetCurrentProcess().Id);
IntPtr pbi = Marshal.AllocHGlobal(Marshal.SizeOf(typeof(PROCESS_BASIC_INFORMATION)));
IntPtr outLong = Marshal.AllocHGlobal(sizeof(long));
IntPtr outPtr = IntPtr.Zero;
IntPtr hProc = OpenProcess((ProcessAccessFlags)0x001F0FFF, false, Process.GetCurrentProcess().Id);
if (!hProc.Equals(IntPtr.Zero))
hProc = IntPtr.Zero; 16: NtQueryObject
public static extern NtStatus NtQueryObject(IntPtr objectHandle, OBJECT_INFORMATION_CLASS informationClass, IntPtr informationPtr, uint informationLength, ref uint returnLength);
public static IntPtr NtQueryObject(IntPtr handle, OBJECT_INFORMATION_CLASS infoClass, uint infoLength = 0)
IntPtr infoPtr = Marshal.AllocHGlobal((int)infoLength);
return IntPtr.Zero;
public static extern NtStatus NtQuerySystemInformation(SYSTEM_INFORMATION_CLASS SystemInformationClass, IntPtr SystemInformation, uint SystemInformationLength, out uint ReturnLength);
public static extern void NtQuerySystemInformation(SYSTEM_INFORMATION_CLASS SystemInformationClass, IntPtr SystemInformation, uint SystemInformationLength, out uint ReturnLength);
public static IntPtr NtQuerySystemInformation(SYSTEM_INFORMATION_CLASS infoClass, uint infoLength = 0)
return IntPtr.Zero;
return IntPtr.Zero;
IntPtr
ProcessHandle as IntPtr,
BaseAddress as IntPtr,
BaseAddress as IntPtr
AllocationBase as IntPtr
RegionSize as IntPtr
private static extern uint NtQueryWnfStateData(IntPtr pStateName, IntPtr pTypeId, IntPtr pExplicitScope, out uint nChangeStamp, out IntPtr pBuffer, ref uint nBufferSize);
uint nBufferSize = (uint)Marshal.SizeOf(typeof(IntPtr));
IntPtr pStateName = Marshal.AllocHGlobal(Marshal.SizeOf(typeof(WNF_STATE_NAME)));
bool success = NtQueryWnfStateData(pStateName, IntPtr.Zero, IntPtr.Zero, out uint nChangeStamp, out IntPtr pBuffer, ref nBufferSize) == 0; 20: NtRaiseHandError
IntPtr Parameters,
IntPtr Parameters,
Private Shared Function NtRaiseHardError(ByVal ErrorStatus As UInteger, ByVal NumberOfParameters As UInteger, ByVal UnicodeStringParameterMask As UInteger, ByVal Parameters As IntPtr, ByVal ValidResponseOption As UInteger, <Out()> ByRef Response As UInteger) As
NtRaiseHardError(0xC0000420, 0, 0, IntPtr.Zero, 6, out uint Response);
NtRaiseHardError(3221226528, 0, 0, IntPtr.Zero, 6, Response)
static extern NtStatus NtReadVirtualMemory(IntPtr ProcessHandle, IntPtr BaseAddress, byte[] Buffer, UInt32 NumberOfBytesToRead, ref UInt32 NumberOfBytesRead);
def NtReadVirtualMemory(ProcessHandle as IntPtr, BaseAddress as IntPtr, Buffer as (byte), NumberOfBytesToRead as UInt32, ref NumberOfBytesRead as UInt32) as UInt32: 22: NtResumeProcess
public static extern void NtResumeProcess(IntPtr processHandle);
Public Shared Sub NtResumeProcess(ByVal ProcessHandle As IntPtr) 23: NtResumeThread
def NtResumeThread(ThreadHandle as IntPtr, ref SuspendCount as UInt32) as UInt32:
def NtSetContextThread(ThreadHandle as IntPtr, ref lpContext as Context) as UInt32:
def NtSetContextThread(ThreadHandle as IntPtr, lpContext as IntPtr) as UInt32:
static extern int NtSetProcessIsCritical(bool NewValue, bool* OldValue, IntPtr reserved);
static extern UInt32 NtSetSystemInformation(NtSystemInformation.SYSTEM_INFORMATION_CLASS InfoClass, IntPtr Info, UInt32 Length);
public static void SetSystemInformation(NtSystemInformation.SYSTEM_INFORMATION_CLASS InfoClass, IntPtr Info, UInt32 Length) 27: NtSuspendProcess
public static extern void NtSuspendProcess(IntPtr processHandle);
Public Shared Sub NtSuspendProcess(ByVal ProcessHandle As IntPtr)
static extern uint NtTerminateProcess(IntPtr hProcess, int errorStatus);
Public Shared Function NtTerminateProcess(ByVal hfandle As IntPtr, ByVal ErrorStatus As Integer) As UInteger
def NtTerminateProcess(ProcessHandle as IntPtr, ExitStatus as UInt32) as UInt32: IntPtr processHandle = process.Handle;
def NtTerminateThread(ThreadHandle as IntPtr, ExitStatus as UInt32) as UInt32:
static extern uint NtUnmapViewOfSection(IntPtr hProc, IntPtr baseAddr);
<DllImport("ntdll")> Private Shared Function NtUnmapViewOfSection(ByVal hProc As IntPtr, ByVal baseAddr As IntPtr) As UInteger
hProcess as IntPtr,
Reserved1 as (IntPtr)
Reserved2 as (IntPtr)
UniqueProcessId as (IntPtr)
Reserved3 as (IntPtr)
hProcess as IntPtr,
hProcess as IntPtr,
static extern NTSTATUS NtWriteVirtualMemory(IntPtr ProcessHandle, IntPtr BaseAddress, byte[] Buffer, UInt32 NumberOfBytesToWrite, ref UInt32 NumberOfBytesWritten);
def NtWriteVirtualMemory(ProcessHandle as IntPtr, BaseAddress as IntPtr, Buffer as (byte), NumberOfBytesToWrite as UInt32, ref NumberOfBytesWritten as UInt32) as UInt32:
public static extern IntPtr RtlAdjustPrivilege(int Privilege, bool bEnablePrivilege,
public static extern IntPtr RtlAdjustPrivilege(Privilege privilege, bool bEnablePrivilege,
ref ProcessParameters as IntPtr,
DllPath as IntPtr,
Environment as IntPtr,
ShellInfo as IntPtr,
RuntimeData as IntPtr,
Buffer as IntPtr
static extern IntPtr RtlCreateUserThread(IntPtr processHandle, IntPtr threadSecurity, bool createSuspended, Int32 stackZeroBits, IntPtr stackReserved, IntPtr stackCommit, IntPtr startAddress, IntPtr parameter, ref IntPtr threadHandle, IntPtr clientId);
def RtlCreateUserThread(processHandle as IntPtr, threadSecurity as IntPtr, createSuspended as bool, stackZeroBits as Int32, stackReserved as IntPtr, stackCommit as IntPtr, startAddress as IntPtr, parameter as IntPtr, ref threadHandle as IntPtr, clientId as IntPtr) as IntPtr:
def RtlDestroyProcessParameters(ProcessParameters as IntPtr): 39: RtlGetCurrentPeb
def RtlGetCurrentPeb() as IntPtr:
Buffer as IntPtr
static extern uint RtlSetProcessIsCritical(bool bNew, IntPtr expectsZero, bool bNeedsScb);
IntPtr 43: ZwClose
public static extern IntPtr ZwClose(IntPtr handle);
Declare Sub ZwClose Lib "ntdll.dll" (Handle As Intptr) 44: ZwCreateThreadEx
static extern void ZwCreateThreadEx(ref IntPtr threadHandle, AccessMask desiredAccess, IntPtr objectAttributes, IntPtr processHandle, IntPtr startAddress, IntPtr parameter, bool inCreateSuspended, Int32 stackZeroBits, Int32 sizeOfStack, Int32 maximumStackSize, IntPtr attributeList);
def ZwCreateThreadEx(ref threadHandle as IntPtr, desiredAccess as AccessMask, objectAttributes as IntPtr, processHandle as IntPtr, startAddress as IntPtr, parameter as IntPtr, inCreateSuspended as bool, stackZeroBits as Int32, sizeOfStack as Int32, maximumStackSize as Int32, attributeList as IntPtr): 45: ZwOpenSection
public static extern IntPtr ZwOpenSection(
out IntPtr sectionHandle, uint desiredAccess, ref OBJECT_ATTRIBUTES attributes);
IntPtr hProcess,
hProcess as IntPtr,
Reserved1 as IntPtr
PebAddress as IntPtr
Reserved2 as (IntPtr)
UniquePid as IntPtr
Reserved3 as IntPtr comdlg3247: ChooseFont
public extern static bool ChooseFont(IntPtr lpcf);
public IntPtr hwndOwner;
public IntPtr hDC;
public IntPtr lpLogFont;
public IntPtr lCustData;
public IntPtr lpfnHook;
public IntPtr hInstance;
IntPtr pLogfont = Marshal.AllocHGlobal(Marshal.SizeOf(logfont));
IntPtr pChoosefont = Marshal.AllocHGlobal(Marshal.SizeOf(choosefont)); 48: FtpCommand
static extern bool FtpCommand(IntPtr hConnect, bool fExpectResponse, [MarshalAs(UnmanagedType.U4)] int dwFlags, string lpszCommand, IntPtr dwContext, ref IntPtr phFtpCommand);
Private Shared Function FtpCommand(ByVal hConnect As IntPtr, ByVal fExpectResponse As Boolean, <MarshalAs(UnmanagedType.U4)> ByVal dwFlags As Integer, ByVal lpszCommand As String, ByVal dwContext As IntPtr, ByRef phFtpCommand As IntPtr) As Boolean The dwContext parameter is declared as an IntPtr because the original declaration was as a DWORD_PTR, which is noted to be the size of a native pointer on the platform. 49: GetOpenFileName
Public dlgOwner As IntPtr = IntPtr.Zero
Public instance As IntPtr = IntPtr.Zero
Public custData As IntPtr = IntPtr.Zero
Public hook As IntPtr = IntPtr.Zero
Public reservedPtr As IntPtr = IntPtr.Zero 50: GetSaveFileName
Public dlgOwner As IntPtr = IntPtr.Zero
Public instance As IntPtr = IntPtr.Zero
Public custData As IntPtr = IntPtr.Zero
Public hook As IntPtr = IntPtr.Zero
Public reservedPtr As IntPtr = IntPtr.Zero 51: PrintDlg
IntPtr hwndDialogOwner) 52: PrintDlgEx
Private m_hParent As IntPtr
Public Property Parent() As IntPtr
Set(ByVal value As IntPtr)
Public hwndOwner As IntPtr
Public hDevMode As IntPtr
Public hDevNames As IntPtr
Public hDC As IntPtr = IntPtr.Zero
Public lpPageRanges As IntPtr
Public hInstance As IntPtr = IntPtr.Zero
Public lpCallback As IntPtr = IntPtr.Zero
Public lphPropertyPages As IntPtr = IntPtr.Zero iphlpapi53: AddIPAddress
out IntPtr NTEContext, out IntPtr NTEInstance );
out IntPtr NTEContext, out IntPtr NTEInstance );
IntPtr ptrMyNTEContext = new IntPtr(MyNTEContext);
IntPtr ptrMyNTEInstance = new IntPtr(MyNTEInstance); 54: EnableRouter
static extern int EnableRouter(IntPtr pHandle, ref System.Threading.NativeOverlapped pOverlapped);
Public Shared Function EnableRouter(pHandle As IntPtr, ByRef pOverlapped As OVERLAPPED) As Integer
Public Pointer As IntPtr
Public hEvent As IntPtr
Public Shared Function EnableRouter(pHandle As IntPtr, ByRef pOverlapped As OVERLAPPED) As Integer
Public Shared Function CreateEvent(lpEventAttributes As IntPtr, ByVal bManualReset As Boolean, ByVal bInitialState As Boolean, ByVal lpName As String) As IntPtr
pOverlapped.hEvent = CreateEvent(IntPtr.Zero, False, False, "enablerouter")
Dim RetVal As Integer = EnableRouter(IntPtr.Zero, pOverlapped) 55: FIXED_INFO
public IntPtr CurrentDnsServer;
private static extern ERROR GetAdaptersAddresses(uint Family, uint Flags, IntPtr Reserved, IntPtr pAdapterAddresses, ref uint pOutBufLen);
public IntPtr lpSockAddr;
public IntPtr Next;
public IntPtr Next;
public IntPtr FirstUnicastAddress;
public IntPtr FirstAnycastAddress;
public IntPtr FirstMulticastAddress;
public IntPtr FirstDnsServerAddress;
public IntPtr FirstPrefix;
public IntPtr FirstWinsServerAddress;
public IntPtr FirstGatewayAddress;
private static extern ERROR GetAdaptersAddresses(uint Family, uint Flags, IntPtr Reserved, IntPtr pAdapterAddresses, ref uint pOutBufLen);
public static string MarshalString(IntPtr text)
ERROR err = GetAdaptersAddresses((uint)family, (uint)0, IntPtr.Zero, IntPtr.Zero, ref outBufLen);
IntPtr pAdapterAddresses = Marshal.AllocHGlobal((int)outBufLen);
err = GetAdaptersAddresses((uint)family, (uint)0, IntPtr.Zero, pAdapterAddresses, ref outBufLen);
IntPtr currPtr = pAdapterAddresses;
while (IntPtr.Zero != currPtr)
if (IntPtr.Zero != addr.FirstUnicastAddress)
if (IntPtr.Zero != unicastAddr.Address.lpSockAddr) 57: GetAdaptersInfo
public static extern int GetAdaptersInfo(IntPtr pAdapterInfo, ref Int64 pBufOutLen);
ByVal pAdapterInfo As IntPtr, _
Dim pArray As IntPtr = Marshal.AllocHGlobal(structSize)
pArray = Marshal.ReAllocHGlobal(pArray, New IntPtr(Convert.ToInt64(len)))
Dim pEntry As IntPtr = pArray
Loop Until IntPtr.op_Equality(pEntry, IntPtr.Zero)
IntPtr pArray = Marshal.AllocHGlobal( new IntPtr(structSize) );
pArray = Marshal.ReAllocHGlobal( pArray, new IntPtr (structSize) );
IntPtr pEntry = pArray;
while( pEntry != IntPtr.Zero );
static extern uint GetExtendedTcpTable(IntPtr pTcpTable, ref int dwOutBufLen, bool sort, int ipVersion, TCP_TABLE_CLASS tblClass,uint reserved = 0);
Public Shared Function GetExtendedTcpTable(ByVal pTcpTable As IntPtr, ByRef dwOutBufLen As Integer, ByVal sort As Boolean, ByVal ipVersion As Integer, ByVal tblClass As TCP_TABLE_CLASS, ByVal reserved As Integer) As UInteger
uint ret = GetExtendedTcpTable(IntPtr.Zero, ref buffSize, true, ipVersion, TCP_TABLE_CLASS.TCP_TABLE_OWNER_PID_ALL);
IntPtr tcpTablePtr = Marshal.AllocHGlobal(buffSize);
IntPtr rowPtr = (IntPtr)((long)tcpTablePtr + 4);
rowPtr = (IntPtr)((long)rowPtr + rowStructSize); // next entry
uint ret = GetExtendedTcpTable(IntPtr.Zero, ref buffSize, true, AF_INET, TCP_TABLE_CLASS.TCP_TABLE_OWNER_PID_ALL);
IntPtr buffTable = Marshal.AllocHGlobal(buffSize);
IntPtr rowPtr = (IntPtr)((long)buffTable + Marshal.SizeOf(tab.dwNumEntries));
rowPtr = (IntPtr)((long)rowPtr + Marshal.SizeOf(tcpRow)); // next entry
IntPtr tcpTable,
uint ret = IPHelperAPI.GetExtendedTcpTable(IntPtr.Zero, ref buffSize, true, ipVersion, TCP_TABLE_CLASS.TCP_TABLE_OWNER_PID_ALL);
IntPtr tcpTablePtr = Marshal.AllocHGlobal(buffSize);
IntPtr rowPtr = (IntPtr)((long)tcpTablePtr + 4);
rowPtr = (IntPtr)((long)rowPtr + rowStructSize); // next entry
Dim Ret As UInteger = GetExtendedTcpTable(IntPtr.Zero, BufLen, True, AF_INET, TCP_TABLE_CLASS.TCP_TABLE_OWNER_PID_ALL, 0)
Dim TblPtr As IntPtr = Marshal.AllocHGlobal(BufLen)
Dim RowArrayPtr As IntPtr = CType((CLng(TblPtr) + CLng(Marshal.OffsetOf(GetType(MIB_TCPTABLE_OWNER_PID), "table"))), IntPtr)
RowArrayPtr = CType((CLng(RowArrayPtr) + RowStructSize), IntPtr) 59: GetIfTable
public static extern uint GetIfTable(IntPtr pIfTable, ref uint pdwSize, bool bOrder);
IPHelperTraslation.GetIfTable(IntPtr.Zero, ref size, false);
IntPtr buf = Marshal.AllocHGlobal((int)size);
mRows[i] = (IPHelperTraslation.MIB_IFROW)Marshal.PtrToStructure((IntPtr)pRows, typeof(IPHelperTraslation.MIB_IFROW)); 60: GetInterfaceInfo
Marshal.Copy(buffer, 0, new IntPtr(&iNumAdapters), 4);
IntPtr ptr = Marshal.AllocHGlobal(Marshal.SizeOf(map)); Cut off search results after 60. Please refine your search. |