com

How to use tlb files in a native C++ project

跟風遠走 提交于 2021-01-27 05:59:15
问题 I have a tlb files that contains some function declaration that I need to use. If I use #import "type_library.tlb" I can correclty reference the function from my code: tlb_namespace::required_function(); But when I compile the project the linker says that tlb_namespace::required_function is an unresolved external symbol. How can I succesfully build this kind of project? EDIT : I have used the same type library in a Dummy VBA access project. I have added the reference to the type library and I

How to use tlb files in a native C++ project

▼魔方 西西 提交于 2021-01-27 05:59:12
问题 I have a tlb files that contains some function declaration that I need to use. If I use #import "type_library.tlb" I can correclty reference the function from my code: tlb_namespace::required_function(); But when I compile the project the linker says that tlb_namespace::required_function is an unresolved external symbol. How can I succesfully build this kind of project? EDIT : I have used the same type library in a Dummy VBA access project. I have added the reference to the type library and I

Use IDM(Internet Download Manager) API with python

偶尔善良 提交于 2021-01-24 12:29:44
问题 I am trying to use the IDM api through python but I'm completely lost on how i would do this. http://www.internetdownloadmanager.com/support/idm_api.html Could someone please help me? I don't even know if it is possible to do this with python. 回答1: The IDM api seems to be accessible from Visual Basic, which is good, because it means that it supports IDispatch and therefore Python. You want to use the comtypes library. Using the VB sample as a prototype: import comtypes.client as cc import

Use IDM(Internet Download Manager) API with python

僤鯓⒐⒋嵵緔 提交于 2021-01-24 12:28:21
问题 I am trying to use the IDM api through python but I'm completely lost on how i would do this. http://www.internetdownloadmanager.com/support/idm_api.html Could someone please help me? I don't even know if it is possible to do this with python. 回答1: The IDM api seems to be accessible from Visual Basic, which is good, because it means that it supports IDispatch and therefore Python. You want to use the comtypes library. Using the VB sample as a prototype: import comtypes.client as cc import

What is the Component Object Model (COM)? Is it language-dependent?

假装没事ソ 提交于 2020-12-27 07:54:04
问题 I'm new to COM, and I don't know what it is or why it exists. Is this a programming methodology like OOP? Do programming languages have to support it? (with some special keywords or something) When I asked my professor about it, he said: COM is a binary-stable way to do OOP. We need to know binary-layout (something..something..) I've no idea what it means. Some people say it is used for code reuse. OOP does a good job at that already, so then why did this COM evolve in the first place? What

Using htmlfile COM object to access the .getOwnPropertyDescriptor() method of an object in WSH JScript

佐手、 提交于 2020-12-15 05:31:23
问题 In the comments of this question, I was told that the .getOwnPropertyDescriptor() method isn't supported in ES3 ..., so it probably isn't supported in JScript [either] and that is indeed what I see when trying to invoke that method in cscript.exe / wscript.exe : Object doesn't support this property or method However, the latest JScript version I'm using is 5.812 and according to this document, the method should be available in 5.8* JScript. The discrepancy has also been noted in this post,

Powerpoint changing one character's color in a chart's datalabel through COM in python

青春壹個敷衍的年華 提交于 2020-12-13 02:57:56
问题 I have a PowerPoint presentation where I have a chart where I want to change one charcter's colour in a datalabel. In VBA I can do this with ChartObject.SeriesCollection(SeriesCounter).Points(PointCounter).DataLabel.Format.TextFrame2.TextRange.Characters(1, 2).Font.Fill.ForeColor.RGB = ColourSigLower However, when I try to do the same via Python 3 COM I get the following error com_error: (-2147352559, 'Does not support a collection.', None, None) Here is a full code snippet of what I try to

Powerpoint changing one character's color in a chart's datalabel through COM in python

孤街浪徒 提交于 2020-12-13 02:57:45
问题 I have a PowerPoint presentation where I have a chart where I want to change one charcter's colour in a datalabel. In VBA I can do this with ChartObject.SeriesCollection(SeriesCounter).Points(PointCounter).DataLabel.Format.TextFrame2.TextRange.Characters(1, 2).Font.Fill.ForeColor.RGB = ColourSigLower However, when I try to do the same via Python 3 COM I get the following error com_error: (-2147352559, 'Does not support a collection.', None, None) Here is a full code snippet of what I try to

Using winrt::com_ptr<ID3D11Device1> with D3D11CreateDevice()?

对着背影说爱祢 提交于 2020-12-07 05:17:46
问题 I've been studying the code from the DirectXTK example project and trying to implement it in a new project. It seems like Microsoft recommends using WinRT in new projects, though, so I decided I would try to switch instances of WRL::ComPtr to winrt::com_ptr . I'm stuck, though, trying to move between ID3D11Device1 in the project's Game class and ID3DDevice in D3D11CreateDevice() . Here's the example code, slightly abstracted for simplicity's sake: ComPtr<ID3D11Device1> global_device; void

Using winrt::com_ptr<ID3D11Device1> with D3D11CreateDevice()?

荒凉一梦 提交于 2020-12-07 05:15:48
问题 I've been studying the code from the DirectXTK example project and trying to implement it in a new project. It seems like Microsoft recommends using WinRT in new projects, though, so I decided I would try to switch instances of WRL::ComPtr to winrt::com_ptr . I'm stuck, though, trying to move between ID3D11Device1 in the project's Game class and ID3DDevice in D3D11CreateDevice() . Here's the example code, slightly abstracted for simplicity's sake: ComPtr<ID3D11Device1> global_device; void