com

How can I progmatically click a link in a Winform Web Browser control?

落爺英雄遲暮 提交于 2019-12-23 03:51:46
问题 I would like to know how to programatically click a link from with in a Winform Web Browser control. foreach (HtmlElement linkElement in webBrowser.Document.GetElementsByTagName("A")) { if(linkElement.InnerText == "Helpful Tips") { //Click Functionality } 回答1: You should be able to do this using the InvokeMember method. Something along these lines: linkElement.InvokeMember("Click") 来源: https://stackoverflow.com/questions/3419306/how-can-i-progmatically-click-a-link-in-a-winform-web-browser

Register Explorer COM extension only if specific task was selected

[亡魂溺海] 提交于 2019-12-23 03:40:10
问题 I have a complicated program for working with documents. Client requirement: it should be conditionally integrated in Windows Explorer context menu during install, i.e. then user check the corresponding option. So, in my Inno Setup script [Tasks] i've created a separate task named IntegrateToExporer . And in the [Files] section - two COM DLL files (x86/x86-64 version) with regserver flag. My question is: how to make regserver flag conditional? it must be applied only if user select

How To Read Active Directory Group Membership From PHP/IIS using COM?

点点圈 提交于 2019-12-23 03:36:23
问题 I have the following code: $bind = new COM("LDAP://CN=GroupName,OU=Groups,OU=Division,DC=company,DC=local"); When I execute it from a command-prompt, it runs fine. When it runs under IIS/PHP/ISAPI, it barfs. Fatal error: Uncaught exception 'com_exception' with message 'Failed to create COM object `LDAP://CN=...[cut]...,DC=local': An operations error occurred. ' in index.php Stack trace: #0 index.php: com->com('LDAP://CN=...') #1 {main} thrown IIS is configured for Windows Authentication (no

Problems with scheduled task using ITaskScheduler, ITask interfaces

ε祈祈猫儿з 提交于 2019-12-23 03:21:33
问题 The code below executes without any error, but task didn't executed and I didn't see it in control panel . Please help HRESULT CreateOnceActionTask(const wchar_t* taskName, const wchar_t* programPath, const wchar_t* params) { HRESULT hr = S_OK; CComPtr<ITaskScheduler> taskScheduler; if(FAILED(hr = CoCreateInstance(CLSID_CTaskScheduler, NULL, CLSCTX_INPROC_SERVER, IID_ITaskScheduler, (void**)&taskScheduler))) ReturnErrorMsg(hr, L"Failed to get IID_ITaskScheduler"); // create task CComPtr<ITask

Problems with scheduled task using ITaskScheduler, ITask interfaces

Deadly 提交于 2019-12-23 03:21:09
问题 The code below executes without any error, but task didn't executed and I didn't see it in control panel . Please help HRESULT CreateOnceActionTask(const wchar_t* taskName, const wchar_t* programPath, const wchar_t* params) { HRESULT hr = S_OK; CComPtr<ITaskScheduler> taskScheduler; if(FAILED(hr = CoCreateInstance(CLSID_CTaskScheduler, NULL, CLSCTX_INPROC_SERVER, IID_ITaskScheduler, (void**)&taskScheduler))) ReturnErrorMsg(hr, L"Failed to get IID_ITaskScheduler"); // create task CComPtr<ITask

How do I reliably tell that two Inspector references point to the same inspector instance?

末鹿安然 提交于 2019-12-23 03:19:14
问题 [continued from Is there a way to tell whether two COM interface references point at the same instance?] I've got references to Inspector objects from two different sources and need to be able to tell which item from one source corresponds to which item from the other source. However, none of the approaches I have been able to come up with so far worked (reliably): I couldn't simply compare the IUnknown interfaces as it seems that the Inspectors.Item() method is returning a reference to a

tlbimp.exe converts HWND to _RemotableHandle

巧了我就是萌 提交于 2019-12-23 03:17:09
问题 Our COM component interface has the next method: HRESULT CreatePluginWindow([in] HWND hParent, [in] RECT* prcView); We are going to use it in .NET application but interop for this interface is looking like this: void CreatePluginWindow(ref interop.alfrontx._RemotableHandle hParent, ref interop.alfrontx.tagRECT prcView) According my investigation there is no way to use this method without unsafe code. I'd not like to change COM interface in order to use other than HWND type for hParent,

Qt Widget Application “Library not registered” error

岁酱吖の 提交于 2019-12-23 03:12:37
问题 I've just recently started out with Qt and created a simple Qt Widgets application. When I build and run the application (even if I make a fresh project with no new code in it) I get the following error messages: mincore\com\oleaut32\dispatch\ups.cpp(2128)\OLEAUT32.dll!74445072: (caller: 7444FE4F) ReturnHr(1) tid(188) 8002801D Library not registered. mincore\com\oleaut32\dispatch\ups.cpp(2128)\OLEAUT32.dll!74445072: (caller: 7444FE4F) ReturnHr(2) tid(188) 8002801D Library not registered. My

Search Outlook Contact using COM?

a 夏天 提交于 2019-12-23 03:11:09
问题 I want to add support for searching for local Outlook contacts to my ATL/WTL app. Does anyone know of the Outlook COM interface (Office 2003 or greater) allows you to search for contacts? I already have LDAP lookup support but users want to be able to search their private contacts as well. Any information would be welcome. 回答1: To get access to the contacts you first have to get a Namespace object using the Application's GetNamespace function, passing "MAPI" as the namespace name. Then you

I'd like to call the Windows C++ function WinHttpGetProxyForUrl from Python - can this be done?

人盡茶涼 提交于 2019-12-23 02:58:09
问题 Microsoft provides a method as part of WinHTTP which allows a user to determine which Proxy ought to be used for any given URL. It's called WinHttpGetProxyForUrl. Unfortunately I'm programming in python so I cannot directly access this function - I can use Win32COM to call any Microsoft service with a COM interface. So is there any way to get access to this function from Python? As an additional problem I'm not able to add anything other than Python to the project. That means however