com

Making Property Handler for my application to add custom properties to a file format

i dont know what i am doing wrong, using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Runtime.InteropServices; using System.Runtime.CompilerServices; using System.Runtime.InteropServices.ComTypes; using Microsoft.Win32; namespace TestShell { [ComImport] [InterfaceType(ComInterfac...

PowerShell, Object = Start Process?

Hi I would like to start the Internet Explorer without extensions and control it. (Navigate to other pages, click buttons etc.) When I use the command: "Start iexplore.exe -ArgumentList -extoff" I have the IExplore without extensions, but no object. I need the object to navigate to different pages and click buttons. "$ie = Start iexplor...

How to listen to COM events from Office applications that were started independently?

What I want to do: Write an application that listens to Office events. I want to listen to events from any instance opened on the machine. E.g. if I'm listening to BeforeDocumentSave in Word, then I want my sink for this method to be activated whenever any instance of Word on the host saves a document. Another requirement is that I'm...

COM-Interop: Change .NET Framework Version from 2.0 to 4.0 - Should I change the Guids also?

I like to migrate a COM-Class from 2.0 to 4.0. Would you recommend also to generate new guids for the classes and a different ProgId? The old Class would not be used anymore. I know I have to re-register the Class, for the new Path of the mscorlib. MS-Access create an instance auf my COM-Server Class with CreateObject and my COM-Object...

Why will STA thread "leak small amounts of memory" if it fails to dispatch Windows messages?

After carefully reading this KB article I noticed an interesting statement there. The article says that if I have an STA thread and that thread doesn't dispatch Windows messages then that thread will be unable to receive COM events form a COM server can cause message broadcasters to hang (and thus sometimes cause a deadlock) surprising...

Python Visual Basic's CDate equivalent

I used to have this code in Visual Basic: rpt.ParameterFields.GetItemByName("RowDate").AddCurrentValue CDate("2010-03-19") and I cannot figure out into what I have to convert date to make eatable for COM. Any suggestions? ...

C# collection to Classic ASP [updated]

Hi, I am having trouble exposing a C# collection to Classic ASP. I've tried to use IEnumerable and Array. but I get the "object not a collection" error. my method looks like: public IEnumerable<MyObj> GetMyObj() { ... } and on the Classic ASP side: Dim obj, x Set obj = Server.CreateObject("Namespace.class") For Each x in obj.Get...

Registration Free Com and dll manifests

I'm trying to setup registration free COM, but have a slight problem in that I another COM object may be the client. App.exe----->COM Server/Client dll(registered or not)-------->COM Server DLL (NOT Registered) My questions is, is it possible to create a manifest for the second dll (COM Server/Client dll)? I do not have control of the ...

Classic ASP app has COM 'middle layer' for light business logic. Is this needed in ASP.NET?

I am trying to estimate how long it will take to migrate a Classic ASP application to .NET and came across hundreds of COM functions written in VB 6. A majority of these functions only do parameter validation and actually calls the SQL server. Is this something that should be replace with an ORM? (Linq, nHibernate, Entity Framework)......

Own "in-place activation" OLE Server

Hello, I just want to create my own OLE server, which support in-place activation. e.g. In TOlecontrol we can do following: OleContainer1.CreateObject('WORD.Document',FALSE); That is ok. Word document is embeded into the main application form. But when I tried: OleContainer1.CreateObject('Server.MyOleServer',FALSE); MyOleServer is...

Volume Shadow Copy in C++

Hi, I'm developing an application which will need to copy files that are locked. I intend on using the Volume Shadow Copy service in Windows XP+ but I'm running into a problem with the implementation. I am currently getting E_ACCESSDENIED when attempting calling CreateVssBackupComponents() which I believe is down to not having backup ...

java2com (nevaobject) and registration free com

Hello, is it possible at all to use registration-free COM with java2com? Thank you. ...

Build Servers, build agents, com registration and Windows 7 permissions

I am trying to build a continuous integration server on a Windows 7 machine. I can run the msbuild script cleanly on that machine but when I attempt to run it via a build agent the registration of certain COM (.NET and c++) components fail seemingly to do with write permissions to the registry. I have turned off UAC but it makes no diffe...

Which is the proper way to work with LateBinding in Delphi?

actually i am using late-binding in delphi, and i need to know wich is the proper way to work with it. My principal concern is about how I handle the memory used by these objects, I must free the memory? check this sample code var chEaten: Integer; BindCtx: IBindCtx; Moniker: IMoniker; MyObject:: IDispatch; begin try Ol...

Create a modified own Com Object in the registry

I want to modified the Internet Explorer CLSID element in the registry: (HKEY_CLASSES_ROOT\CLSID{0002DF01-0000-0000-C000-000000000046} ) It is possible to copy this entry and replace the GUID and create a new alias? Where can I defined a new alias? (Later I want to open this Com Object in PowerShell) ...

How to register COM objects when I publish to another machine

I have some COM objects in my C# project. When I publish the project and run the program on another machine, I get this error Class not registered I think the COM objects automatically register on my machine as part of the build process. How can I register my COM objects on another machine? ...

How to connect properly to an Optivote device through a local socket connection?

Optivote IR8 is basically a voting system with a bunch of remote controllers, which can send IR signals to a receiver, which is connected to a computer through a USB port. And I'm trying to write my own little software for that with Flash. Optivote receiver communicates with software through a virtual serial port. When I connect to that...

Winforms stealing keystrokes from COM component?

I have a C++ ATL COM component that displays a popup window (plain ol' Win32, using the WS_POPUP style) which allows the user to input some search information. This component has been tested pretty extensively against a VB6 form (primarily for ease of debugging), but we want to use it with .NET winforms. The curious thing that we found...

Custom or .Net Class as COM parameter or ouput

Hi all, can anyone point me to an example that show how to pass and/or return a class from a .NET class exposed as COM. The COM consumer would be a VBScript. Also, it is possible to pass an object from VBScript to a .NET-COM exposed method? For example [ComVisible(true)] public class A { public SomeClass MethodName(NameValueColle...

Can I run RegAsm without being Administrator?

My coworker is trying to register some COM components (which I wrote) via RegAsm.exe and it says he needs Administrator privileges. His account has admin privileges but he is not logged in as Administrator. Is there a way to use his regular user account and succeed at this task? ...