In C# I call a function from a native code dll and need to get a callback so I know when to continue. Currently the native code sends a message on successful completion which I can get by overriding WndProc but I think a callback from the native code would be a much better solution. Because the native code writes a file and for various reasons its not really acceptable to constantly be checking to see if the file exists so my managed code needs to know when the successful write occurs.
Can someone point me or provide me with some example code of this in action

Example of using delegates and callbacks from managed to native code needed
Dan Fernandez - MSFT
Here's a classic example of using delegate for call back from native to managed. Keep in mind these call backs only supported in NETCF V2.
http://pinvoke.net/default.aspx/user32/EnumWindows.html