com

COM Interface Guid

孤人 提交于 2019-12-21 09:09:24
问题 I'm not much into COM interfaces, so i have a small question, say I have this code: [Guid("148BD528-A2AB-11CE-B11F-00AA00530503"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] internal interface IEnumWorkItems { [PreserveSig()] int Next([In] uint RequestCount, [Out] out System.IntPtr Names, [Out] out uint Fetched); void Skip([In] uint Count); void Reset(); void Clone([Out, MarshalAs(UnmanagedType.Interface)] out IEnumWorkItems EnumWorkItems); } How do I know that "148BD528-A2AB-11CE

missing Embed Interop Type property

二次信任 提交于 2019-12-21 07:00:57
问题 In one C# project, I get the following warning: warning CS1762: A reference was created to embedded interop assembly 'Interop.SomeLibrary.dll' because of an indirect reference to that assembly created by assembly 'ALibraryOfMine.dll'. Consider changing the 'Embed Interop Types' property on either assembly. However, in the C# project that gives this warning, I do not see an Embed Interop Types property on the COM library reference Properties. That's in VS 2010. In the VS 2008 ALibraryOfMine

missing Embed Interop Type property

扶醉桌前 提交于 2019-12-21 07:00:11
问题 In one C# project, I get the following warning: warning CS1762: A reference was created to embedded interop assembly 'Interop.SomeLibrary.dll' because of an indirect reference to that assembly created by assembly 'ALibraryOfMine.dll'. Consider changing the 'Embed Interop Types' property on either assembly. However, in the C# project that gives this warning, I do not see an Embed Interop Types property on the COM library reference Properties. That's in VS 2010. In the VS 2008 ALibraryOfMine

Excel .NET COM - Automation error. The system cannot find the file specified

不想你离开。 提交于 2019-12-21 06:58:47
问题 I have a .NET 2.0 COM object that's used by VBA in Excel. It works fine on my dev machine, but when trying to use it on a clean VM workstation I get this error: Automation error. The system cannot find the file specified. The dll is registered with "regasm /tlb /codebase mycom.dll" and not put in the GAC. I don't have administration rights on the VM box Any ideas? 回答1: You need to either invoke regasm with the full path to the assembly as the codebase parameter value or put the assembly into

implement COM interface type library in python

对着背影说爱祢 提交于 2019-12-21 05:58:15
问题 I have a plugin that I'm trying to create as a sample for an application from the company I work for. I'm trying to write this plugin in Python. The way the plugin architecture works is that the plugin needs to implement an interface defined in a provided COM type library. So it is a COM client to that type library and in the end gets registered as a COM Server to the registry and the application by giving it the ClassID for late-bound COM by the application. I'm using pythoncom and win32com

Creating an IShellItem instance for a non-existent file

假装没事ソ 提交于 2019-12-21 05:45:11
问题 How can I get an IShellItem object for a non-existent file (or directory)? SHCreateItemFromParsingName and SHCreateItemFromRelativeName fail with 0x80070002 (file not found) and ILCreateFromPath returns a NULL pidl. First I thought it might be impossible, but for example IFileSaveDialog creates such an IShellItem for its result (if you specify a new file in the dialog). 回答1: There is such a thing as a simple pidl and they can represent non-existent files. So I guess you want

How to Install a COM using ClickOnce

别来无恙 提交于 2019-12-21 05:38:13
问题 I have installed my windows application that uses TeeChart ActiveX (a COM Component for charting) using ClickOnce. If I register manually TeeChart using regsvr32 teechart8.ocx, my application works fine. But I want and I need to install the application using ClickOnce. How can I do that? 回答1: ClickOnce can only copy files. So you have these options: Use Reg-Free COM as Jeff Hall suggests. This is probably the best option if you can do it. Run regsvr32 manually when your .exe file first loads

Runtime callable wrapper (RCW) scope - process or application domain?

瘦欲@ 提交于 2019-12-21 04:42:11
问题 What is the scope of Runtime Callable Wrapper (RCW), when referencing unmanaged COM objects? According to the docs: The runtime creates exactly one RCW for each COM object, regardless of the number of references that exist on that object. If I had to "guess" - this explanation should mean "one per process", but is it really? Any additional documentation will be very welcome. My application runs in its own application domain (it is Outlook addin), and I would like to know what happens if I use

Use DLL in PHP?

做~自己de王妃 提交于 2019-12-21 04:40:57
问题 I'm not going to lie. I'm not all the familiar with Windows and COM objects. That's why i'm here. First of all is it possible to access a DLL from within a PHP script running out of Apache? In my journey around the internets i believe that i have 2 options: compile the dll as an extension for PHP. (i didn't make this dll) access the DLL as a COM object which is sort of what it's designed for anyways. So i'm taking the COM approach. try{ $com = new COM('WHAT_GOES_HERE'); } catch(Exception $e){

Is it possible for the .NET WebBrowser control to use IE9?

我是研究僧i 提交于 2019-12-21 03:33:26
问题 I realise it's an early release and unstable. I wouldn't dream of swapping out the default webbrowser control for IE9 in any other project, but in this case I specifically need IE9 to compare alongside other versions. I'd like to have the .NET WebBrowser control use IE9 instead of the default version of IE on the machine. I have full control of the machine so it's no problem to hack away at system files or whatever else may be necessary. Normally, this could be achieved by installing the