G
Guest
I am writing a Windows Forms application using VS.NET and C#. Upon user request I launch a Help Viewer as defined by a CHM file. The viewer window appears as expected. Upon some other user action I want to close (destroy) the viewer window. I am using the SDK functions [user32.dll] FindWindow() and DestroyWindow() to get the window handle and then destroy the window
However, the DestroyWindow() function returns a result of zero (not successful), so I then make a call to [kernel32.dll] GetLastError(). It returns the value 5, which is the error ERROR_ACCESS_DENIED
Why is the application that created a window not allowed to destroy it
What do I need to do to allow my application to destroy the window
Thanks
Dav
However, the DestroyWindow() function returns a result of zero (not successful), so I then make a call to [kernel32.dll] GetLastError(). It returns the value 5, which is the error ERROR_ACCESS_DENIED
Why is the application that created a window not allowed to destroy it
What do I need to do to allow my application to destroy the window
Thanks
Dav