On 28 Oct 2002, Alexandre Julliard wrote:
Greg Turner gmturner007@Ameritech.Net (by way of Greg Turner gmturner007@ameritech.net) writes:
o I don't yet know how to properly raise and catch exceptions in wine. I see some examples, but I don't see any of try/finally, of which I am a big fan and would probably like to use. Is there a guide somewhere on how to do these things?
You can use the macros in include/wine/exception.h. But setting up exception frames in Wine is quite expensive because the compiler doesn't do it for us, so you shouldn't use them except where really necessary for compatibility.
It also appears that implementing RpcTryExcept ... RpcExcept(expression) ... RpcEndExcept is next to impossible, from the looks of those macros. Even RpcTryFinally ... RpcFinally ... RpcEndFinally would be difficult... So we'd probably either have to strip/rewrite exception handling from MIDL output or beef up WIDL, if no really clever guy can implement those macros (I don't feel clever enough).
Anyway, Alexandre, what was your stance on putting MIDL-generated code into Wine (pending WIDL getting good enough)?