Hi Matthias et al.,

Matthias Huetsch wrote:
Across the various platforms there appears to exist no special value that could reliably indicate an invalid oslModuleHandle. Thus, another means for signaling success or failure is needed, and the API proposed by Philipp does exactly that.

sal_Bool
SAL_CALL osl_getModuleHandle(
  [in]  rtl_uString * pName,
  [out] oslModuleHandle * pHandle
);

where [out] pHandle would only be valid (regardless of its value), if the function returns TRUE.
As we do not necessarily have to use the OS handle directly as oslModule, we could define NULL to be an invalid oslModule handle (as we do for osl_loadModule).

The problem with my proposal (as I see it) is more that any value we choose for the OSL version of RTLD_DEFAULT could - in theory - also get returned by dlopen. So I agree that the API proposed by Philipp is the way to go, even though I need to remove some != NULL asserts in the code for this.

As I do not plan to add getModuleHandle API to the C++ wrapper, should I move the != NULL asserts here ?

Oliver


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to