[DllImport("user32.dll")]
static extern int EnumPropsEx(IntPtr hWnd, EnumPropsExDelegate lpEnumFunc,
IntPtr lParam);
None.
None.
Please add some!
internal class Program
{
[DllImport("user32.dll")]
static extern int EnumPropsEx(IntPtr hWnd, EnumPropsExDelegate lpEnumFunc, IntPtr lParam);
//author: roishabtai@hotmail.com
private delegate int EnumPropsExDelegate(IntPtr hwnd, IntPtr lpszString, IntPtr hData, IntPtr dwData);
private static void Main(string[] args)
{
//author: roishabtai@hotmail.com
IntPtr hWnd = new IntPtr(XXXXXX); //Enter handle value here. use UI Spy/Inspect to get it
EnumPropsExDelegate enumPropsExDel = new EnumPropsExDelegate(PropEnumProcEx);
var i = EnumPropsEx(hWnd, enumPropsExDel, new IntPtr());
Console.WriteLine("Press any key to continue...");
Console.Read();
}
//the actual delegate for the WinApi function
public static int PropEnumProcEx(IntPtr hwnd, IntPtr lpszString, IntPtr hData, IntPtr dwData)
{
//Window's property name
string propName;
//Copy the string pointed to by lpString into a "real" string.
propName = Marshal.PtrToStringAnsi(lpszString);
Console.WriteLine("Property name: " + propName); // Output values
//Continue
return 1;
}
}
Do you know one? Please contribute it!