Skip to main content

[archive] error creating activex control

  • September 19, 2007
  • 7 replies
  • 0 views

[Migrated content. Thread originally posted on 19 September 2007]

hello,

we are evaluating our software (6.1 runtime) on vista atm. after solving the register ocx problem with vista (at least vista says the registration was ok and the registry keys are set like they are with windows xp) our software has problems using the controls. debugging the application on windows xp and vista showed that both is similar but the vista one is throwing the error "error creating activex control". hopefully there is a workaround for this problem without upgrading to a newer runtime.

michael

7 replies

[Migrated content. Thread originally posted on 19 September 2007]

hello,

we are evaluating our software (6.1 runtime) on vista atm. after solving the register ocx problem with vista (at least vista says the registration was ok and the registry keys are set like they are with windows xp) our software has problems using the controls. debugging the application on windows xp and vista showed that both is similar but the vista one is throwing the error "error creating activex control". hopefully there is a workaround for this problem without upgrading to a newer runtime.

michael
I would suggest upgrading to the latest Vista compabible runtime (7.2 ) because you may see some other problems later down the line...

In my experience, you may want to try executing your application "As Administrator" and see if that helps. There are so many security things built into Vista that there may be a setting you just don't see that is preventing the controls from being created.

[Migrated content. Thread originally posted on 19 September 2007]

hello,

we are evaluating our software (6.1 runtime) on vista atm. after solving the register ocx problem with vista (at least vista says the registration was ok and the registry keys are set like they are with windows xp) our software has problems using the controls. debugging the application on windows xp and vista showed that both is similar but the vista one is throwing the error "error creating activex control". hopefully there is a workaround for this problem without upgrading to a newer runtime.

michael
I would suggest upgrading to the latest Vista compabible runtime (7.2 ) because you may see some other problems later down the line...

In my experience, you may want to try executing your application "As Administrator" and see if that helps. There are so many security things built into Vista that there may be a setting you just don't see that is preventing the controls from being created.

[Migrated content. Thread originally posted on 19 September 2007]

hello,

we are evaluating our software (6.1 runtime) on vista atm. after solving the register ocx problem with vista (at least vista says the registration was ok and the registry keys are set like they are with windows xp) our software has problems using the controls. debugging the application on windows xp and vista showed that both is similar but the vista one is throwing the error "error creating activex control". hopefully there is a workaround for this problem without upgrading to a newer runtime.

michael
Rob is unfortunately right, there are terrible constraints in Vista. However, once the component has been registered, you should be able to use it.
I guess you do not use a declaratives for your components. Perhaps you can do this, it certainly will give more information.
Here is an example of using declaratives with ActiveX:


       IDENTIFICATION DIVISION.
       PROGRAM-ID.  APIEX-1.
       ENVIRONMENT DIVISION.
       CONFIGURATION               SECTION.
       SPECIAL-NAMES.
           COPY "dtpicker.def".
    .
       WORKING-STORAGE SECTION.
       77  error-source          pic x(30).
       77  error-description     pic x(50).
       77  error-help-file       pic x(200).
       77  error-help-context    usage unsigned-long.
       77  choice pic 9.
       copy "acugui.def".
       copy "activex.def".
       copy "winhelp.def".
       SCREEN SECTION.
       01 test-screen.
           03 LOGIN-DTP-Date, DTPicker,
              COL 2.00, LINE 2.00, LINES 2.00, SIZE 11.00,
              EVENT PROCEDURE LOGIN-DTP-Date-Event-Proc.
       PROCEDURE   DIVISION.
       declaratives.
       object-exception section.
           use after exception on object.
       object-exception-handler.
           call "c$excepinfo" using
                error-info
                error-source
                error-description
                error-help-file
                error-help-context.
           evaluate true
             when acu-e-classnotregistered
               display message box "Class not registered"
             when acu-e-initialstate
               display message box "INITIAL-STATE"
           end-evaluate.
           if error-help-file = spaces then
             display message box error-description
               title error-source
               icon mb-error-icon
           else
             display message box error-description h'0d'
               "Do you want help ?"
               title error-source
               icon mb-error-icon
               type is mb-yes-no
               default is mb-yes
               giving choice
             if choice = 1 then
               call "$winhelp" using error-help-file,
                    help-context
                 error-help-context
             end-if
           end-if
       end declaratives.
       MAIN-LOGIC.
           DISPLAY STANDARD         GRAPHICAL WINDOW
                   LINES            10
                   SIZE             30
                   BACKGROUND-LOW
                   TITLE
                   "SD Conference 2001, Window API simple example".
    display test-screen.
           modify  login-DTP-date, Month 10,
                                   Day 10,
                                   Year 2001.
           ACCEPT  OMITTED.
           destroy test-screen.
       MAIN-LOGIC-END.
           STOP    RUN.
       LOGIN-DTP-Date-Event-Proc.
           .

[Migrated content. Thread originally posted on 19 September 2007]

hello,

we are evaluating our software (6.1 runtime) on vista atm. after solving the register ocx problem with vista (at least vista says the registration was ok and the registry keys are set like they are with windows xp) our software has problems using the controls. debugging the application on windows xp and vista showed that both is similar but the vista one is throwing the error "error creating activex control". hopefully there is a workaround for this problem without upgrading to a newer runtime.

michael
Rob is unfortunately right, there are terrible constraints in Vista. However, once the component has been registered, you should be able to use it.
I guess you do not use a declaratives for your components. Perhaps you can do this, it certainly will give more information.
Here is an example of using declaratives with ActiveX:


       IDENTIFICATION DIVISION.
       PROGRAM-ID.  APIEX-1.
       ENVIRONMENT DIVISION.
       CONFIGURATION               SECTION.
       SPECIAL-NAMES.
           COPY "dtpicker.def".
    .
       WORKING-STORAGE SECTION.
       77  error-source          pic x(30).
       77  error-description     pic x(50).
       77  error-help-file       pic x(200).
       77  error-help-context    usage unsigned-long.
       77  choice pic 9.
       copy "acugui.def".
       copy "activex.def".
       copy "winhelp.def".
       SCREEN SECTION.
       01 test-screen.
           03 LOGIN-DTP-Date, DTPicker,
              COL 2.00, LINE 2.00, LINES 2.00, SIZE 11.00,
              EVENT PROCEDURE LOGIN-DTP-Date-Event-Proc.
       PROCEDURE   DIVISION.
       declaratives.
       object-exception section.
           use after exception on object.
       object-exception-handler.
           call "c$excepinfo" using
                error-info
                error-source
                error-description
                error-help-file
                error-help-context.
           evaluate true
             when acu-e-classnotregistered
               display message box "Class not registered"
             when acu-e-initialstate
               display message box "INITIAL-STATE"
           end-evaluate.
           if error-help-file = spaces then
             display message box error-description
               title error-source
               icon mb-error-icon
           else
             display message box error-description h'0d'
               "Do you want help ?"
               title error-source
               icon mb-error-icon
               type is mb-yes-no
               default is mb-yes
               giving choice
             if choice = 1 then
               call "$winhelp" using error-help-file,
                    help-context
                 error-help-context
             end-if
           end-if
       end declaratives.
       MAIN-LOGIC.
           DISPLAY STANDARD         GRAPHICAL WINDOW
                   LINES            10
                   SIZE             30
                   BACKGROUND-LOW
                   TITLE
                   "SD Conference 2001, Window API simple example".
    display test-screen.
           modify  login-DTP-date, Month 10,
                                   Day 10,
                                   Year 2001.
           ACCEPT  OMITTED.
           destroy test-screen.
       MAIN-LOGIC-END.
           STOP    RUN.
       LOGIN-DTP-Date-Event-Proc.
           .

[Migrated content. Thread originally posted on 19 September 2007]

hello,

we are evaluating our software (6.1 runtime) on vista atm. after solving the register ocx problem with vista (at least vista says the registration was ok and the registry keys are set like they are with windows xp) our software has problems using the controls. debugging the application on windows xp and vista showed that both is similar but the vista one is throwing the error "error creating activex control". hopefully there is a workaround for this problem without upgrading to a newer runtime.

michael
Rob is unfortunately right, there are terrible constraints in Vista. However, once the component has been registered, you should be able to use it.
I guess you do not use a declaratives for your components. Perhaps you can do this, it certainly will give more information.
Here is an example of using declaratives with ActiveX:


       IDENTIFICATION DIVISION.
       PROGRAM-ID.  APIEX-1.
       ENVIRONMENT DIVISION.
       CONFIGURATION               SECTION.
       SPECIAL-NAMES.
           COPY "dtpicker.def".
    .
       WORKING-STORAGE SECTION.
       77  error-source          pic x(30).
       77  error-description     pic x(50).
       77  error-help-file       pic x(200).
       77  error-help-context    usage unsigned-long.
       77  choice pic 9.
       copy "acugui.def".
       copy "activex.def".
       copy "winhelp.def".
       SCREEN SECTION.
       01 test-screen.
           03 LOGIN-DTP-Date, DTPicker,
              COL 2.00, LINE 2.00, LINES 2.00, SIZE 11.00,
              EVENT PROCEDURE LOGIN-DTP-Date-Event-Proc.
       PROCEDURE   DIVISION.
       declaratives.
       object-exception section.
           use after exception on object.
       object-exception-handler.
           call "c$excepinfo" using
                error-info
                error-source
                error-description
                error-help-file
                error-help-context.
           evaluate true
             when acu-e-classnotregistered
               display message box "Class not registered"
             when acu-e-initialstate
               display message box "INITIAL-STATE"
           end-evaluate.
           if error-help-file = spaces then
             display message box error-description
               title error-source
               icon mb-error-icon
           else
             display message box error-description h'0d'
               "Do you want help ?"
               title error-source
               icon mb-error-icon
               type is mb-yes-no
               default is mb-yes
               giving choice
             if choice = 1 then
               call "$winhelp" using error-help-file,
                    help-context
                 error-help-context
             end-if
           end-if
       end declaratives.
       MAIN-LOGIC.
           DISPLAY STANDARD         GRAPHICAL WINDOW
                   LINES            10
                   SIZE             30
                   BACKGROUND-LOW
                   TITLE
                   "SD Conference 2001, Window API simple example".
    display test-screen.
           modify  login-DTP-date, Month 10,
                                   Day 10,
                                   Year 2001.
           ACCEPT  OMITTED.
           destroy test-screen.
       MAIN-LOGIC-END.
           STOP    RUN.
       LOGIN-DTP-Date-Event-Proc.
           .

[Migrated content. Thread originally posted on 19 September 2007]

hello,

we are evaluating our software (6.1 runtime) on vista atm. after solving the register ocx problem with vista (at least vista says the registration was ok and the registry keys are set like they are with windows xp) our software has problems using the controls. debugging the application on windows xp and vista showed that both is similar but the vista one is throwing the error "error creating activex control". hopefully there is a workaround for this problem without upgrading to a newer runtime.

michael
thank you for your quick replies.

after using the declaratives the application gets a step further (so it seems). but i guess thats just the matter because the initial "error creating activex control" is not thrown, instead a "PERFORM stack overflow" occurs.

with the "error creating activex control" error the form is flashing up and disappearing.
with the "perform stack overflow" error the form stays in background but no activex control shown yet.

[Migrated content. Thread originally posted on 19 September 2007]

hello,

we are evaluating our software (6.1 runtime) on vista atm. after solving the register ocx problem with vista (at least vista says the registration was ok and the registry keys are set like they are with windows xp) our software has problems using the controls. debugging the application on windows xp and vista showed that both is similar but the vista one is throwing the error "error creating activex control". hopefully there is a workaround for this problem without upgrading to a newer runtime.

michael
thank you for your quick replies.

after using the declaratives the application gets a step further (so it seems). but i guess thats just the matter because the initial "error creating activex control" is not thrown, instead a "PERFORM stack overflow" occurs.

with the "error creating activex control" error the form is flashing up and disappearing.
with the "perform stack overflow" error the form stays in background but no activex control shown yet.