* unreffed if the check function returns FALSE, so callers must not
* rely on the handle persisting (unless the check function returns
* TRUE)
+ * The caller owns the returned handle.
*/
gpointer _wapi_search_handle (WapiHandleType type,
gboolean (*check)(gpointer test, gpointer user),
return CloseHandle (handle);
}
+/*
+ * The caller owns the returned handle and must call CloseProcess () on it to clean it up.
+ */
gpointer OpenProcess (guint32 req_access G_GNUC_UNUSED, gboolean inherit G_GNUC_UNUSED, guint32 pid)
{
/* Find the process handle that corresponds to pid */
}
}
- _wapi_handle_ref (handle);
-
+ /* _wapi_search_handle () already added a ref */
return(handle);
}