Type a page name and press Enter. You'll jump to the page if it exists, or you can create it if it doesn't.
To create a page in a module other than user32, prefix the name with the module name and a period.
EnumPropsEx (user32)
.
C# Signature:
[DllImport("user32.dll")]
static extern int EnumPropsEx(IntPtr hWnd, EnumPropsExDelegate lpEnumFunc,
IntPtr lParam);
User-Defined Types:
None.
Notes:
None.
Tips & Tricks:
Please add some!
Sample Code:
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, long hData, long 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, long hData, long 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;
}
}
Alternative Managed API:
Do you know one? Please contribute it!
The EnumPropsEx API
4/5/2012 1:16:13 AM - -109.65.18.131
Please edit this page!
Do you have...
helpful tips or sample code to share for using this API in managed code?
corrections to the existing content?
variations of the signature you want to share?
additional languages you want to include?
Select "Edit This Page" on the right hand toolbar and edit it! Or add new pages containing supporting types needed for this API (structures, delegates, and more).