http://bugs.winehq.org/show_bug.cgi?id=14846
--- Comment #1 from martinmnet martinmnet@hotmail.com 2008-08-14 09:00:44 --- (In reply to comment #0)
Created an attachment (id=15387)
--> (http://bugs.winehq.org/attachment.cgi?id=15387) [details]
Suggested patch
widl doesn't generate code for handling SC_RPC_HANDLE being NULL.
RPC_X_NULL_REF_POINTER is raised for NULL pointers on strins. So it makes sense that RPC_X_SS_IN_NULL_CONTEXT should be raised for NULL handle.
More Info:
In windows, calling service functions with NULL for SC_HANDLE return ERROR_INVALID_HANDLE regardless of what is passed for other parameters. For example calling CreateService with all NULL's returns invalid handle.
The current widl source generates code to raise exception RPC_X_SS_IN_NULL_CONTEXT for strings that are NULL and doesn't do any checks on SC_HANDLE. Therefore the exception for the above example is ERROR_INVALID_ADDRESS in ReactOS, but it should be checking the handle first and returning ERROR_INVALID_HANDLE.