- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- How to use DllGetClassObject in InstallScript
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
How to use DllGetClassObject in InstallScript
Hi,
I need to use the DllGetClassObject function in InstallScript so that I can use .NET 5 COM DLL. The C++ syntax for DllGetClassObject function is:
HRESULT DllGetClassObject( REFCLSID rclsid, REFIID riid, LPVOID *ppv );
I have declared it as follows:
prototype INT OLE32.DllGetClassObject(POINTER, POINTER, BYREF OBJECT);
function VOID CheckDLL()
OBJECT obj;
STRING clsid, iid;
INT nResult;
begin
clsid = "B91EDCBD-F1A5-4C79-8FE0-1E42D2D67928";
iid = "9657371B-CDBF-4EE4-A580-4B038E0D6E02";
set obj = NOTHING;
nResult = -1;
nResult = DllGetClassObject(&clsid, &iid, obj);
end;
The nResult is returning -2147467262 and obj is null. I am not sure about the declaration and usage of this function. Can you please guide me on this?
Many Thanks,
Adeel.