Archived Months
June 2003
July 2003
August 2003
September 2003
October 2003
November 2003
December 2003
January 2004
February 2004
March 2004
April 2004
May 2004
June 2004
July 2004
August 2004
September 2004
October 2004
November 2004
December 2004
January 2005
February 2005
March 2005
April 2005
May 2005
June 2005
July 2005
August 2005
September 2005
October 2005
November 2005
December 2005
January 2006
February 2006
March 2006
April 2006
May 2006
June 2006
July 2006
August 2006
September 2006
October 2006
November 2006
December 2006
January 2007
February 2007
March 2007
April 2007
May 2007
June 2007
July 2007
August 2007
September 2007
October 2007
November 2007
December 2007
January 2008
February 2008
March 2008
April 2008
May 2008
June 2008


all groups > dotnet interop > december 2005

Filter by week: 1 2 3 4 5

exposing a hWnd in a wrapper class for Windows.Form
Posted by Graham Charles at 12/30/2005 1:09:36 AM
I've got an ActiveX container control that claims to be able to host Windows Forms windows. Here's the extent of the documentation: It is also possible to use windows that are not created using Visual Basic [6]... by creating a wrapper class. This class must be a standard COM cl...more >>

Problem calling unmanaged C dll in vb.net
Posted by JimmyD at 12/29/2005 8:05:48 AM
Hello, I'm having problems calling a function in an unmanaged C dll using VB.net. The program runs, then tries to execute the following function, and just dies, no error message, even when I use a try/catch. I've used the following two methods: <DllImport("myDLL.DLL")> _ Public Shared ...more >>

Using AxSHDocVw.AxWebBrowser control in a form
Posted by Jim Brent at 12/26/2005 8:36:02 AM
I'm trying to use the AxSHDocVw.AxWebBrowser control in a form to provide a convenient way of viewing a variety of file types. My application shows the user a file and the user enters a set of cataloging information about the file. I then want to move the file from its temporary location to ...more >>

URGENT: What is the cmd line equivalent for Register for COM Inter
Posted by Juan Dent at 12/23/2005 12:58:02 PM
Hi, I am urged! I am installing some assemblies into a client's disk and am not getting proper COM-side registration. Specifically there are some classes that have ProgId attributes which by registering the generated tlb are somehow not getting through... The registry contains no ProgId...more >>

COM Interop & GUI Update Problems
Posted by Diego at 12/22/2005 11:41:02 AM
Hi, I'm writing a C# Windows Application (VS2005) with a label on a Windows Form. I'm using COM Interop to wrap a legacy COM Object and I would like to receive a particular event from my object and then update the text in the label. Following the MSDN library explanations the event is captur...more >>

OCX in .net Form
Posted by Mike Talbot at 12/22/2005 11:17:03 AM
Hello I'm trying to add an ocx to a .net windows.form (by adding to the components (COM) and then drag it to the window in VS 2003). After adding the ocx to the window it is impossible to set any properties. I can call the methods offered by the ocx in any code, but properties can not be...more >>

update form from a callback
Posted by bill at 12/22/2005 9:17:46 AM
All, I finally figured out how to call a function in my .NET form by using a callback from the DLL function (which of course executes for several minutes) that I am calling. All I wanted to do is update a progressbar. I discovered that while the callback works just fine, the progressbar is no...more >>

VB.NET 2005 user control hosted in MS Access....
Posted by mattyseltz at 12/22/2005 6:51:03 AM
All-- I have created a VB.NET 2005 COM-visible user control that I have embedded in an MS Access container form as an ActiveX control (it's a long story, LOL). This control is fairly simple, consisting of a label, a datetimepicker, a textbox, and four buttons. I have been able to load the...more >>



Error in VC++ .NET Service
Posted by Ravi at 12/22/2005 12:57:03 AM
I have a VC++ .NET service running in one of our application servers. This service calls a VB .NET executable (This users INTEROP dll's). The service was working fine till yesterday. Suddenly it started throwing errors. The error message is "Object reference not set to an instance of an object...more >>

Problems marshaling fixed length strings
Posted by Ken Allen at 12/21/2005 9:44:23 AM
I am writing some code that is dealing with data structures being returned from the Win32 API and other sources. In this specific case I am having a problem mapping the INQUIRY data that is returned for a SCSI device identification. The SCSI specification indicates that the INQUIRY data can...more >>

Interop with Office2K
Posted by blargold at 12/21/2005 4:13:02 AM
Hi folks. I'm working on a .Net application that interacts with Excel. Since we don't want to force our customers to completely renew their software environment, we want to support Excel 2K and hioher. Since I only have OfficeXP available on my development machine, there appears some probl...more >>

Excel object not getting killed
Posted by Mr.Doubt at 12/21/2005 1:34:15 AM
I've a widows application, that makes use of an EXCEL COM object, to run a few macros available in a EXCEL file. The object is created when the app is started and is closed when the app is closed. The app also has a OLEDB connection to the same file to fetch data from the file and display it on ...more >>

Remote object call from COM component
Posted by Dave at 12/20/2005 5:09:50 PM
I have an existing COM component written in C++ that does some Windows account management stuff. We're moving to Active Directory and rather than change the whole application, the only changes required are to the COM component. I want to move the functionality of the COM component to a remoted C...more >>

Setparent .Net Control into VB6
Posted by RoryBecker NO[at]SPAM gmail.com at 12/20/2005 1:17:20 AM
Summary: Well my question is ... Although this does appear to work, Is there something else that I'm missing that I should be taking into account? Longer version: The Problem: .Net does not support exposing .Net UserControls Fully to COM. therefore they cannot be placed directly o...more >>

C# problem with SccPopulateList
Posted by Nils F at 12/20/2005 1:11:02 AM
Background: ----------- I'm writing a C# program (.Net 2.0) that utilizes the SCC interface (=Source Code Control, i.e. support for Visual Source Safe, but also Subversion, cvs, etc). I'm have a problem getting the SccPopulateList function to work, SccPopulateList is described in the follow...more >>

converting a struct to an intptr
Posted by CzeshireCat at 12/19/2005 4:33:22 PM
How do I convert a variable of the following type to an IntPtr please? I need to pass it to the pbRecvBuffer parameter. public struct SCARD_IO_REQUEST { public int dwProtocol; public int cbPciLength; } int SCardTransmit(int hCard, ref SCARD_IO_REQUEST pioSendPci, byte[] pbSendBuffer, ...more >>

Managed COM interface: how to raise event?
Posted by Armin Zingler at 12/19/2005 3:50:52 PM
Hi, I know how to have a COM class written in VB.Net raise an event. What if it's not a class but an interface? I can not attach the ComSourceInterface attribute (I dropped all GUID and attribute stuff here for simplification): Imports System.Runtime.InteropServices Public Class Connect...more >>

ComVisible true
Posted by Steve at 12/19/2005 2:38:04 PM
Hi, We have a COM library with a .NET extensibility model which is achieved using managed C++ (2.0) to aggregate managed classes. All is fine unless a managed class exposes a custom managed interface in which case casting to the interface from fails. The problem is solved by adding the Co...more >>

disposing media player activex in winform
Posted by DKT at 12/19/2005 1:43:25 PM
Hi, I have a form which is being open by various other forms as dialog. the form contains a media player activex control that plays a video/audio and mey be closed by the user at anytime. When the user choose to close the dialog this is what we do: this.axWindowsMediaPlayer1.close(); this.C...more >>

EnumDomains in Another Process
Posted by markarichman NO[at]SPAM gmail.com at 12/19/2005 12:06:42 PM
How do I enumerate the running AppDomains in another process, given the PID of that process? ...more >>

Explicit implementation of _Object.QueryInterface
Posted by Yuri O at 12/16/2005 4:01:18 PM
Hi I want to implement my own version of default interface ( _Object ) in my custom managed class as i need to have my version of IUnknown methods. In fact i need to override default QueryInterface in my C# class. Is it possible? Could somebody advise please? Thanks Yuri ...more >>

setting envrionment variable in C# and access it within native C++
Posted by JC at 12/16/2005 9:48:02 AM
We are having difficulties getting environment variable within native DLL written in C++ which is loaded by C# .NET assembly, the env var is set by the ..NET assembly. We have an existing C++ application, and want to access it within C#. So we wrote Managed C++ wrapper which access the nat...more >>

Querying for Windows directory
Posted by CzeshireCat at 12/15/2005 5:30:11 PM
I know this should be easy, but how do I query for the Windows directory itself please (eg c:\windows). I've googled with no luck Environment.SpecialFolders doesn't help thanks ...more >>

marshal array of structs from Win32 C++ code to C#
Posted by Dan Schullman at 12/15/2005 5:10:03 PM
I'm trying to marshal, via P/Invoke within a single process, an array of structures from a Win32 (not COM) C++ DLL to C#. I know very little about COM and have only dabbled a bit in P/Invoke usage from .NET. Based on some reading I've been doing, it seems like having the Win32 C++ method outpu...more >>

how to force .NET Interop COM objects to use 1.1 .NET framework
Posted by Eric at 12/15/2005 3:45:42 PM
Got the following problem and need help. I have a web site that uses ASP pages that use COM objects that are written in .NET 1.1 and are exposed via Interop. Everything works fine on the machine that has version 1.1 of the ..NET framework installed. As soon as I install version 2.0 of the .NET...more >>

msado21 and SQL Server 2005.
Posted by Gemma Makepiece at 12/15/2005 12:22:02 PM
Hi, I am talking to a local SQL Server 2005 database via msado21.dll under Windows Server 2003. If I use COM, all appears fine. If I use .NET, via an interop library created using : "tlbimp msado21.tlb /primary /keycontainer:keyname /out:Interop.adodb21.dll /namespace:spacename /sysarr...more >>

COM interop problem coverting to VS2005
Posted by TabletPCDeveloper at 12/15/2005 10:50:02 AM
The following compiled without warnings and worked under VS2003; following that is the story of our unsuccessful efforts to accomplish the same under VS2005. We implement the IID_ISyncMgrSynchronize interface in a handler that is called by the Windows Synchronization Manager (also known as ...more >>

COM API access from C#
Posted by Martijn at 12/15/2005 7:57:52 AM
Hello group, id be really grateful if you could point me in some direction cause im completely lost here. im relatively new to c# (that probably explains my mixing up some terminology as from here on), but im accessing a c++ legacy dll by referencing it as a COM object in visual studio .net 2...more >>

WebBroser Control from STA
Posted by karthick.ramachandran NO[at]SPAM gmail.com at 12/15/2005 3:41:01 AM
Hi, I have an application, for which i dont have the source code. I can attach a managed code dll to that application and by reflection magic that application calls the specified method in attached dll. Now here comes the problem. My dll has a windows form object, which has a webbrowser con...more >>

Problem with event handling
Posted by MLM450 NO[at]SPAM hotmail.com at 12/14/2005 1:27:50 PM
I am using a C# control in an unmanaged C++ app. The control has events that I need to handle. The first time I present the dialog containing the control, everything works fine - including the event handlers. The second time I try to display the window, it crashes before the dialog displays. It ...more >>

Can't properly handle NM_CUSTOMDRAW in listview
Posted by johnny p at 12/14/2005 1:05:27 PM
From my understanding, the C# listview class is a wrapper around the win32 listview and all win32 functionality is available through the wndproc method. I want to modify the C# listview class (change a row's default height and text color) and the easiest way do this is through custom drawing ...more >>

How to marshal .NET arraylist to COM
Posted by Peter Hase at 12/13/2005 3:39:41 PM
Hallo NG, I want to send a collection type like .NET arraylist to a com server, where it will be converted into a stl::vector (in-process). I have no idea how to do this. Hints and links are welcome! Thanks in advance Peter ...more >>

COM problem
Posted by zq at 12/13/2005 2:38:31 PM
Hi! I have a COM object which occupies more and more memory everytime it's used. The "VM size" counter (the private bytes) of the process that uses the COM object keeps on growing when instantiating and using the object frequently. I tried following strategies for using the object: 1. in...more >>

COM+/InvokeMember problem
Posted by saliej NO[at]SPAM gmail.com at 12/13/2005 7:47:58 AM
Hi I've got a COM+ component running on my local machine. I can call a method on it without any problems using interfaces or by using GetTypeFromProgID without specifying the server name. However, as soon as I include the server details InvokeMember fails with: "Method 'System.__ComObject.T...more >>

.net assembly in eVB
Posted by Samuel at 12/12/2005 12:17:02 AM
Hi, Is it possible to call .net dll from eVB(embedded VB) How do I achieve it? Thanks Sam...more >>

MC++ Interop Question
Posted by Shawn B. at 12/11/2005 1:41:58 AM
Greetings, I've been posting in MC++ and not getting answers. Perhaps that wasn't the correct newsgroup. I am trying to get the title of the console window. I have working C# code, but I need the equivelant in MC++. The below code does not work. String *Console::get_Caption() { ...more >>

IHTMLCaret.InsertText
Posted by Peter Wone at 12/10/2005 12:00:00 AM
The Microsoft.mshtml PIA declares IHTML.InsertText like this void InsertText(ref ushort pText, int lLen); mshtml.c declares it like this virtual HRESULT STDMETHODCALLTYPE InsertText( /* [in] */ OLECHAR *pText, /* [in] */ LONG lLen) = 0; Presumabl...more >>

How to get string returned from char* parameter
Posted by William Meyer at 12/9/2005 7:00:59 PM
I'm interfacing a DLL that accesses a hardware device, and one of the functions is to return the serial number of the device, where the C prototype is: void GetSerialNumber( char* sn ); My references mainly show techniques for delivering strings into functions where a char* is expected, but...more >>

HookAlert for Specify Process
Posted by Vitoto at 12/9/2005 12:47:02 PM
Hi, i try get some expert can help me, search in all forums and not get some expert know for help me. Thank you. Dll or Class code for use in VB.Net 2 Events Required : "HookDetected" and "ExeLaunched" 1 Method Required : StartAntiHook(PID) PID = Pid the process to Protect or ...more >>

Can't create instance of newer version of COM Interop object
Posted by Craig at 12/8/2005 4:58:15 PM
I have a C#-based object that is exposed as a COM object. After creating a newer version of the object and registering it via regasm regasm xyz.dll /tlb: xyz.tlb /codebase I cannot instantiate it from my C++ application (VS 6.0) even though the OLEView utility successfully creates an instan...more >>

Win2k3 sp1 breaks FtpPutFile
Posted by chuck rudolph at 12/7/2005 4:38:02 PM
I have a ftp interop that uses FtpPutFile from the wininet.dll. It works peachy on xp and 2k3 server without SP1. Once SP1 gets installed the "put" returns an error of winerror of #19 which is ERROR_WRITE_PROTECT. As a guess, I added the ftp location to the trusted locations in IE; but this wa...more >>

COMException (0x800A1066): Command failed
Posted by Marvin Massih at 12/7/2005 4:05:32 PM
Hi, I have written a .NET 1.1 program to automate Word using COM interop and late binding. On my development system (Word 2003) everything runs smoothly. However, on a different computer (Word 2000) the following code throws a COMException: ------ SNIP ------ string htmlFile = /* pa...more >>

.NET 2.0 - mscoree.dll ignores RuntimeVersion
Posted by Jason Newell at 12/7/2005 2:17:55 PM
I have a .NET Assembly that is configured as an Addin for a 3rd party application via regasm.exe. My addin has worked in .NET 1.1 for over a year now. I loaded .NET 2.0 Framework and pieces of my addin now fail. Using RuntimeEnvironment.GetSystemVersion(), I discovered that my addin is a...more >>

Passing objects from COM to .NET in Script Control fails.
Posted by Gemma M at 12/7/2005 12:36:47 PM
Hi, I have a COM object running under IIS, and I get the following sequence of events. (1) Web page runs creating COM object number 1 (2) COM number 1 runs a script in ScriptControl (3) Script creates COM object number 2 (4) COM number 2 creates an interop .NET object and assigns an ADO...more >>

Marshalling sCardListReaders WinSCard function
Posted by CzeshireCat at 12/7/2005 10:35:51 AM
I've done research on this, but I don't seem to be getting very far. The C++ function definition is as follows: LONG SCardListReaders( IN SCARDCONTEXT hContext, IN LPCTSTR mszGroups, OUT LPTSTR mszReaders, IN OUT LPDWORD pcchReaders ); mszReaders returns a multistring in the form "reade...more >>

Getting byte array from C# com object using C++
Posted by gil_teitelbaum NO[at]SPAM yahoo.com at 12/6/2005 9:05:47 AM
Hi, I have a C++ COM client that is accessing a C# com object. I have tried various ways to get a byte array from the com object unsuccessfully. I have tried: 1. returning an object type in C#. C++ will deal with it as a varient. When I try to access the data - parray indicates an array...more >>

Could not load File or Assembly "Microsoft.office.Interop.Excel"
Posted by Binh Phung at 12/6/2005 8:45:04 AM
I am getting this error when my vb.net 2005 app trys to create an Excel file. I have the Com object reference in my program. The program uses the COM object to create the Excel File so i can use the oledb to populate the file. The program runs fine on my dev machine and server type machine but...more >>

Can't register an assembly for COM interop
Posted by Joseph Rea, Accord Software at 12/5/2005 12:19:02 PM
I have created a C# class library project in VS.NET 2003 that handles encryption. I have various methods that make calls to different algorithms in the System.Security.Cryptography namespace. I'm then 'registering my project for COM interop' so that I can call in from another application via C...more >>

AXIMP: reference rcw generates error
Posted by KidO at 12/5/2005 9:51:03 AM
I have an existing ActiveX control that I am trying to incorporate into a project. The OCX references a COM dll, which I have already imported using TLBIMP for another purpose. I would like to use AXIMP to create the wrapper for the OCX referencing the existing wrapper for the already im...more >>

IPicture.SaveAsFile memory leak
Posted by ferg at 12/5/2005 7:35:49 AM
I have come across, what appears to be an interesting problem. The background to the problem is that I have a third party application, which provides me with an image by means of a COM Picture object. Note the image is a metafile and not a bitmap. For various reasons I wish to enumerate the me...more >>


DevelopmentNow Blog