on 07-14-2013 8:35 AM
Hello community,
I developed an ABAP function, which changes the Windows registry - here add some keys for registering an ActiveX library. But direct after the changing it is not possible to create the object of the library. It is necessary to restart the ABAP program, to use the new keys from the Windows registry. I check Call Method cl_gui_cfw=>flush but with no success. Is there a way, after the changing of the Windows registry, to use the new keys, without restarting the ABAP program?
Thanks for tips.
Cheers
Stefan
Hello community,
problem is solved. It is neccessary to execute the changing of the registry synchronous and all works well.
Cheers
Stefan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Roman,
thanks for your interest.
Sure, to change the registry, in my case to register an ActiveX library, I use the command RUNDLL32.EXE with the method EXECUTE from the FES:
"-Register Library---------------------------------------------------
Call Method cl_gui_frontend_services=>execute
Exporting
APPLICATION = 'RUNDLL32.EXE'
PARAMETER = 'Test.dll,DLLRegisterServer'
DEFAULT_DIRECTORY = 'C:\Dummy'
SYNCHRONOUS = 'X'
Exceptions
Others = 1.
And here is it necessary to set the SYNCHRONOUS flag. Otherwise the new entries are not written in the Windows registry before the ABAP program wants to use it.
Cheers
Stefan
Can you provide errors you receive?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Roman,
I get no errors. I use the following code:
Create Object 'Test'.
If sy-subrc <> 0.
Call Function 'DLLRegisterServer'.
Create Object 'Test'.
EndIf.
Call Function with the registering of the library works perfect but the creating of the object afterwards don't. I must restart the ABAP program and then it works.
Cheers
Stefan
Not sure you use the right pattern for working with ActiveX controls. Whether you read about SAP Control Framework? Other links:
Use Your Own ActiveX Control in ABAP
Using Classic ActiveX Controls in the ABAP Control Framework
It's just my opinion only. I have never done this myself.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.