Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Using UIAutomation
Message
From
13/04/2011 00:09:45
 
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Environment versions
Visual FoxPro:
VFP 9
Miscellaneous
Thread ID:
01506966
Message ID:
01507094
Views:
56
Hi Sergey.

Thanks for helping with this.

I had tried using the Object Browser on that DLL, but I get an error dialog to say it can't be loaded as it's invalid or not a type library.
The CreateObjectEx line doesn't work either, saying that it can't find the class.

As an experiment I tried running RegSvr32 on the UIAutomationCore DLL and it says that it can't register it because while it can be loaded, there is no DllRegisterServer entry point. I checked both my machine (XP SP3) and the server I'm working on (Server® 2008 Enterprise) and neither of the DLLs have a DllRegisterServer entry point.

I don't suppose you have any other ideas?

Ian Simcock.




>Try
>
>oUIA = CREATEOBJECTEX("{ff48dba4-60ef-4201-aa87-54103eef594e}", "", "{30CBE57D-D9D0-452A-AB13-7AC5AC4825EE}")
>
>
>You can use VFP Object Browser to look for more info in C:\WINDOWS\SYSTEM32\UIAUTOMATIONCORE.DLL
>
>
>>
>>I'd like to use the UIAutomation library to automate the handling of some task, but I can't find the name of the object so that I can create it using CreateObject.
>>
>>The only examples I can find of instantiating the CUIAutomation Object are in C and they don't use the class name. Here's the C code -
>>
>>#include <uiautomation.h>
>>
>>// CoInitialize must be called before calling this function, and the  
>>// caller must release the returned pointer when finished with it.
>>// 
>>HRESULT InitializeUIAutomation(IUIAutomation **ppAutomation)
>>{
>>    return CoCreateInstance(CLSID_CUIAutomation, NULL,
>>        CLSCTX_INPROC_SERVER, IID_IUIAutomation, 
>>        reinterpret_cast<void**>(ppAutomation));
>>}
>>
>>Has any one used the CUIAutomation Object, or can give me an idea of where to start? I have some .NET code that uses the .NET wrappers for the object, but I'd rather stick with the Win32API if possible, and preferably just using VFP code.
>>
>>If it's of any help, the MSDN page for the CUIAutomation Object is http://msdn.microsoft.com/en-us/library/ff384838%28v=vs.85%29.aspx
>>
>>Ian Simcock.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform