Desktop Functions: Smart Device Functions:
|
Search Results for "TCITEM" in [All]user321: TCITEM
struct TCITEM
Declare Function TCITEM Lib "user32.dll" (TODO) As TODO
TCITEM tcitem = new TCITEM();
tcitem.size = 200;
IntPtr tcitemPtr = VirtualAllocEx(process, IntPtr.Zero, (uint)Marshal.SizeOf(typeof(TCITEM)), AllocationType.Commit, MemoryProtection.ReadWrite);
tcitem.mask = TCIF_STATE | TCIF_TEXT;
tcitem.text = pszTextPtr;
IntPtr ptr = Marshal.AllocHGlobal(Marshal.SizeOf(tcitem));
Marshal.StructureToPtr(tcitem, ptr, true);
tcitem.size = 1; // überschrieben
WriteProcessMemory(process, tcitemPtr, ptr, Marshal.SizeOf(tcitem), IntPtr.Zero);
int res = SendMessage(handle, TCM_GETITEMA, index, tcitemPtr);
ptr = Marshal.AllocHGlobal(Marshal.SizeOf(tcitem));
ReadProcessMemory(process, tcitemPtr, ptr, (int)Marshal.SizeOf(tcitem), out bytesReaded);
tcitem = (TCITEM)Marshal.PtrToStructure(ptr, tcitem.GetType());
VirtualFreeEx(process, tcitemPtr, 0, FreeType.Release); |