My original query was here, to give you an idea of how I did the implementation.
http://stackoverflow.com/questions/3043841/replacing-a-c-activex-component-with-a-net-implementation
The C++ ActiveX control I am replacing uses COM events. When one of the VB6 client applications (VB6 I believe, as depends.exe tells me it uses msvbvm60.dl...
I have a little c# class that I need to expose as COM. THe tool that will use the COM object requires that I support STA. Is there anything special that I need to do with my COM object?
(I know about the STAThread attribute, but (unless I'm wrong) It is for indicating that a thread of execution in .net is to be STA compatible, and no...
Hi All,
I have written a browser helper object to get the text between the tags and use it for data mining purpose. I tried using it on igoogle (basically to test its capability on gadgets) and it failed in some of the cases where an <iframe> is present with some external source.
I can get the <div> and its child <iframe> but fail to ...
Hello,
I am experiencing a problem when I want to use a DLL made with VS.Net in VB.NET. I have a COM Class that create a DLL and a TLB file. I can reference the TLB in VBA and use the DLL in VBA on my computer, where I develop. The problem is that it is not working on other computer..?
I tried to register the DLL with regasm.exe (althoug...
Can you use COM/OLE in a C# program to connect to a running instances of internet explorer?
Ideally I'd like to find the URLs of all webpages open in IE.
...
I know I can create a _bstr_t with a float by doing:
mValue = _bstr_t(flt);
And I can format the float string by first declaring a c string:
char* str = new char[30];
sprintf(str, "%.7g", flt);
mValue = _bstr_t(str);
I am a bit rusty on c++, especially when it comes to _bstr_t which is A C++ class wrapper for the Visual Basic str...
I've inherited maintenance for a program which currently queries an ADODB database from within its CView::OnBeginPrinting override. However, when the ADODB database handle is a proxy for an out-of-process database connection, this crashes frequently - apparently, while waiting for an RPC response, a paint message causes it to reenter CVi...
I have created a member variable in class as
CComPtr<IXMLDOMDocument2> m_spXMLDoc;
XML document is created as
CoCreateInstance(CLSID_DOMDocument, NULL, CLSCTX_INPROC_SERVER, IID_IXMLDOMDocument2, (void**)&m_spXMLDoc));
Now when application exits ,exception is occurring.Callstack is pointing to p->Release()
~CComPtrBase() throw()
...
After reading this paragraph in GPL FAQ I feel confused. That paragraph says that a proprietary program can use a GPL-licensed program via aggregation - as a separate program.
Now consider an out-proc COM server. It is a separate program that is used by another program via a well-known interface. Looks pretty much like aggregation.
Can...
Hi, I'm working on a project involving the Microsoft Unified Communications Client API; uccapi.dll. I'm also using Codegear C++Builder 2010, not Visual Studio. After registering the dll with regsvr32 and importing it as type library into C++Builder 2010, uccapi_tlb- and uccapi_ocx-files were generated. When having imported these into my ...
Hello,
Does anyone know of any recent examples of how to create a simple COM component in C++ using Visual Studio 2008 so I can learn how to marshal different kinds of data between unmanaged and managed code, and back again. I've found a few tutorials that suggest a C++ ATL project, but project settings page no longer has the settings m...
Hi,
We have a project that references COM+ components (written in VB6). The components are added to our .Net solution by 'Add reference'.
This works well and even intellisense works.
Now and then the interfaces (compatability) of the components are broken and our .Net code doesn't work anymore. The component was added with a specific ...
I am trying to deploy a .NET COM interop dll for a web application. During development, for the assembly that needs to register for COM interop, I have the "Register for COM interop" option checked under build properties. In this method, everything works just fine.
However, when I deploy the ASP.NET application and try to register the a...
I found some documentation about interop with OpenOffice using technologies like COM, but before delving in more deeply I wondered if anyone's worked on this kind of thing?
We have a need for the following, all wrapped up in a method call from a client PC (client talks to server using COM):
Client sends a map of name/value pairs to a ...
Hi,
I am using PHP to start Word Automation and manipulate word documents, but i guess it can be done in all any other language. What i need to do is quite simple, i need to remove the first page and add header and footer.
Here is my code:
$word = new COM('word.applicantion');
$word->Documents->Open('xxx.docx');
$word->Documents[1]...
I have always marked my .NET assemblies as visible to COM with [assembly: ComVisible(true)], thinking that I never know when someone might need to call them from COM. I also started using FxCop and started seeing this warning from code analysis:
CA1017 : Microsoft.Design : Because 'MyLibrary.dll' exposes externally visible types, ma...
I have a C# class that I've made ComVisible so that it can be used in an unmanaged C++ DLL. The C# class is defined like this:
public interface IFSFunction
{
double GetProcessTime();
}
public class Functions : IFSFunction
{
// Initialization here
// Interface function
public double GetProcessTime()
{
// Do ...
Hi,
I have created a addin for excel, where there is a ribbon and a button on it. I have handled the event of button click with the following code
Private Sub test_button_Click(ByVal sender As System.Object, ByVal e As Microsoft.Office.Tools.Ribbon.RibbonControlEventArgs) Handles test_button.Click
Dim activeWorksheet As Excel.Work...
I am looking for something to test my app. The app is a weight logger, built in .net 3.5 - it is connected by rs232 to an electronic weight, but the problem is that I don't have it at home.
I wanted to emulate the traffic and data with my app, but I have a problem: I can't get 2 apps on 1 port.
Please help.
...
I will be creating a series of projects set up to build COM objects. I attempting to create a property sheet (.vsprops file) which will set up the builds for each project. One of the things I am doing with the properties file is customizing the location and names of the files created by the MIDL compiler. Here's the code I use for thi...