Kbase P82675: Cannot use COM Control on AppServer or batch client
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  13/05/2008 |
|
Status: Verified
FACT(s) (Environment):
Progress 9.x
OpenEdge 10.x
Windows
SYMPTOM(s):
Cannot use COM Control on AppServer
Cannot use ActiveX Control on AppServer
Cannot use PSTimer on AppServer
AppServer agent may crash
Various errors in AppServer logfile indicating that control is not properly initialized.
Error occurred while accessing component property/method: LoadControls.
Not enough storage is available to complete this operation.
Error code: 0x8007000e control_load test.w (5890).
Error occurred while accessing component property/method: <property or method name>.
<COM message>
Error code: <Program name> (5890)
** <program-name>: Unable to evaluate field for assignment. (143)
Invalid widget-handle. Not initialized or points to a deleted widget. (3135)
CAUSE:
This is expected behavior.
COM Controls are UI elements even if the COM Control is not actually visible (such as PSTimer).
Clients that have no UI cannot make use of them. This includes AppServer agents, WebSpeed agents and Batch clients (-b parameter used).
FIX:
Possible workarounds:
1) Use a COM Automation instead of a COM Control.
COM Automations are not UI elements, they are an interface between applications. Do note that events raised via COM Automation may allow for UI interaction - this should be avoided if the code is to run on an AppServer.
2) Keep the COM Control on the client side only.
Marshall the data generated by the control and pass that to the AppServer using 4GL parameters. In this case it may not be possible to move all desired processing to the server-side.
3) Have the AppServer process spawn a full client process (prowin32.exe), and run the code in the newly spawned process. This will require designing a mechanism to pass relevant data from one process to the other, for example by using the -param client parameter.