RegSvr32 not working

Add-in Express™ Support Service
That's what is more important than anything else

RegSvr32 not working
 
Richard Stevens




Posts: 43
Joined: 2007-01-24
This is really baffling us - since last week we can't get RegSvr32 to install an add-in of ours (Delphi Seattle). The process just sits there in Task Manager but doesn't complete. That's the case even if it's via the Command line or using an install package.

Even install packages (Inno Setup) from last year which did work fine now show the same behavior. The setup gets to the final stage and then stops because it calls RegSvr32 which doesn't work.

But a new addin works fine.

This is happening on multiple computers - ours and clients. I would have said it was to do with a Windows Security update, except on one of the Virtual Machines we use for testing updates have been turned off.

Any ideas at all as to what we could look for?

Richard
Posted 22 Aug, 2016 09:35:52 Top
Andrei Smolin


Add-in Express team


Posts: 14106
Joined: 2006-05-11
Hello Richard,

Do you register a per-user? If you register a per-machine add-in, make sure you start regsvr32 elevated.

What Windows version are you using? I'll try to reproduce the issue.

Are you sure your add-in doesn't show a message or such?

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 22 Aug, 2016 09:48:26 Top
Richard Stevens




Posts: 43
Joined: 2007-01-24
Andrei - yes, tried with Admin privileges. Windows 7, 64 bit, 32 bit MS Office.

A copy of an older installer is here (will delete once you have it).

https://www.dropbox.com/s/x2owhb9fq26is0m/GCWSetupFilerOnlyNov2015.exe?dl=0

Thanks
Richard
Posted 22 Aug, 2016 09:50:58 Top
Andrei Smolin


Add-in Express team


Posts: 14106
Joined: 2006-05-11
Thank you, Richard.

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 22 Aug, 2016 09:58:58 Top
Andrei Smolin


Add-in Express team


Posts: 14106
Joined: 2006-05-11
Richard,

This may be caused by a problem on the initialization phase of the DLL. Regsvr32 loads the DLL, Add-in Express creates an insrtance of the add-in module and all initialization sections are run. Supposedly, there's some problem in the initialization section of a third-party component that you use (if any).

I would try to add components from your real add-in to the working add-in to find which one produces the issue.

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 22 Aug, 2016 10:17:51 Top
Richard Stevens




Posts: 43
Joined: 2007-01-24
Thank you Andrei, that is helpful though we are puzzled as to why this package that did work is now failing. We use a lot of third party components including DevExpress so this may take some time to get to the bottom of.

I will let you know what we find.

Richard
Posted 22 Aug, 2016 10:21:22 Top
Richard Stevens




Posts: 43
Joined: 2007-01-24
We have established that the 3rd party component appears to be a DevExpress one. As soon as we add dxComponentPrinter to our working addin it stops working and cannot be registered from the command line.

Indeed, as soon as we add any of the following units to our uses clause it will stop working. We've tested versions 15.2.5 of DevEx (using Seattle) and the latest 16.1.3 (Berlin) and it is the same issue in both:

dxPSGlbl, dxPSUtl, dxPSEngn, dxPrnPg,
dxBkgnd, dxWrap, dxPrnDev, dxPSCompsProvider, dxPSFillPatterns, dxPSEdgePatterns, dxPSPDFExport, dxPSPrVwStd, dxPSPrVwAdv,
 dxPSPrVwRibbon, dxPScxPageControlProducer, dxPScxEditorProducers, dxPScxExtEditorProducers, dxPSCore


Really cannot understand why the inclusion of these files are causing a problem now and making old addins stop working even when compiled and deployed months ago. We're going to have to go through all our files and remove all references to these units, but it just seems very strange. Any thoughts or suggestions you have very welcome.

Richard
Posted 22 Aug, 2016 12:15:02 Top
Richard Stevens




Posts: 43
Joined: 2007-01-24
Further update, we think the particular routine causing the problem is in dxPSUtl, which we have modified with an {$IFDEF} so it doesn't get executed.

function PopulateShellImages(FullInit: Boolean): Boolean;
var
ShellDLLLoaded: Boolean;
ShellDLL: HMODULE;
Proc: function(FullInit: BOOL): BOOL; stdcall;
begin
Result := False;

{$IFDEF Addin}
Exit;
{$ENDIF}

if IsWinNT then
begin
ShellDLLLoaded := False;
ShellDLL := GetModuleHandle(ShellAPI.Shell32);
if ShellDLL = 0 then
begin
ShellDLL := LoadLibrary(ShellAPI.Shell32);
if ShellDLL <= Windows.HINSTANCE_ERROR then
ShellDLL := 0;
ShellDLLLoaded := ShellDLL <> 0;
end;
if ShellDLL <> 0 then
try
Proc := GetProcAddress(ShellDLL, PChar(660));
Result := (@Proc <> nil) and Proc(FullInit); // this line hangs program
finally
if ShellDLLLoaded then
FreeLibrary(ShellDLL);
end;
end;
end;
Posted 22 Aug, 2016 15:04:53 Top
Andrei Smolin


Add-in Express team


Posts: 14106
Joined: 2006-05-11
Hello Richard,

I suggest that you contact DevExpress support.

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 23 Aug, 2016 05:57:15 Top
Richard Stevens




Posts: 43
Joined: 2007-01-24
Posted 23 Aug, 2016 06:06:57 Top