Using a MS Edge to execute a command line on the client-side - activex

within IE it was possible to execute command-line apps from the client side with ActiveX controls as shown in this question:
Using a WScript.shell activeX to execute a command line
However, ActiveX is being discontinued since MS Edge was introduced.
I would like to know how can I achieve the same result now with MS Edge, without ActiveX.
Thanks

Related

Is there any web browser component for C++ Builder 6 except IE?

Hello is there any commercial or free web browser component to work with C++ Builder 6 except IE that is included ?
A related thread you could read is How to embed a browser object, other than IE<n>, in a Delphi application
but consider that:
the last release of the Mozilla ActiveX project by Adam Lock was around Firefox 1.5, so the project is now seriously out of date;
the Chromium Embedded Framework is very interesting but I don't think it can be adapted to C++Builder 6 (
fail to install chromium embedded on C++ Builder from Delphi files).
There are issues even with "modern" C++Builder (http://code.google.com/p/delphichromiumembedded/issues/detail?id=7) but it can be done.
A good starting point, if you would like to take the hard way, is Embedding Mozilla but it's a GNU project using GNU tools.
You could build the DLL via MinGW/MSYS and then getting access to the functions exposed by the relevant DLLs...
You could also try a different approach: transforming a target executable top-level window in a child window of own application via the SetParent function (take a look at Embed an application (exe file) into another exe file (mozEmbed like)).

How to write Delphi ActiveX control which can be used in MS Word/Excel/Powerpoint?

[ToDo] (1) As indicated from NGLN's helpful answer, using simpler keywords such as "Delphi ActiveX control" to search. (2) Consuming the ActiveX control in Word/Excel/Powerpoint is yet another step. [/ToDo]
[Useful links]
Writing ActiveX Controls in Master Delphi 7
create non visual activex control with delphi
Error Could not load unit [unit] symbol information for [TClassName]
=======
Or what books and courses to learn if I want to write in Delphi a well-behaved ActiveX control which can be used in Microsoft Word/Excel/Powerpoint ?
Very sorry if this should be a bad question without programming details. However, when I search in the internet materials, almost all I get is about "how to manipulate/embed/host Word/Excel/Powerpoint in Delphi application". Is it because there are other languages/toolkits best suited for creating ActiveX controls which can be used in Microsoft Word/Excel/Powerpoint ?
The reason why I am trying:
What I do now : (1) A Delphi application is used to produce a image file. (2) This image file is pasted in a Excel report. (3) When different representation of the image is needed, one repeat (1) and (2). That is to say, one need to switch between applications.
My goal is to have : (1) A Delphi ActiveX is embeded/hosted in a Excel report. When different representation of the image is needed, one can thus manipulate through the Delphi ActiveX within the Excel report, and do not need to go elsewhere or switch between applications.
You can create an ActiveX control by following these steps:
Design your control as installable component, inherit from TWinControl or below
Publish properties you want to use, once as ActiveX control
Add it to a registerable package
Install that package into the Delphi IDE
Close all
Choose File > New > Other... > ActiveX > ActiveX Library
Choose File > New > Other... > ActiveX > ActiveX Control
Choose your component from the VCL Class Name combo box
Set the threading model you want to support. Apartment is the default and probably preferrable.
Build the project
Register the OLE Control Extension (.ocx) that Delphi created with regsvr32.exe
That is how I added a Delphi DXF control to an Access database:
Note that you will need a 64-bit ocx for a 64-bit MS Office installation (regardless of the Windows version).
For reference: the chapter in the documentation dealing with creating COM objects starts here.

What is ActiveX container?

I never really got the chance to do anything with Microsoft ActiveX in all of my programming career. So, I have very little knowledge of what it is or what it is used for. Although I've searched on the Internet for answer, I found many different definition for ActiveX or ActiveX Container. One of my customer is asking for ActiveX Container for my software which I don't have. He wants view or take control of my software remotely through this ActiveX Container. Is this possible? Also, is ActiveX still around? I am trying to see if I can put this ActiveX container real quick for him to use.
I am assuming that ActiveX is used to expose some part of your software to the Internet or the Intranet. So, that the user can get access to your application remotely.
Any response will be greatly appreciated.
Thanks,
An Activex container is a frame where An ActiveX control can run, These containers can be embedded in a Desktop app or a Web page.
Due which the ActiveX control contains native code you must setup the security settings of your browser in order to run this kind of objects. The only browser where the ActiveX is fully supported is IE (exist some experimental projects to support Activex in Firefox and chrome) Also these containers only can run under Windows.
The fastest way to convert your existing app into a ActiveX Control , is using a TActiveForm (below you have a link with a sample).
For more information try these links
Introduction to ActiveX Control Containers
Wrapping a Delphi TFrame descendant as an ActiveX control

Delphi out-of-process COM server without forms

I'd like to build an out-of-process COM server with Delphi that does not need any visual forms. The main purpose of that server is to provide some "out-of-process" processing for other Windows Services.
Is it possible to place COM objects into simple console application? I expect it will (at least) need some kind of message-handling loop inside.
Can I place it inside of Windows Service instead?
You could do message handling yourself, but the Component Services tool in the Administrative Tools that are available in Windows, since Windows 2000 if I remember correctly, provides a way to select an ActiveX dll and have it run from a dllhost.exe process, optionally as an NT-service.
If you really want to you could start a plain exe project and add TAutoObject's to it, even to an NT-service project, but there's a little extra work to be done to get multi-instancing, security and concurrency right.
You can check SvCom for an explanation on what's different in running a DCOM server as a service, and for a library implementing it fully, supporting latest Delphi releases also.

How do I make a Delphi control panel applet be non-'legacy'?

I have a Delphi .CPL currently written with Delphi 7 which needs to update settings in HKLM (to be used by a service application) and which must support Vista, Win7 and Server 2008. Currently this can be done by adding a RUNASADMIN value to AppCompatFlags/Layers, using the CPL file as the value name. This causes Windows to ask for elevation for a 'legacy control panel applet'.
I need to find a way to build the CPL in Delphi 2010 without it appearing to be 'legacy' and, if possible, not to require the registry setting or elevation. Adding the usual manifest resource to the DLL/CPL referencing Common-Controls v6 and "requireAdministrator" does not fix the problem: no elevation is requested and HKLM access fails. Both the original and the Delphi 2010 .CPL can be made to run correctly (after elevation) by navigating to the file in SYSWOW64, right-clicking, and running 'as Administrator'.
Later: I have found a succint explanation of why you cannot elevate a DLL in this way in a forum posting here.
I believe you need to use COM elevation. There was a wonderful blog posting on this which appears to have been taken down, but the source code behind the posting is still available on the VCL components website (way back machine link).
Some additional information can be found in the question/answers for: Delphi: Prompt for UAC elevation when needed
I think I have found a better answer to my question. There is such an animal as a 'non-legacy' control panel applet, which is described in MSDN here. "Now, in Windows Vista, you can add your own applet to Control Panel by creating an executable for your applet and registering it, instead of going through the trouble of creating a .cpl file."

Resources