Wednesday, November 23, 2005, 4:53:23 AM, Alexandre Julliard wrote: > Vitaliy Margolen <[EMAIL PROTECTED]> writes:
>> +/* get parts of an OBJECT_ATTRIBUTES into object_attr */ >> +#define GET_OBJECT_ATTR(a,r,n) \ >> + get_req_unicode_str( n ); \ >> + (a)->rootdir = (r)->rootdir; \ >> + (a)->attributes = (r)->attributes; \ >> + (a)->name = (n); >> + > That's ugly, please pass parameters explicitly to the functions, don't > hide them inside an object_attr structure. Also directories inside the > server have to be specified as directory objects, not as handles. So instead of: void *create_named_object_dir( const struct object_attr *attr, const struct object_ops *ops ); DECL_HANDLER([open/close]_object) { ... GET_OBJECT_ATTR(&attr, req, &name) if ((dir = create_directory( &attr ))) ... you want this: void *create_named_object_dir( const struct object *rootdir, const struct unicode_str *name, unsigned int attr, const struct object_ops *ops ); DECL_HANDLER([open/create]_directory) { ... get_req_unicode_str( &name ); if (req->rootdir) root_obj = get_handle_obj( current->process, req->rootdir, 0, &directory_ops ); dir = create_directory( root_obj, &name, req->attributes ); if (root_obj) release_object( root_obj ); ... For each named object? Vitaliy