Ok, it's days I'm in trouble with this... it should be easy!

Say we have to do a class (say Windows) wich wraps EnumWindows (DllImpors[(user32.dll)])

This class have just to raise the event Enumerate for each call of EnumWindows to its callback.

I've no idea about how to do it!


PHP Code:
public class Windows

        
[DllImport("user32.dll")] private static extern 
              int EnumWindows
(EnumWindowsProc ewpint lParam); 

        
//delegate used for EnumWindows() callback function
        
public delegate bool EnumWindowsProc(int hWndint lParam);

        public 
Windows()
        {
            
//Declare a callback delegate for EnumWindows() API call
            
EnumWindowsProc ewp = new EnumWindowsProc(EvalWindow);
            
//Enumerate all Windows
            
EnumWindows(ewp0);
        }
        
//EnumWindows CALLBACK function
        
private bool EvalWindow(int hWndint lParam)
        {
         
// RAISE THE EVENT!
         // HOW???
        
}
        
    }

How to fill the "raising of event"?

Thanx