You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In certain Win32 functions and COM methods, some parameters are designated as reserved, indicating that a NULL or nullptr must be passed as an argument, depending on the parameter type.
To enhance the developer experience, these reserved parameters can be abstracted away by the generator, allowing NULL or nullptr to be passed implicitly.
Consider the CoInitializeEx function as an example, currently projected as:
intCoInitializeEx(Pointer pvReserved, int dwCoInit) =>_CoInitializeEx(pvReserved, dwCoInit);
final_CoInitializeEx= _ole32.lookupFunction<Int32Function(Pointer pvReserved, Int32 dwCoInit),
intFunction(Pointer pvReserved, int dwCoInit)>('CoInitializeEx');
The first parameter is marked as reserved, with a type of Pointer, indicating that the caller must pass nullptr as an argument:
In certain Win32 functions and COM methods, some parameters are designated as reserved, indicating that a
NULL
ornullptr
must be passed as an argument, depending on the parameter type.To enhance the developer experience, these reserved parameters can be abstracted away by the generator, allowing
NULL
ornullptr
to be passed implicitly.Consider the CoInitializeEx function as an example, currently projected as:
The first parameter is marked as reserved, with a type of
Pointer
, indicating that the caller must passnullptr
as an argument:Here's the proposed projection for this function, abstracting away the reserved parameter and implicitly passing
nullptr
:With this adjustment, the function can now be called simply as:
The text was updated successfully, but these errors were encountered: