Mar 23, 2021
01:32 AM
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.
... View more
Labels
- Labels:
-
InstallShield 2020
Jan 26, 2021
06:43 AM
Thanks for the reply. However, The .NET 5 is not installed in "C:\Windows\Microsoft.NET\Framework" location. It is installed in "C:\Program Files\dotnet". Also, .NET 5 does not seem to have " Regasm.exe". Can you let me know how to handle COM DLLs compiled in .NET 5 in InstallShield? Regards, Adeel.
... View more
Jan 25, 2021
04:44 AM
Hi, I have a DLL originally compiled in .NET Framework 4.7.1 which exposed some classes and methods using COM. I used DotNetCoCreateObject to create an instance and it was working fine. However, I have recently migrated it to .NET 5 and not the InstallShield fails to load it with following error: error number: 0x80040707 isrt._dotnetcocreateobject dll function call crashed I am using InstallShield 2019 R3. Can you please help me with this. Reagrds, Adeel Aziz.
... View more
Sep 25, 2014
01:31 AM
Hi I have an install script in which I want to open a file located at %ALLUSERSPROFILE%\MyFolder So I used this code: set oDoc = CreateObject("Microsoft.XMLDOM"); . . . if (oDoc.load("[ALLUSERSPROFILE]\\MyFolder\\TestFile.xml")) then . . . But this is not working. Although I have created the folder %ALLUSERSPROFILE%\MyFolder in Application Data > Files and Folders and that folder creates successfully. I also copy the file TestFile.xml over there and it also shows up after the install. But when the code does not seem to have any effect in the file since I am trying to open it and edit it in %ALLUSERSPROFILE%\MyFolder. I have tried by copying this file in the INSTALLDIR location and open and edit there and that works fine so there does not seem to be a problem with my code. I think I am using the wrong variable in the path which is [ALLUSERSPROFILE]. Can anyone tell me how to I access the %ALLUSERSPROFILE% location in the install script. Many Thanks, Adeel.
... View more
Labels
- Labels:
-
InstallShield 2012
Latest posts by adeel_aziz
Subject | Views | Posted |
---|---|---|
287 | Mar 23, 2021 01:32 AM | |
823 | Jan 26, 2021 06:43 AM | |
866 | Jan 25, 2021 04:44 AM | |
2704 | Sep 25, 2014 01:31 AM |
Activity Feed
- Posted How to use DllGetClassObject in InstallScript on InstallShield Forum. Mar 23, 2021 01:32 AM
- Posted Re: DotNetCoCreateObject fails to load .NET 5 DLLs on InstallShield Forum. Jan 26, 2021 06:43 AM
- Posted DotNetCoCreateObject fails to load .NET 5 DLLs on InstallShield Forum. Jan 25, 2021 04:44 AM
- Posted How to use %ALLUSERSPROFILE% environment variable in InstallScipt on InstallShield Forum. Sep 25, 2014 01:31 AM