com

Why doesn't UI Automation condition find element by UIA_IsScrollPatternAvailablePropertyId?

♀尐吖头ヾ 提交于 2020-08-10 20:38:53
问题 I wanted to find the element within a main window handle that allows scrolling. So instead of finding scrollbars and then the owner of the scrollbars I wanted to just return the items that allow scrolling via a ScrollPattern so I setup the condition on that but nothing is found. if I search for scrollbar owner window then get the ScrollPattern it works. Why can't I just find the elements that have a scroll pattern available? Here's the common code: BOOL CUIAutomateScroller::FindWindow(HWND

Why doesn't UI Automation condition find element by UIA_IsScrollPatternAvailablePropertyId?

早过忘川 提交于 2020-08-10 20:38:13
问题 I wanted to find the element within a main window handle that allows scrolling. So instead of finding scrollbars and then the owner of the scrollbars I wanted to just return the items that allow scrolling via a ScrollPattern so I setup the condition on that but nothing is found. if I search for scrollbar owner window then get the ScrollPattern it works. Why can't I just find the elements that have a scroll pattern available? Here's the common code: BOOL CUIAutomateScroller::FindWindow(HWND

PowerShell script executed from Inno Setup is failing with “Retrieving the COM class factory for component with CLSID {XXXX} failed - error 80040154”

£可爱£侵袭症+ 提交于 2020-08-05 09:50:32
问题 I want to convert a folder to an application with IIS using Inno Setup. I found that I can do it with PowerShell, using ConvertTo-WebApplication 'IIS:\Sites\Default Web Site\MY_APP' I have added this to my Inno Setup script: [Run] Filename: "powershell.exe"; \ Parameters: "-ExecutionPolicy Bypass -Command ConvertTo-WebApplication 'IIS:\Sites\Default Web Site\MY_APP'" \ WorkingDir: {app}; Flags: runhidden But PowerShell is failing with: Retrieving the COM class factory for component with CLSID

difference between pywintypes and pythoncom for com_error

谁都会走 提交于 2020-07-22 05:21:50
问题 What is the difference between pywintypes and pythoncom? I am really new to COM handling using python so a simplified description will be helpful. also I am using a com wrapper to fixed the com error "call is rejected by callee". however the com error is not capture by the exception. so should I be importing com_error from pywintypes or pythoncom? from pywintypes import com_error import win32com.client class ComWrapper: @staticmethod def wrap(func, *func_args): try: print('running the

Does a tlb file have an association with architecture?

我与影子孤独终老i 提交于 2020-07-20 10:30:22
问题 I have a 32bit DLL that is designed to be accessed through the com model and the associated tlb file. The DLL appears to be x86. Is there any way to access this kind of DLL from an x64 program? Are tlb files x86/x64 agnostic? I am asking because some functions appear to work, others crash, and o̶t̶h̶e̶r̶s̶ ̶a̶r̶e̶ ̶m̶i̶s̶s̶i̶n̶g̶ ̶c̶o̶m̶p̶a̶r̶e̶d̶ ̶t̶o̶ ̶t̶h̶e̶ ̶.̶n̶e̶t̶ ̶a̶s̶s̶e̶m̶b̶l̶i̶e̶s̶ . --Edit-- Missing assemblies appear due to error on the part of the OEM. 回答1: Type libraries were

Get SystemMediaTransportControls for other window

岁酱吖の 提交于 2020-07-10 10:32:10
问题 I'm interesting in ISystemMediaTransportControlsInterop::GetForWindow method. The documentation is outdated for it. But I have found files SystemMediaTransportControlsInterop.h and SystemMediaTransportControlsInterop.idl in folder C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\um of Windows SDK. They are describing GetForWindow method. So, how can I get an instance of ISystemMediaTransportControlsInterop and call this method? WinRT contains only method

Releasing New Version of Tlb and When Tlb Needs To Be Re-Referenced

坚强是说给别人听的谎言 提交于 2020-07-09 07:16:45
问题 I have a C# dll and generarted a tlb using regasm. I have given a utility spreadsheet to the users which uses this tlb. The tlb is unregistered and registered (using regasm.exe) everytime a new version of our application is released. However, at times, when the user is using the spreadsheet after a new release, it throws a 'activex component cannot create instance' error, exactly on the line of code where I create an object of a type. I fix this just by, removing and adding the tlb reference

Out-of-process COM server without a proxy/stub DLL?

只愿长相守 提交于 2020-07-07 05:50:18
问题 I am learning how to implement an out-of-process COM server and came across this Code Project article, Building a LOCAL COM Server and Client: A Step by Step Example. I can build it, and it runs fine, but where is the proxy/stub DLL? All I can see is the IDL file from which the proxy/stub code is generated during the build. But how is the DLL built, and where is it? 回答1: The short answer is that all the interfaces are marked "oleautomation", so oleaut32.dll performs the marshaling, since COM

Setting the folder view in a CFileDialog (MFC)

蓝咒 提交于 2020-06-27 17:57:07
问题 Is there a standard way to set the folder view in a CFileDialog (Vista-style enabled)? I'm trying to get it to show Details view and some custom columns. I've implemented a Windows 7 column handler that displays app-specific info for files created by my app. However, in order to view these custom columns in an Explorer window or a common file dialog, I have to manually set the folder view to Details then select the specific columns I want. This works fine, but the goal is for the file

Non-zero based multidimensional arrays

折月煮酒 提交于 2020-06-25 02:15:07
问题 I am extracting cells out of a spreadsheet using the Interopt.Excel API. When I call: object[,] rangeValues = (object[,])range.get_Value(XlRangeValueDataType.xlRangeValueDefault); And set a breakpoint and inspect rangeValues , I see elements starting at [1,1] "foo", [1,2] "bar", etc. However, if I do string[,] test = new string[2, 2] { { "one", "two" }, { "three", "four" } }; The elements start at [0,0]. How does the Excel API construct a multidimensional array w/ empty elements? I tried