Honored Contributor.
Honored Contributor.
784 views

Cannot access doc info

Jump to solution

When accessing this article (named "What is the meaning of exception error 65537?")...

http://community.microfocus.com/microfocus/cobol/net_express__server_express/w/knowledge_base/2811.what-is-the-meaning-of-exception-error-65537.aspx

... I cannot access the links within this article.

Thanks

0 Likes
1 Solution

Accepted Solutions
Highlighted
Micro Focus Expert
Micro Focus Expert

Unfortunately he links in that article are to are old knowledgebase that does not exist anymore.
One of the links is available as a new link and the other no longer exists.

The new link is:

community.microfocus.com/.../2415.translating-com-automation-errors-to-get-their-meaning.aspx

The text of the second article which has no link is as follows:

How to verify (if registered or not), register, unregister an ActiveX control?

Instantiating an unregistered or non-existent ActiveX control from a Cobol program would result to the following error:

          -----

          Exception 65537 not trapped by the class oleexceptionmanager.
          Description: "Server defined OLE exception"
          (800401F3): Invalid class string
          Hit T to terminate program. Hit any other key to continue.

          -----

Solution:

Use the olesup class (isServerRegistered) to check if a control is registered:

          invoke olesup 'isServerRegistered' using ole-server-name *>pic x(256) - null-terminated
                                  returning hresult *> pic 9(9) comp-5
          if hresult not = zero  *>activex not registered
To register an ActiveX control, call the DllRegisterServer entry point within the DLL:
             call win32api 'LoadLibraryA'
                     using by reference z'ActiveXFile.dll'
                 returning activex-handle *> pointer
             if activex-handle not = NULL
                 call win32api 'GetProcAddress'
                         using by value     activex-handle
                               by reference z'DllRegisterServer'
                     returning proc-ptr *>procedure-pointer
                 call win32api proc-ptr *>register activex
                 if return-code = zero
                     display '***ActiveX successfully registered'
                 else
                     display '***Unable to register ActiveX'
                     stop run
                 end-if
             else
                 display '***Could not load/found ActiveX'
                 stop run
             end-if

To unregister an ActiveX control, call the DllUnregisterServer entry point within the DLL. This can be done exaclty as above with the exception of replacing the DllRegisterServer reference to DllUnregisterServer.

View solution in original post

0 Likes
1 Reply
Highlighted
Micro Focus Expert
Micro Focus Expert

Unfortunately he links in that article are to are old knowledgebase that does not exist anymore.
One of the links is available as a new link and the other no longer exists.

The new link is:

community.microfocus.com/.../2415.translating-com-automation-errors-to-get-their-meaning.aspx

The text of the second article which has no link is as follows:

How to verify (if registered or not), register, unregister an ActiveX control?

Instantiating an unregistered or non-existent ActiveX control from a Cobol program would result to the following error:

          -----

          Exception 65537 not trapped by the class oleexceptionmanager.
          Description: "Server defined OLE exception"
          (800401F3): Invalid class string
          Hit T to terminate program. Hit any other key to continue.

          -----

Solution:

Use the olesup class (isServerRegistered) to check if a control is registered:

          invoke olesup 'isServerRegistered' using ole-server-name *>pic x(256) - null-terminated
                                  returning hresult *> pic 9(9) comp-5
          if hresult not = zero  *>activex not registered
To register an ActiveX control, call the DllRegisterServer entry point within the DLL:
             call win32api 'LoadLibraryA'
                     using by reference z'ActiveXFile.dll'
                 returning activex-handle *> pointer
             if activex-handle not = NULL
                 call win32api 'GetProcAddress'
                         using by value     activex-handle
                               by reference z'DllRegisterServer'
                     returning proc-ptr *>procedure-pointer
                 call win32api proc-ptr *>register activex
                 if return-code = zero
                     display '***ActiveX successfully registered'
                 else
                     display '***Unable to register ActiveX'
                     stop run
                 end-if
             else
                 display '***Could not load/found ActiveX'
                 stop run
             end-if

To unregister an ActiveX control, call the DllUnregisterServer entry point within the DLL. This can be done exaclty as above with the exception of replacing the DllRegisterServer reference to DllUnregisterServer.

View solution in original post

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.