com

how to start bho(browser helper objects) programming

蓝咒 提交于 2019-12-24 06:42:39
问题 I need to develop a bho, but I never use it before. So can anyone give me some advices on how to start bho? Some tutorials are welcomed. PS: I am familiar with C++ developing. 回答1: Here are some samples: http://social.msdn.microsoft.com/forums/en-US/ieextensiondevelopment/thread/a7900d83-572f-4781-a0c4-41ea39710d31/ http://www.adp-gmbh.ch/win/com/bho.html hope it help 来源: https://stackoverflow.com/questions/10331890/how-to-start-bhobrowser-helper-objects-programming

How to add and implement a new interface to an Inproc COM server

淺唱寂寞╮ 提交于 2019-12-24 06:37:28
问题 I've implemented a windows deskband (using the windows SDK sample) and need a way to communicate (one call to start IPC with another application, IPC is already working) with it. My COM experience is very limited but extrapolating from what I've seen, I think it should be possible to create a new COM interface, implement it in the deskband object (which I have access to via IBandSite), call QueryInterface() for my own interface on it and then use it to call directly into the deskband. I've

Automating Outlook and Word to create email message

房东的猫 提交于 2019-12-24 06:37:21
问题 I'm trying to create a Word email message that will be used as the body for an Outlook message. I've been looking at sample code from Microsoft here but this code falls over when trying to create the new word document at the wordApp.Documents.Add line: Word.Application wordApp = new Word.Application(); object template = System.Reflection.Missing.Value; object newTemplate = System.Reflection.Missing.Value; object documentType = Word.WdNewDocumentType.wdNewEmailMessage; object visible = false;

Drag and Drop to explorer causing invalid FORMATETC (DV_E_FORMATETC) error

我的梦境 提交于 2019-12-24 06:31:07
问题 I'm trying to use this excellent example to implement dropping virtual files into Windows Explorer. However, I'm stymied by this error. Towards the bottom, inside void System.Runtime.InteropServices.ComTypes.IDataObject.GetData(ref System.Runtime.InteropServices.ComTypes.FORMATETC formatetc, out System.Runtime.InteropServices.ComTypes.STGMEDIUM medium) on the first call to ((System.Runtime.InteropServices.ComTypes.IDataObject)this).GetDataHere(ref formatetc, ref medium); I'm getting back a DV

Session and APP Scope for COM objects

有些话、适合烂在心里 提交于 2019-12-24 05:45:13
问题 We are going to develop ASP pages for a WIN CE device. The web server running on the system is httpd. I have a few doubts on the scope of com objects Does WinCE(httpd) ASP support Session and App Scope? Does page scope alone is supported in ASP in Wince? What should I do to introduce session and app Scope? Where can I get more information on this? 回答1: Does WinCE(httpd) ASP support Session and App Scope? According to MSDN: Windows CE does not provide support for the Session or Application

Issues Using Midl to create a .tlb from .idl “expecting a type specification”

[亡魂溺海] 提交于 2019-12-24 04:17:12
问题 I have been having a prolonged encounter with the beast known as COM Interop... I am currently trying to generate a .tlb from a .idl file generated by the OLE/COM Object Viewer. However when trying to run Midl.exe to compile it I get an error: .\Sim.API.IDL(236) : error MIDL2025 : syntax error : expecting a type s pecification near "ImportFileStatus" My .idl file is more that 1000 lines long so I don't particularly want to post it here however, I believe the Part of interest is: typedef [uuid

Unable to get the “Add” method of a ColumnDefinitionCollection in UWP

三世轮回 提交于 2019-12-24 04:04:27
问题 In the context of a Windows Universal Application, and using reflection, I'm trying to get the Add method from a ColumnDefinitionCollection (the built-in type) So I use this: type.GetRuntimeMethods().First(info => info.Name == "Add"); BUT it returns null! It also happens with the Contains method. Both of them are defined in ICollection<T> ( IList<T> derives from it). However, if I define my own class deriving from IList<T> , it works perfectly. Then, how do I get a MethodInfo for the Add

Requirements for COM aggregate my custom IRibbonExtensibility implementation?

瘦欲@ 提交于 2019-12-24 03:25:47
问题 We have a stripped down Connect class which instantiates the addin's core from an other assembly. Our architectural design is to keep the UI and business logic separated from the loading module (= Connect class), but the restrictions of a shared Addin make us troubles. what we did in Connect.cs: [GuidAttribute("XYZ"), ProgId("XYZ")] public class Connect : Object, IDTExtensibility2, ICustomQueryInterface { ... CustomQueryInterfaceResult ICustomQueryInterface.GetInterface(ref Guid iid, out

COM - [in] parameter as SAFEARRAY(STRUCT)

杀马特。学长 韩版系。学妹 提交于 2019-12-24 03:03:50
问题 I am able to call a COM interface method using SAFEARRAY(BSTR) as input. If I define instead a simple (containing only some BSTR-s fields) STRUCT to pass into the COM I get "[System.ArgumentException] = {"The parameter is incorrect. (Exception from HRESULT: 0x80070057 (E_INVALIDARG))" The call to my COM server is not made because as it seems the arguments from client does not match the expected arguments on server: E_INVALIDARG Here is my declaration in IDL: typedef enum UserEntityType { User

How is “variant time” (DATE, double, 8-byte) handled?

╄→尐↘猪︶ㄣ 提交于 2019-12-24 03:03:14
问题 I can't seem to find any information on how a "variant time" ( DATE, double, 8-byte variable ) is handled.... I have a variant time " A " which value is " 41716.892329 ". If I convert " A " using "VariantTimeToSystemTime" (or "COleDateTime") - I get " 2014-03-18 21:24:57 ". How is this variant time calculated? Is it capable of storing milliseconds? Is there any way to determine if variant time is an AM or PM time? I'm a bit confused regarding the AM/PM thing because the device that I'm