I have a C# program which loads a C++ unmanaged dll and calls its functions. The dll performs some operations and if an error or exception occurs, it displays a windows message box. So if no error is encountered, no message box will be shown. It is worth mentioning that I don't have the source of the dll.
Now if I call a function of the dll in C#, the only way for me to assure that it is successfully executed is to check whether any message boxes is shown during its call. My question is, how can I do this? i.e. detect messagebox calls by the dll?