Jump to content
Sign in to follow this  
RonGreer

"Catastrophic Error" returned from control

Recommended Posts

RonGreer

I'm working with a proprietary .ocx file that I'm trying to do some automation with.

I can successfully create the control (ObjCreate) and add it to an AutoIT GUI (GUICtrlCreateObj), but when I try and access properties and methods of that object, I get the following COM Error [From an AutoIT COM Handler]:

Number is: 8000FFFF

Win description is: Catastrophic failure

(The IDispatch::Invoke call is returning E_UNEXPECTED)

If I try and access methods that don't exist, then it correctly tells me that the properties cannot be found.

I think I know what the problem is, I just don't know how to fix it.

Controls that are created in MFC as part of COleControl sometimes require the programmer to call "IPersist*::InitNew()" in order to initialize them properly.

This isn't being done in AutoIT.

I can reproduce this using a C++ app where I try to create it without calling that and it doesn't work, and one where if I do call that, then it does work.

What this does internally is set the COleControl's internal m_bInitialized to true, and allows Dispatch Interface calls on the control. Until this happens, then the initialization isn't done, and it can't work.

I found the last message in this thread to be helpful: http://www.codeguru.com/forum/archive/index.php/t-85299.html

Is there any method of adding this to AutoIT or making this work with the current release?

What are the chances of getting a version of AutoIT that does a QueryInterface for InitNew and calls it if it exists?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.