Call for help! Contact Jan Barendregt on the official forums ASAP.

Call for help! Contact Jan Barendregt on the official forums ASAP.

https://forums.embarcadero.com/thread.jspa?threadID=249362&tstart=30

This is the contents of the post by Jan:

Hi all,

I have developed several software products, which are mostly available for free (www.epigear.com). Three of these are Excel for Windows add-ins, using the C-interface of Excel. One is a Monte Carlo simulation program (Ersatz), one a meta-analysis program (MetaXL), and one a bunch of handy functions such as integration (EpigearXL). All interface with Excel using one general unit, and one specific one that defines the particular functions in that package. The library is compatible with Excel pre-2007, and with Excel 2007+, both 32 and 64 bit (Excel 2010+). I use Delphi 7, XE2 and XE7. The software is stable, but Microsoft has this habit of upgrading Excel and often that means that my stuff may have to be adapted because of some non-documented change in the internals of Excel. The software is mostly being used in research environments (universities), both students and staff, because it is either free (MetaXL, EpigearXL) or cheap (Ersatz).

So what is my problem? I have been diagnosed with cancer for which no curative treatment is available, and I won’t be around much longer (months rather than years, I reckon). The users (and I) would like the software to remain available, and upgraded as necessary and/or desirable. The problem is that I don’t know a single person able to handle the technical stuff: interfacing with the C-API of Excel is a bit of a black art, especially when using Object Pascal. So my questions are “are there people around who would like to take this on?” and “what format would this need: open source or something like that?”.

I’d appreciate opinions, offers, ideas, anything that might help.

Thanks,

Jan Barendregt

Consider these two standalone functions

Consider these two standalone functions

function CaptureList: TArray;

procedure LogList(const aList: TArray);

and the two following use cases:

This one works,

procedure TSomeClass.Case1;

var

List: TArray;

begin

List := CaptureList;

LogList(CaptureList);

end;

but this one fails.

procedure TSomeClass.Case2;

begin

LogList(CaptureList);

end; <- EInvalidPointer in _DynArrayClear on exit

Does anyone see any potential reason why the second fails?

Berlin 10.1 Update 2 Enterprise

Updated The problem with corporate Windows Enterprise installations, are that they are locked down and paranoid.

Updated The problem with corporate Windows Enterprise installations, are that they are locked down and paranoid. Running “random” installers is not possible.

To get around this limitation for power users, LAPS is a method used when your regular domain account doesn’t have local admin rights, and you instead elevate to local admin using a second local account, with a password provided from AD.

To exemplify:

My normal domain users: Lars (Does not have Local Administrator rights)

The local admin user: AdminLars (Has Local Administrator rights)

The problem seems to be that when you use LAPS and AdminLars, the user context is not my regular domain user Lars – but the special local admin account AdminLars – so any registry settings installed, ends up in the wrong HKEY_CURRENT_USER.

This means that when I start Delphi as Lars – any components installed as AdminLars are not visible.

Recreating registry entries is a possibility – but – complex – since I don’t know what keys any specific set of components install.

Any suggestions of how to work around this?

— original post:

Does any of you have experience with installing components for RAD Studio (10.1 upd.2) under Windows 10, using MS LAPS?

It seems that TMS and EurekaLog installs doesn’t appear to be visible to the Delphi installation (also installed using LAPS).

I need a workaround.

https://technet.microsoft.com/en-us/mt227395.aspx

Workflows / State Engines – Any existing libraries out there?

Workflows / State Engines – Any existing libraries out there?

When you have a complex UI or complex data processing with parameterisations that defines what should be allowed, what should happen next, etc – it is necessary to have a workflow / state engine.

I am wonder if there is any prior art – apart from the TMS product (which is way too complex for our need). I don’t need a visual designer – just classes that can be used to build a workflow?

TService and inheritance?

TService and inheritance?

Where and When is the TService descendant instantiated?

Is there some sort of compiler magic for services?

Getting weird .dfm property issues when trying to open the service unit that inherits the first one – without being able to see why.

Is it actually possible to create a descendant from TService (beyond the initial first level) and have that properly instantiated?

Unit1 – a normal service unit:

TServiceGen = class(TService)

procedure SomethingInCommon; virtual;

end;

Unit2 – a second service unit, but with the parent changed from TService to TServiceGen

TServiceGenChild = class(TServiceGen)

procedure SomethingInCommon; override;

end;

The Unit 2 dfm looks like

object ServiceGenChild: TServiceGenChild

OldCreateOrder = False

AllowPause = False

DisplayName = ‘PSD Server’

WaitHint = 10000

Height = 268

Width = 343

end

Unit 1 is ok, but loading Unit 2 into the IDE, shows the following error:

Threads and UI

Threads and UI

I have a feeling that sometimes, something, somewhere is trying to UI things from a non-UI thread. Naturally, this is something we strive to avoid – but with all the injection of handlers – and literally hundreds of places where someone could think “surely, it would be clever to update that status label now” – it is a bit of a grunt task to review all the code.

So, before embarking on such a review quest, my question is:

Which symptoms could arise from touching UI from a non UI thread?

AV? Deadlocks? Temporary freezes? Donald Trump?

I am seeing temporary freezes (20+ seconds) in the UI. The background threads are all looking active, doing and logging their stuff.

My first thought was a lock contention – but I log all locks that fail – and the log shows nothing of the sort, so I am in a bit of a pickle here.