com

Compiling a VB6 COM DLL through command line gets a different CLSID each time

血红的双手。 提交于 2019-12-24 15:14:01
问题 Let dllproject.vbp be a DLL VB6 project. Each time i compile through this Line : VB6.EXE /MAKE dllproject.vbp /outdir somedir The compiler produce a dll with another CLSID. Why ? (EDIT) 回答1: Found why here. In a few word, binary compatibility must be activated. A good way is to keep a copy of the dll (renamed .cmp) for example and reference this copy for version compatibility (Project -> [project name] properties.... 来源: https://stackoverflow.com/questions/34681408/compiling-a-vb6-com-dll

Add contact to distribution list programmatically

二次信任 提交于 2019-12-24 15:06:04
问题 I am really stuck in this issue and searching didn't yield me a lot. Most answers I found either get Contacts not add them or use LDAP. The best I've been able to do is display the window where you add people to the distribution list but I am not able to do that part programmatically Here is the my best attempt: Microsoft.Office.Interop.Outlook.Application oApp = new Microsoft.Office.Interop.Outlook.Application(); NameSpace oNS = oApp.GetNamespace("MAPI"); //Get Global Address List.

VBA importing COM-registered dll and calling constructor with arguments

青春壹個敷衍的年華 提交于 2019-12-24 14:44:26
问题 Is it possible to reference a COM-registered DLL and then create objects that require arguments in the constructor in VBA code? I'm successfully referenced the tlb in Access 2013 (64-bit) that was registered with regasm , and I've managed to create a simple object that doesn't need arguments in the constructor. From what I read, it is not. Do I now face major refactoring? 回答1: It doesn't have to be "major". You simply need a factory method, one that takes all the arguments you need to

Trouble Casting COM Object to a C#/.NET Class

落爺英雄遲暮 提交于 2019-12-24 14:44:13
问题 I have a base class that is written in C# that implements an interface defined in an IDL library. I have a C++ class that manages the single instance of this class. I also have a C# project that needs to make use of this class [instance (that is obtained through the C++ project)]. I want to cast the COM interface that my base class implements back into my C# base class. However, when I cast the generic object that I acquired from the C++ proportion into my C# base class, I received an error.

Trouble Casting COM Object to a C#/.NET Class

风流意气都作罢 提交于 2019-12-24 14:31:50
问题 I have a base class that is written in C# that implements an interface defined in an IDL library. I have a C++ class that manages the single instance of this class. I also have a C# project that needs to make use of this class [instance (that is obtained through the C++ project)]. I want to cast the COM interface that my base class implements back into my C# base class. However, when I cast the generic object that I acquired from the C++ proportion into my C# base class, I received an error.

How do I construct typed constants for the OneNote COM API in python?

瘦欲@ 提交于 2019-12-24 14:11:56
问题 I want to use the UpdatePageContent COM method documentation via the python win32com module. Things I can do so far include getting the hierarchy, getting page contents, etc. I can even validly manipulate the XML to prepare changes (tested using the MATLAB COM interface). This is a minimal example of what I am trying to do: import win32com from bs4 import BeautifulSoup oneNoteApp = win32com.client.Dispatch('OneNote.Application') pageID = '{603BD3F0-4DAB-4E5B-8E28-28CA0F2B0C83}{1}{B0}' # from

Modeless form cannot receive keyboard input in Excel Add-in developed by Delphi

狂风中的少年 提交于 2019-12-24 13:46:41
问题 Is it bug of VCL?? Non modal form cannot receive input in Excel COM Add in. But the very same code of C# works fine. Demo: https://drive.google.com/open?id=1eKermBZdgXdT7KtfJeZWxYiUwjDNRAst C# Demo: https://drive.google.com/open?id=1tdcgkbHU8cExVhHrmFsQeA5oqjlzxN3k Delphi Code: procedure TDelphiAddIn1.OnStartupComplete(var custom: PSafeArray); var LForm: TForm1; begin LForm := TForm1.Create(nil); LForm.Show; end; C# Code: public void OnStartupComplete(ref System.Array custom) { new Form1()

_pAtlModule pointer is null when i try to CreateInstance using the CComObject function

与世无争的帅哥 提交于 2019-12-24 13:26:11
问题 I am working on the OPC(OLE process Control)Client program,with the asynchronous CALLBACK methods to get data from PLC using the KepServer.But I encountered the issue: CComObject<COPCDataCallback>* pCOPCDataCallback; // Pointer to Callback Object // Create Instance of Callback Object using an ATL template CComObject<COPCDataCallback>::CreateInstance(&pCOPCDataCallback); and then it stopped at here: _pAtlModule->Lock(); this is in the atlcom.h any ideas of how to solve this issue? 回答1: When

C# Casting system.__comobject to class type

有些话、适合烂在心里 提交于 2019-12-24 13:25:38
问题 I have an Excel Add-In that I'm currently trying to set up a unit test framework for. For the unit tests I've followed this guide: http://blogs.msdn.com/b/varsha/archive/2010/08/17/writing-automated-test-cases-for-vsto-application.aspx It seems to work fine, until I want to return a class object from my interface. Specifying the class object as the return type throws a "return argument has an invalid type" exception when calling the method. Changing the return type from the class to an object

Inno setup How to determine whether a file is a .NET assembly

拥有回忆 提交于 2019-12-24 12:57:33
问题 I want my inno setup to loop through dlls (both .net and com dlls) in particular folder and register each dll. Is there a way to identify each dll type (.net/com) and use regasm/regsvr depending on the type of the dll. I have a code which loops through .net dlls in a folder and register each one. The code can be found here. In this case, all the dlls were .net type. How to achieve the same with both dlls present in the same folder. 回答1: The following function(s) (originally based on a same