Hi,
I'm implementing NtLoadKey, but I can't find any documentation on making server requests, ie SERVER_START_REQ, the different tracing abilitites such as using fprintf(stderr,...) instead of the known TRACE, style of code etc. The latter two are not as important to me because I've picked them up while perusing the code, but it might be important to someone who hasn't looked through it before. I do need the semantics for SERVER_START_REQ, so if you could point me in the right direction or tell me I would really appreciate it.
On Mon, 7 Mar 2005 11:51:53 -0600, James Hawkins truiken@gmail.com wrote:
Hi,
I'm implementing NtLoadKey, but I can't find any documentation on making server requests, ie SERVER_START_REQ, the different tracing abilitites such as using fprintf(stderr,...) instead of the known TRACE, style of code etc. The latter two are not as important to me because I've picked them up while perusing the code, but it might be important to someone who hasn't looked through it before. I do need the semantics for SERVER_START_REQ, so if you could point me in the right direction or tell me I would really appreciate it.
I've looked deeper into this and found include/wine/server.h and the SERVER_START_REQ define. So this define is a method of communication between the client(?) and server? One thing I don't understand is why we put the request in two do...while(0) loops. Won't they just run once anyway?
Concerning Reg/NtLoadKey, load_key (in the server) looks implemented to me. NtLoadKey is not is not implemented. RegLoadKeyW/A is implemented, but it opens the file containing the hive to load to the registry and then calls load_registry which loads a part of the registry from a file. While this probably does work, I think the correct thing to do is:
* Implement NtLoadKey, having it call load_key in the server * Rewrite RegLoadKey to call NtLoadKey
What do you think?
On Mon, 07 Mar 2005 15:21:45 -0600, James Hawkins wrote:
I've looked deeper into this and found include/wine/server.h and the SERVER_START_REQ define. So this define is a method of communication between the client(?) and server?
Yep, pretty much. It sets up some state for the wine_server_call later.
One thing I don't understand is why
we put the request in two do...while(0) loops. Won't they just run once anyway?
It's a portability thing, basically just declaring a new scope, you can ignore it - do {} while (0) runs the body of the block once.
thanks -mike
Mike Hearn wrote:
One thing I don't understand is why
we put the request in two do...while(0) loops. Won't they just run once anyway?
It's a portability thing, basically just declaring a new scope, you can ignore it - do {} while (0) runs the body of the block once.
It's to make sure that code written with SERVER_START_REQ ends with SERVER_END_REQ, and that the block ends with a semi-colon.
Mike