Hello,
I am having the oddest error with the EnumChildWindow s function. Below are
the imports, and the methods.
[DllImport("user 32.dll", SetLastError=tr ue)]
public static extern int EnumChildWindow s(IntPtr hWndParent, EnumChildProc
callback, int lParam);
public delegate int EnumChildProc(I ntPtr hwnd, long lParam);
public void M_initChildWind ows()
{
if(WindowObject _Basic_GDI_Hand le != IntPtr.Zero)
{
try
{
User32.EnumChil dWindows(Window Object_Basic_GD I_Handle, new
User32.EnumChil dProc(M_addChil dWindows), 0);
}
catch(Exception e)
{
System.Diagnost ics.Debug.Write Line("Child Window failure: " +
e.Message);
}
}
}
private int M_addChildWindo ws(IntPtr Window, long Data)
{
if(Window != IntPtr.Zero)
{
ChildWindowObje ct_Basic c_WindowObject_ Basic = new
ChildWindowObje ct_Basic(Window );
c_WindowObject_ Basic_Array.Add (c_WindowObject _Basic);
}
return 1;
}
I keep getting a 127 error, even though it appears to enumerate the windows.
I placed it within a try statement to continue working other things, but
it's coming back to bite me in the ass.
Anyone have any ideas?
Thanks,
Ryan
I am having the oddest error with the EnumChildWindow s function. Below are
the imports, and the methods.
[DllImport("user 32.dll", SetLastError=tr ue)]
public static extern int EnumChildWindow s(IntPtr hWndParent, EnumChildProc
callback, int lParam);
public delegate int EnumChildProc(I ntPtr hwnd, long lParam);
public void M_initChildWind ows()
{
if(WindowObject _Basic_GDI_Hand le != IntPtr.Zero)
{
try
{
User32.EnumChil dWindows(Window Object_Basic_GD I_Handle, new
User32.EnumChil dProc(M_addChil dWindows), 0);
}
catch(Exception e)
{
System.Diagnost ics.Debug.Write Line("Child Window failure: " +
e.Message);
}
}
}
private int M_addChildWindo ws(IntPtr Window, long Data)
{
if(Window != IntPtr.Zero)
{
ChildWindowObje ct_Basic c_WindowObject_ Basic = new
ChildWindowObje ct_Basic(Window );
c_WindowObject_ Basic_Array.Add (c_WindowObject _Basic);
}
return 1;
}
I keep getting a 127 error, even though it appears to enumerate the windows.
I placed it within a try statement to continue working other things, but
it's coming back to bite me in the ass.
Anyone have any ideas?
Thanks,
Ryan
Comment