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 > march 2008

Filter by week: 1 2 3 4 5

.Net Assembly from Classic ASP and VB6
Posted by JohnW at 3/31/2008 9:50:58 PM
Hi All. I've been asked to write a .Net assembly that will be accessed from a couple of VB6 applications and some .ASP pages. I have a few general type questions if someone could help. I haven't been programming for long but this looks like a great chance to earn some dollars and gain a lo...more >>


Problem with the com interoperability
Posted by Sanjin at 3/31/2008 12:08:57 PM
I have posted the following question in microsoft.public.dotnet.framework newsgroup, but without the answer, so I am reposting here: I have the assembly (C#, net 2.0, XP SP2) that is used from the windows forms application. Assembly is called from the managed code (also from unmanaged). When...more >>

NHibernate Interop
Posted by msabaterlozano@gmail.com at 3/30/2008 1:08:21 PM
HI all, My company is migrating from vb6 to .NET. One of the task involved with migration is to use an O/R mapping technology such as NHibernate or .NET Entity Framework We need to interop NHibernate untill we are 100% .NET (think of 2 years or so). When we tried to interop NHibernate we d...more >>

Sending WM_LBUTTONDBLCLK to a ListView control
Posted by ME at 3/30/2008 11:41:56 AM
I have am trying to automate a .NET application (app A) from another .NET application (app B). App A has a Listview control that I would like to send a WM_LBUTTONDBLCLK message to. Unfortunately all my attempts at this from App B have been ignored in App A. Does anyone know how to successf...more >>

Passing a RCW to another RCW method
Posted by Nishith Prabhakar at 3/29/2008 7:42:06 AM
Hi, I am facing some memory leak problems with COM interop cleanup. Will the following code cause any memory leaks because of the wrapper.methodCall method (part of the exposed COM interface). 1) Is the refcount incremented when the methodCall is made? 2) If yes, where is the refcount - in ...more >>

C# and SendMessageCallback
Posted by ME at 3/28/2008 9:32:57 PM
What is the proper way to use the User32 function SendMessageCallback with in C# so that it will call back a C# delegate? Seems all I can find is people talking about how SendMessageCallback returns immediately but will callback a delegate. I can't seem to find any examples though of how thi...more >>

How to programmatically bring a Word window to front?
Posted by Andrew at 3/28/2008 7:39:01 AM
Hello, friends, In c#.net 2005, we have the following source, hoping to bring a Word window to front. However, it does not work. Any ideas? How to bring a Word window to front? Thanks a lot. ------------------- source code foreach (Microsoft.Office.Interop.Word.Document doc in this...more >>

Deployment question
Posted by paolo at 3/27/2008 11:37:42 AM
Hello everyone, I have a VB6 app that uses a strongly named assembly written in C#2.0. On my development machine (VB6) i did regasm with /tlb option then added reference in VB6 project in order to "see" the functions defined there, everything ok. Now the question... Is the TLB file need...more >>



.NET Registry.GetValue method returns null when called from ServicedComponent as COM+ app
Posted by Arturo Martinez at 3/27/2008 12:16:45 AM
Does any one knows why everytime I call the .NET Registry.GetValue = method=20 from a servicedcomponent always returns null? even if the value exists in the Registry. Is there a setting I need to change in the COM Application to be able to = read the Registry? Thanks...more >>

How to create line or rectangle in microsoft word
Posted by sean_n at 3/21/2008 5:27:21 AM
Can someone provide code snippets on how to create a Line or Rectangle in Microsoft Word?...more >>

Implementing Standart Com interface
Posted by pokemon at 3/20/2008 7:04:02 AM
Hi, I've looked all around but couldn't find any practical information on about how to implement a standart COM interface from managed code (I want to implement IFilterMessage Interface in my C# code)... What are the steps to follow ?...more >>

Register an assmbly in the user part of registry
Posted by PLS at 3/19/2008 7:56:06 PM
regasm work fine to register an assembly for COM if you have write permission to HKLM. This usually requires Administrator privileges. I would like to deploy a couple of assemblies to users that do not have Administrator privileges. I would like them to be registered under HKCU/Software/Cla...more >>

highlight a particular part of html file dynamically while loading thru a web browser control in VS C# 2008
Posted by b at 3/19/2008 5:22:13 AM
hi all, Plz help me out... i am displaying the contents of a html file using webbrowser control in Dot Net 2008 using c#. My html files have certain areas whch r marked by comments.. like <!--start command--> and <!--end command--> Whn the web browser loads these html files i want th...more >>

Help on Com DLL
Posted by Q. John Chen at 3/18/2008 8:41:33 AM
I am trying to make a .NET class (.NET 2.0/C#) to be used in VB6. I created Class Library Project with the following Class(below). After build, I am able to reference the Class. See the TestClass in Object Browser. But I can see the DoTest() method. I wasted hours and still can't figure it ou...more >>

RegFree COM for ".Net COM object" (COM callable wrapper)
Posted by Kasper G. Christensen at 3/17/2008 10:15:24 AM
Hi I'm trying to make a stepwise partial transition to .Net, by implementing new functionality in a .Net class library, and making a COM interface for this library (COM callable wrapper) so that my old legacy application can call the new functionality (implemented in .Net) by using COM. ...more >>

Overloading in ActiveX
Posted by Maris Janis Vasilevskis at 3/14/2008 9:23:13 AM
Hi, I create ActiveX dll in C# (VS 2005) as following: [ClassInterface(ClassInterfaceType.AutoDual)] public class MyClass { public void MyMethod(string arg1) {...} public void MyMethod(string arg1, string arg2) {...} } I regasm it and try to call in IE7 JScript: function Test()...more >>

C#: how to define C++ struct containing array
Posted by Polaris at 3/13/2008 8:18:02 PM
Hello InterOp Experts: In my C# program I need to use a Win32 DLL which leads to a question: how to define Win32/C++ struct containing an array in C#. For example, I have a C++ struct: struct MY_STRUCT { int nCities[128]; }; How to define it in C#? Thanks in advance! Polaris...more >>

Implementing Unmanaged Interface in C#
Posted by Saad at 3/12/2008 11:38:25 PM
Hi, I have an unmanged interface which i have exposed through COM to C#. I have been able to implement the interface in one of the C# classes (say Class1) as well. But now what i want to do is that i need to pass the reference of the object of Class1 to this COM wrapper...and then from insi...more >>

Passing a simple structure from VB6 to VB.Net
Posted by Bully at 3/11/2008 9:09:27 PM
Hi I have created a simple COM Class in VB.Net containing a simple structure and function: Public Structure MyStruct Dim Param1 As Byte End Structure Public Function ShowStruct(ByRef MyPassedStruct As MyStruct) ' Do nothing End Function In VB6, I want to call the...more >>

New/Delete
Posted by JB at 3/11/2008 9:59:09 AM
This is a vb.net, COM control interop question. I am creating a COM control using the New operator m_ctrl = New MyComCtrl ( use the automation interface for awhile, handle events, etc) The question is how to delete the control now that I am finished with it. Is there some ...more >>

Unmanaged C Structure-embedded arrays, structure pointers
Posted by ToyTrains at 3/10/2008 6:20:00 AM
I am trying to write a wrapper around a C DLL that makes use of a very large complex C data structure for all data exchange between the caller and DLL. The data structure is allocated/deallocated during various calls to functions in the C DLL. The data structure contains pointers to other stru...more >>

Migrating one VB6 COM+ component to .NET
Posted by kkarre at 3/10/2008 4:56:05 AM
Hi, We must do a step-by-step migration of our COM+ applications. I have 1 One migrated component, now .NET with strong name - 1_NET.dll 2 Two COM components (referenced by 1_NET.dll, where the Interop assemblies also got strong names - Interop.2a.dll / Interop2b.dll) 3 1_NET.dll is install...more >>

How to capture "printfs" from unmanaged C++
Posted by barker7@yahoo.com at 3/7/2008 9:43:54 AM
In my managed C# app we capture trace statements and direct them to a log file using trace listeners. Part of the ap puses unmanaged C++ dlls, and unfortunately, the C++ printfs don't get picked up and are simply printed to the console window. Is there any way I can capture the output of the p...more >>

Invoke Activex OCX methods and Events from a window library
Posted by Suresh Gladstone at 3/7/2008 4:45:02 AM
Hi, I have an activex OCX written in VC++ exposing a set of methods and events with parameters. I've tried to load this in a C# windows form and it works good. Iam able to call the methods and capture the events. My real requirement is, I need to invoke this ocx methods and events from a c...more >>

.NET in VBA
Posted by NooS at 3/7/2008 2:51:00 AM
I working with vb.net 2005. I created a Class Library project and add a COM Class to the project. I set COM interoperability, and COM visibility of the project. Also I set a strong name of assembly. I compile all in a dll file. Now, if I refer it in Excel 2003 VBA macro I view method and prop...more >>

How to get the HRESULT in a DCOM call
Posted by Mahesh at 3/6/2008 1:46:54 PM
Hello, I am trying to access a out of proc DCOM server from a C# client. I need help on the following: 1) How to get the out value from the out-of proc server? 2) How to get the HRESULT value returned by any interface call? Below is a detail description about the problem: I need to ...more >>

CreateProcessWithLogonW
Posted by amdrit at 3/4/2008 1:10:05 PM
Hello Everyone, I have a C# component that is referenced by a VB6 standard executable. The C# component has a method LaunchProcess that subsequently makes an API call to CreateProcessWithLogonW in the advapi32 library. This is used to shell open an external application such as Excel or Wo...more >>

.net assemblies exposing COM interfaces, linking to C++
Posted by Mark at 3/4/2008 8:00:02 AM
Hi... We've got some objects written in C# that expose COM interfaces that we're now trying to move to/use in an x64 environment. The .Net assemblies are compiled Any CPU, which as I understand it means they will run under the best/most compatible framework it can find on the system. If y...more >>

C# callbacks getting lost in C++
Posted by Jig at 3/4/2008 7:24:43 AM
Story: I have 2 projects. Project A is a C# project which creates a managed executable. Project B is a C++ which creates an unmanaged dynamic link library. Project A is the wrapper/user interface around the legacy code in project B. Project B contains an application that needs to communicate ...more >>

How to handle document events for the WebBrowser control
Posted by GoldTree@nospam.nospam at 3/3/2008 4:43:51 PM
Hi, I have a BHO (Browser Helpers Object) application that is intended to catch the ContextMenu events. I followed the article: "How to handle document events in a Visual C# .NET application" http://support.microsoft.com/kb/312777 The code below will get event fired. But what happens is...more >>

To Reference Interop.XXX.dll or XXX.dll
Posted by JD at 3/3/2008 9:50:01 AM
I am trying to find something definitive on whether, for a COM DLL (we'll call it XXX.dll) that I want to use in C#, I should reference the COM DLL and let the IDE create the Interop.XXX.dll file, or create it the Interop.XXX.dll myself and reference ONLY the Interop.XXX.dll in the project and...more >>

Marshaler bug with VBScript arrays
Posted by Bill Menees at 3/3/2008 8:47:01 AM
Overview ----------- I have a legacy application that hosts the VBScript engine. It allows users to write customization VBScripts that call into the host via a COM interface. I'd really like to replace the C++ COM host object with a C# implementation, but I can't seem to work around the bu...more >>

Interop and source control.
Posted by Oolis Kraprin at 3/3/2008 5:55:42 AM
Ok, I have written my COM dll and added the binary to my c# project and added it as a reference. And checked it into our Team Foundation Server. This breaks the build for the other developers until they 1. Regsvr32 my COM dll as an administrator and 2. Remove and add again the dll as a refere...more >>

Problem using .Net 2.0 assembly with com client
Posted by Elizabeth Connolly at 3/1/2008 1:15:50 PM
I posted this originally at the bottom of a thread that is probably inactive, so I am now posting it in its own thread. I have a .Net (2.0) assembly that I want to call using a Com client (a VB6 program) on another machine. I don't need it to be strong-named or in the GAC - the assembly will be...more >>


DevelopmentNow Blog