CLSIDFromProgID function Null safety ole32

int CLSIDFromProgID(
  1. Pointer<Utf16> lpszProgID,
  2. Pointer<GUID> lpclsid
)

Looks up a CLSID in the registry, given a ProgID.

HRESULT CLSIDFromProgID(
  LPCOLESTR lpszProgID,
  LPCLSID   lpclsid
);

Implementation

int CLSIDFromProgID(Pointer<Utf16> lpszProgID, Pointer<GUID> lpclsid) {
  final _CLSIDFromProgID = _ole32.lookupFunction<
      Int32 Function(Pointer<Utf16> lpszProgID, Pointer<GUID> lpclsid),
      int Function(
          Pointer<Utf16> lpszProgID, Pointer<GUID> lpclsid)>('CLSIDFromProgID');
  return _CLSIDFromProgID(lpszProgID, lpclsid);
}