com

Using VCProjectEngine and COM

不想你离开。 提交于 2019-12-14 04:08:08
问题 I am trying to use the COM system for VCProjectEngine. It is pretty simple to use in C# but I am hitting a wall in native C++. I am using the COM system and so far I was able to get a pointer to the VCProjectEngine interface using the CoCreateInstance function. But now what should I do with this interface? I would like to access the VCProject interface to be able to add files to the project. I tried to go with LoadProject or CreateProject but it takes a IDispatch parameter not a VCProject one

Check Portable Executable (PE) file for COM signature

只谈情不闲聊 提交于 2019-12-14 04:05:42
问题 I need to programatically check arbitrary Dlls to see whether they are inproc COM servers. In other words, can they be registered on the current system using regsvr32 / DllRegisterServer. Short of Andy's suggestions on this question, is there a way to figure out the needed without having to: Load the library and check for DllRegisterServer/DllUnregisterServer exports. Attempt registration with regsvr32 while catching exceptions? There must be something in the PE format that indicates the

Is there COM exposure for Direct3D 10

夙愿已清 提交于 2019-12-14 03:58:25
问题 Gentlemen and esteemed ladies. I posted this question in the COM forum at Code Project and got a snotty reply so hopefully you will be more helpful. I see that Microsoft has a COM library for Direct3D 9 exposed with GUID 81BDCBCA-64D4-426d-AE8D-AD0147F4275C. Has Microsoft exposed Direct3D 10 on COM and if so, what is the interface GUID? Thanks in advance. 回答1: From the documentation on MSDN, it looks like they've moved from having an IDirect3D9 object with member functions such as IDirect3D9:

How to connect a C++ COM To a WCF Service

耗尽温柔 提交于 2019-12-14 03:44:32
问题 I'm looking to a way to connect a COM+ legacy application to a WCF Service, i have been researching this since a couple of days and i haven been lucky to find any useful information, can anyone point me into the right direction on this? I Need the old COM+ component to make calls to a new C# WCF Service so I Need some kind of proxy in the COM Component that abstracts the communication with the Service. Thanks in advance, i really appreciate any help. 回答1: I assume you mean that you have a WCF

Credential Provider - how to skip SAS?

你离开我真会死。 提交于 2019-12-14 02:55:21
问题 I implemented my own custom Windows credential provider following the Windows SDK example which should let a remote application connect to a server and perform logon automatically. The problem is: the SetUsageScenario event is not called until a user presses the SAS combination (Ctrl+Alt+Del), therefore my credential provider isn't able to automatically perform the login until that happens. How does RDP do the login automatically without me pressing Ctrl+Alt+Del and logging in automatically?

How to debug COM object in Visual Studio 6.0 that is created in an ASP page?

丶灬走出姿态 提交于 2019-12-14 02:23:08
问题 I have an old C++ COM component which has to stay in Visual Studio 6.0 format. I can't for the life of me figure out how to debug the code in the actual COM component. I'm able to build it in debug mode, add breakpoints and attach it to the dllhost.exe process, but the Visual Studio environment will only show me the disassembly from dllhost.exe and not my source code (It also doesn't stop on the breakpoints). I remember a while ago there was a way to make IIS (or inetinfo.exe) the target of

Find COM DLL path from Com Interop Assembly

孤街浪徒 提交于 2019-12-14 02:18:48
问题 I am trying to write a wrapper around a legacy COM object and install the wrapper into the GAC. The goal would be to automate the setup of specific configuration information the component requires, and make a common strongly typed interface for all of my applications to use. My solution thus far is to keep an XML configuration file in the same directory as the original COM DLL, and load the configuration in the class constructor. Unfortunately, I have been unable to find the location of the

Writing COM servers for the windows API in C#, where to begin?

若如初见. 提交于 2019-12-14 01:54:00
问题 I am trying to write some plugins to work with the Terminal Services Session Broker Plugin Interface. I am very fluent in C# but I have not done any C++ since the late 90's. For the plugin I am writing I plan on communicating with a database and I would prefer to use System.Data.SqlClient to talk to it as I know it's ins and outs fairly well. I have the Windows SDK which has provided my with the .idl file for the interface ( tssbx.idl ). The SDK also provides a C header file ( tssbx.h ) and a

COM C#, How to use C++ to call COM

泄露秘密 提交于 2019-12-14 01:50:15
问题 I used a online example of C# COM and call it through C++. The following is the C# COM code, only one interface "ICalc" and one class "Calc". namespace COMLib { [Guid("F40D7BC9-CF53-4613-AA5E-F269AD73808F")] [InterfaceType(ComInterfaceType.InterfaceIsIDispatch)] public interface ICalc { [DispId(1)] long Factorial(int n); } [Guid("8EE38F2E-75BE-4B45-87B6-3F6D15FDBBC5")] [ClassInterface(ClassInterfaceType.None)] [ComSourceInterfaces(typeof(ICalc))] [ProgId("MyCalc")] public class Calc : ICalc {

How to extend CAxHostWindow?

霸气de小男生 提交于 2019-12-14 01:28:48
问题 Standard class CAxHostWindow that used by ATL for COM ActiveX hosting does not support interface IDocHostUIHandler2. How can i to extend CAxHostWindow class for IDocHostUIHandler2 supporting? 回答1: Actually, there's a way to customize CAxHostWindow without modifying it. E.g, I wanted to implement IOleCommandTarget on the client site object. The tricky part was to override the creation of the host window. Here's how it can be done: class ATL_NO_VTABLE CWebBrowserHost : public CAxHostWindow,