Search the Community
Showing results for tags 'activex'.
Found 3 results
-
Unable to use installed package with RAD Studio 11.1 and later
fellafoo posted a topic in Delphi IDE and APIs
Dear Forum Members, I've been using the o2cPlayer.ocx (1.9.9.165 - 32bit) component in my projects since Delphi 6 and have not had a problem until RAD Studio 11.1 (I'm running 11.2 Patch 1). It works in RAD Studio 11.0 and 10.4 Update 2. After installing the component, when I try to place the control on a new form, Delphi hangs for a moment, then the program closes without an error. The same behavior occurs if I create a C++ package and try to place the component on a C++ project form. I've been able to replicate this problem with a clean installation of RAD Studio 11 on two different Windows 11 Pro machines and a Windows 10 Pro computer. Embarcadero Support has been giving me suggestions over the past few weeks but none of them have worked. They have not been able to reproduce the error in-house. I'd appreciate any suggestions or confirmation that this is a new issue with RAD Studio 11. To resolve the issue, I've tried recreating and installing the component after... Deleting the registry node HKEY_CURRENT_USER\SOFTWARE\Embarcadero\BDS\22.0. Running RAD Studio 'As Administrator'. Creating a new Administrator account on my local machine and logging in as that user. Deleting C:\Users<user name>\AppData\Roaming\Embarcadero\BDS\22.0. I also looked at Windows Controlled Folder Access but it is not accessible because Norton or Bitdefender are running. Thank you for any assistance you may be able to provide. MFM O2CPlayer.zip -
Greetings, I need your guidance. I made an ActiveX control which I need to use in one big applications (ParnetMenu) for various containers, but it is somewhat elaborate to update. So, to get out of trouble, I made an emergent application as a simple container for this ActiveX control. On my development machine, the application closes correctly and disappears from the processes running on Windows 10 pro 64 bit (virtualized in virtualbox). The problem occurs with end users (Windows 10 pro 64 bit), when closing the application it remains running in the windows processes and it is necessary to go and terminate the process manually. In fact, my main application (ParnetMenu) where I will use this control, suffers the same problem but there we programmed a button that looks for the id of each container and closes the process, using the TDOSCommand component and performs a Taskkill to close the screens that use these ActiveX controls. (Force closure) exe := stringReplace(button.Caption, ' ', '_', [rfReplaceAll, rfIgnoreCase]); button.visible := false; PID := escribeVar(exe); PID := 'Taskkill /F /PID ' + PID; dos.CommandLine := PID; dos.Execute; In this emergent application I have tried several things, attached actual and previous code: First by clicking on "X" in the application I release the control and Terminates de application. It did not work. Second. Then I removed the buttons and add a panel with a button to try another way. Same result the application remains running in the background: The layout of the application: This is the code for this emergent container: unit MainForm; interface uses Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics, Vcl.Controls, Vcl.Forms, Vcl.Dialogs , SALMVCC_To_Cancel_AX_TLB, RzButton, Vcl.ExtCtrls, System.ImageList, Vcl.ImgList, Vcl.StdCtrls ; type TMain = class(TForm) il1: TImageList; pnl1: TPanel; bb1: TRzBitBtn; lbl1: TLabel; procedure FormCreate(Sender: TObject); procedure bb1Click(Sender: TObject); private { Private declarations } var CADISalidasCancelacionAutorizacion: TcoADI_SALMVCC_To_Cancel; procedure doLoadOCX; public { Public declarations } end; var Main: TMain; implementation {$R *.dfm} procedure TMain.bb1Click(Sender: TObject); begin lbl1.Visible:= True; self.Refresh; Sleep(200); // to give time for the message to be displayed. CADISalidasCancelacionAutorizacion.Destroy; Sleep(500); // to give time for the message to be released? Application.Terminate(); Sleep(2500); // Just to debug this problem System.Halt(0); //TerminateProcess; // don't know how to use yet end; procedure TMain.doLoadOCX; begin CADISalidasCancelacionAutorizacion := TcoADI_SALMVCC_To_Cancel.Create(self); CADISalidasCancelacionAutorizacion.Parent:= self; CADISalidasCancelacionAutorizacion.Align:= alClient; end; {procedure TMain.FormClose(Sender: TObject; var Action: TCloseAction); begin CADISalidasCancelacionAutorizacion.Free; Application.Terminate; end;} procedure TMain.FormCreate(Sender: TObject); begin doLoadOCX; end; end. I had previously used this, but it didn't work either. procedure TMain.FormClose(Sender: TObject; var Action: TCloseAction); begin CADISalidasCancelacionAutorizacion.Free; Application.Terminate; end; Note: My PC has no antivirus running (except Microsoft's), my users use Avast and there is already an exception for them not to send the application to the sanbox. I even tried disabling the antivirus on a computer and the problem persists. Regards and thank you. ------- Addendum: The main goal is not only to solve this problem with the emergent application. But also to eliminate the use of TaskKill in my ParnetMenu application; and to eliminate the hang that occurs. And of course, occasionally I will be able to create more definitive applications using the ActiveX container.
-
omnithread Omnithread DELPHI, many calls in the same function
bill parish posted a topic in OmniThreadLibrary
Delphi10.2.3: OTL, FMX, ACTIVEX DCOM i have a big problem in my code to call the parallel.Async many times i have 6 ActiveX DCOM in Delphi, and wanna call these in same time, to calculate an invoice, so in my exe i work with OTL to async all calls activex, i don't like to wait result or freeze my screen. Parallel.Async( procedure (const task: IOmniTask) var iInnerExc: integer; begin /// ***********************************************************/// { return Log} TLogSingleton.Instance().Log('Services XX calcul: Début appel.',True); //************************* PARALLEL ASYNC ****************************// // executed in background thread try // {Create instance de ViewModel annexes: XXServiceXX} mainViewModelPreCalculOTLLevel03 := CreateMainViewModelOTLLevel03Class; {Affecter le même Model principal} mainViewModelPreCalculOTLLevel03.Model := fModel; {Suscribe the observer in list} mainViewModelPreCalculOTLLevel03.Provider.Subscribe(fSubscriber); {Call VieModel.ServiceXX} mainViewModelPreCalculOTLLevel03.StartPrecalcul; except on e:exception do {call the raise, juste ci dessous, dans le onterminated Handle} raise Exception.Create('Exception lors du traitement de Service XX.'); end; end, Parallel.TaskConfig.OnTerminated( procedure (const task: IOmniTaskControl) var excp: Exception; begin // executed in main thread if assigned(task.FatalException) then begin {expoiler l'exception, captcher ci dessus} excp := task.DetachException; TErrorSingleton.Instance().Log(Format('Service XX: [Fin TASK Error]. %s:%s',[excp.ClassName, excp.Message]),True); FreeAndNil(excp); end else begin // executed in main thread { return Log} TLogSingleton.Instance().Log('Services calcul: [Fin TASK] Fin appel traitement.',True); SendNotification([actServiceXXFinish]); end; end )); the Active X Call in exe FMX: (the server activeX is integreted in framework, i don't have the source code, and i don't know haw it writen) _Dm_Dcom := CreateObject('SERVICE.XX.CLT.SERVICEXX', 'DEFAUT') as ICoServiceXX; //Instance of the DLL //CALL the function in ServiceXX_impl _Dm_Dcom.GETTRaitementServiceXX(SafeArrayIn,SafeArrayOut,FListnerForPushNotif ); //with SafeArrayIn =Json IN, and take result in SafeArrayOut; FListnerForPushNotif to send notification (Type Interface: Iunknow) the ActiveX initialization in every SERVICEXX (DLL) TAutoObjectFactory.Create(ComServer, TTest, Class_Test, ciMultiInstance, tmApartment); in this DLL; we have ServiceXX_impl unit, we have one function to call traitement in another class, we can found a communication with the IInterface (published) to send notif like this: (FListnerForPushNotif as IDataListnerForPushNotification).PushNotificationForLog('Message to send to client side'); //we have many logs types: event, Error, Exception //PushNotificationForLog, PushNotificationForError,PushNotificationForException this is my call, i repeat it 6 times, Parallel.Async( CALL01 ); Parallel.Async( CALL01 ); Parallel.Async( CALL02 ); Parallel.Async( CALL06 ); i don't need to freeze my exe, and i don't need to wait, with SendNotification([actServiceXXFinish]); or other Action like "actService01Finish", "actService02Finish" i can kown if my traitement is finished or not, finaly, if i write all 6 calls, i will fall in many and many problems, like freeze screen, and deadlock (the only solution kill the process crl+alt+supp), but if i write only one call, it will be perfect, i have, my result, but the freeze screen persist, Conclusion: 1- with many calls: problems: screen freeze, traitement not working, --> kill the process. 2- with one only call: problems: screen freeze: the "TAniIndicator" not working and the screen freeze when Delphi enter in the other DLL (activeX). Nota: the Exe is FMX (in another step it will be a Form application), the 6 services are DLL (ActiveX DCOM). plz help me