Am Montag, 3. Dezember 2007 13:55:59 schrieb nessi@nessi-online.de:
I know, that I can find a workaround for this case, but this in not my problem. How can I handle, in principle, such exceptions? What is the reason for creating a function stub without an implementation ???
The reason is often that there is an application that tries to load the function, but never calls it. It refuses to start without getting a pointer to this unused function. Or an application that refuses to run if it doesn't like the exports from a DLL. For example, copy protection systems might check the exports, and refuse if your DLL has different exports than Windows.
The @stub stubs are pretty rare nowadays, for exactly the reason you give. Usual stubs have a real implementation function which just returns an error or OK and writes a note to the FIXME channel.
The stub in question was added by patch 27e8b829a4cc56969836c0dbbb4db4b775d52a9f, which was intended to fix bug #9116.
To answer your question what to do, the usual way to fix this is to implement the function in Wine. I understand that this is most likely not a suitable solution for you, after all you're working on your application, not Wine. I do not know advapi32, so I cannot implement this function myself, but if no one steps up in the next days I can send a small patch that just adds a nicer stub that doesn't crash.