com

How to create an IconList property in the Windows Property System?

本小妞迷上赌 提交于 2019-12-18 16:58:53
问题 Currently, my property handler provides properties that can be displayed in Windows Explorer columns of type String . My goal is to extend the handler by a property of (display) type Icon , that can be added as a column to the details view of Windows Explorer. In this column, an icon should be displayed for each file item, e. g. the icon could represent a specific state of the file out of several possible states. However, I did not manage to assemble the necessary parts of creating a property

Is it possible to execute a .NET assembly(dll) from vbscript?

六月ゝ 毕业季﹏ 提交于 2019-12-18 16:56:35
问题 I'd like to execute a .NET dll file from vbscript in a synchronous way - is this possible? if yes, is it possible to execute a GAC assembly? thanks, Ofer 回答1: I think you must first make the .NET assembly COM-visible by including the ComVisible attribute in the AssemblyInfo.cs file: [ComVisible(true)] See this page on MSDN: Packaging an Assembly for COM And then in VBScript you can access those components by the same means you access COM components, i.e. using CreateObject or Server

Call C# methods from C++ without using COM

瘦欲@ 提交于 2019-12-18 16:55:32
问题 Is there a way to create C# objects and call methods from unmanaged C++, but without using COM Iterop? I am looking for something like JNI (but for .Net), where you can manually create the VM, create objects, etc. 回答1: If you are using C++/CLI then you can interact directly with both the managed world and unmanaged code, so interop is trivial. You can also host the CLR yourself, and whilst the hosting API is COM based, you can then create any managed object. The process isn't a difficult as

COM method offsets in Delphi

人走茶凉 提交于 2019-12-18 15:58:07
问题 In Delphi, how do I find out the the address of a COM method? I can hardcode the offsets //0 is the offset of the QueryInterface method p := TPonterArray(pointer(SomeInterface)^)[0]; but I would prefer to use symbolic names. The folllowing obviously does not work: var M : TMethod; ... M := TMethod(SomeInterface.QueryInterface); Thanks! 回答1: You can use the vmtoffset assembler directive to get the byte offset of an interface method relative to the start of the interface's method table. Take a

Getting the error “The 'VFPOLEDB.1' provider is not registered on the local machine” even after installing and registering the provider

杀马特。学长 韩版系。学妹 提交于 2019-12-18 15:52:08
问题 Alright, so I've got a Windows service that has a FileSystemWatcher that watches an output folder for some Visual FoxPro database files. And it leverages the VFPOLEDB.1 provider to read those files. I cannot go away from this provider because it's being used in production. However, I've never had to support this application before so that's why my development box isn't setup for it. Here is my environment: Windows 7 x64 Visual Studio 2005 .NET 2.0 Windows service so, when I first started

How can I force python(using win32com) to create a new instance of excel?

吃可爱长大的小学妹 提交于 2019-12-18 15:33:57
问题 I'm automating some excel related tasks which take a long time. I'm creating an excel instance using: excel = win32.gencache.EnsureDispatch('Excel.Application') wb = excel.Workbooks.Add() however, after the script starts running, if i select an open excel workbook(not the one python is working on), The python script crashes. However, if I open a new excel workbook and type stuff into it, the python script is unaffected. Is there a particular way I can call excel to prevent this from happening

COM vs non-COM DLL

被刻印的时光 ゝ 提交于 2019-12-18 15:25:58
问题 The majority of my experience is with high level languages like Java and VB.NET. I do have some experience with C++ (at university). I understand the difference between a COM DLL and a DLL produced by a .NET compiler. I don't fully understand the difference between a COM DLL and a Windows DLL generated by the C and C++ compiler. I want to use C++ DLL in a .NET program. I have managed to get this working. My question is specifically: What is the difference between a DLL produced by C++ and a

COM vs non-COM DLL

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-18 15:25:06
问题 The majority of my experience is with high level languages like Java and VB.NET. I do have some experience with C++ (at university). I understand the difference between a COM DLL and a DLL produced by a .NET compiler. I don't fully understand the difference between a COM DLL and a Windows DLL generated by the C and C++ compiler. I want to use C++ DLL in a .NET program. I have managed to get this working. My question is specifically: What is the difference between a DLL produced by C++ and a

Creating directories during a copy using IFileOperation

旧巷老猫 提交于 2019-12-18 13:36:01
问题 Using Stephen Toub's IFileOperation wrapper for C# (link), which has been working well until now. Now I am trying to do a copy to gather files from network locations, each network location into its own subdirectory. \\FOO\data into C:\gather\Foo_data \\BAR\manage\current into C:\gather\bar\manage And so on. The problem is in FileOperation.CopyItem . It must be because the destination directory doesn't exist yet— IFileOperation will create it during the copy, right? I used the technique from

How to enumerate members of COM object in C#?

北慕城南 提交于 2019-12-18 13:34:46
问题 I connect to some program via COM and receive System.__ComObject. I know several methods of it, so I can do like this: object result = obj.GetType().InvokeMember("SomeMethod", BindingFlags.InvokeMethod, null, obj, new object[] { "Some string" }); and like this dynamic dyn = obj; dyn.SomeMethod("Some string"); Both methods works fine. But how can I determine inner type information of com object and enumerate through all its members? I tried this: [ComImport, Guid("00020400-0000-0000-C000