Psst! Did you know DevelopmentNow is a mobile web site design agency?

Contact us for help mobilizing your site, or to sign up for our beta Mobile Web SDK!


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
February 2010
all groups > dotnet interop > october 2007

Filter by week: 1 2 3 4 5

trouble getting ref object parameters while calling COM object with C#
Posted by rocketfire97 NO[at]SPAM gmail.com at 10/29/2007 1:36:53 AM
I'm trying to call a COM object using C# but having no luck getting values back for passed in ref objects. I've tried the same call using VB.NET and can get data back. How would I implement the following in C# This is the method I am calling, which populates ref paramters with results. S...more >>


Calling a C++/CLI dll function from an MFC dll/exe
Posted by Mdosi at 10/28/2007 8:51:00 PM
Hi, I have a C++/CLI dll that have some methods that I need to use (or call) from my legacy C++ application/dll created using Visual Studio 6.0. Will really appreciate some suggestions on what are some of the ways to do the above so that I can call the functions I wrote in C++/CLI (Visual...more >>

marshalling struct param problem while calling native function
Posted by pkpk at 10/26/2007 2:18:01 PM
Hello, I have C# code that calls a native function that takes a struct as a parameter. It works fine. Equivalent VB.NET code passes the structure by pointer (instead of copying it directly onto the stack) and that causes my native code to behave incorrectly. This is the declaration o...more >>

IStream problem
Posted by Andrew Brook at 10/26/2007 12:45:13 PM
Hi everyone, I'm attempting to rewrite an ATL component in .NET. The only part of the functionality i'm having problems with is a particular method that needs to write to a passed IStream. My calling application is written in using MFC. I've attempted in my new c#.net component to accept...more >>

a .net framework bug
Posted by Shwu at 10/25/2007 3:12:12 PM
I don't know where to report a bug to MS. Here is the bug description: I have an activeX created by ATL/C++, which shows a tree view with multiple state checkboxes and icons. It works fine to embed the activeX to the main form of a C# form application. If I create another subform to host the...more >>

Outlook-add-in: How do I catch when a new appointment has been saved?
Posted by M O J O at 10/25/2007 1:16:31 PM
Hi, From an vb.net-outlook-add-in ... how do I catch an event telling when an appointment has been saved? Thanks!! M O J O...more >>

Any way to create a socket instance for an existing connection?
Posted by 333 at 10/24/2007 4:53:00 PM
I'm kinda new at .NET programming so please excuse my ignorance... I'm trying to use C# to download info from a data service which only has a C API. Using P/Invoke I've gotten as far as establishing the connection and sending requests. However, I would like to, as much as possible, use the ...more >>

Repost: Example of using MarkAsTask?
Posted by M O J O at 10/24/2007 12:00:00 AM
Hi, (I'm using vb.net 2005) I'm trying to send an email and mark the "follow up". Here's my code... Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim oApp As New Microsoft.Office.Interop.Outlook.Application ...more >>



Repost: Outlook 2007: How do I find GlobalObjectID?
Posted by M O J O at 10/24/2007 12:00:00 AM
Hi, I'm using vb.net 2005 and I'm trying to send an email, get the GlobalObjectID, find the sent email by the GlobalObjectID .... but I don't know how. I know that the GlobalObjectID is not an exposed property (yet) and I have no clue on how to use it then. Do you have an example??? ....more >>

windows shell extension
Posted by khelifaoui at 10/24/2007 12:00:00 AM
Hi everyone, I've created a shell extension (like gmaildrive) that I want to do the Drag-n- Drope operation if someone can help me? ...more >>

Insert another Item in the Context Menu of Outlook 2007
Posted by Ahmad Jalil Qarshi at 10/23/2007 4:50:37 PM
Hi, I have to develop an Addin which will insert a new menu item in the context menu (Copy, Cut,....) of Outlook 2007, when right clicked on the Body of the received message. I am new to the Outlook 2007 automation. I want to use C# or VC++ 2005 for development of this Addin. Kindly ...more >>

GetActiveObject on a Vista machine
Posted by Cindy M. at 10/22/2007 3:54:50 PM
Hi all Up until now, I've been able to use something like this to pick up a running instance of an office application xl = (Excel.Application) System.Runtime.InteropServices.Marshal.GetActiveObject ("Excel.Application.12"); if (xl != null) { } /etc. ...more >>

Get Pointer (reference) to a structure
Posted by tomi at 10/21/2007 9:05:32 AM
Help please Ho can I write following (from C#) thing in VB.NET ? new IntPtr(&mode) mode is a instance of some structure. I cannot find any solution. I need to pass the pointer to a structure to COM+ object Thanks Tomas ...more >>

COM Variant SafeArray
Posted by jlnm at 10/19/2007 6:59:50 AM
I have to emulate a C++ Com Component in C# . One of the methods I am to provide int the C# COM is (the C++ signature): STDMETHOD(SetAttributeArray)(/*[out]*/ long* retVal, /*[in]*/ VARIANT AttributeArray); My Plan is this: [Guid("03AD5D2D-2AFD-439f-8713-A4EC07054432")] interfa...more >>

Trouble passing a native function pointer to managed code
Posted by Skwerl at 10/18/2007 12:58:00 PM
I am writing a native C++ plug-in for a program that will act as an interface for managed code. My managed code needs to be able to call methods in an active instance of the native plug-in running in its host program. Is the following the best way (or even possible) to accomplish this? 1...more >>

AccessViolationException with simple test P/Invoke
Posted by Mesan at 10/17/2007 4:27:24 PM
I'm trying to acces some C logic through .Net and am consistently getting an AccessViolationException. I watered down everything to the most basic level I could and I'm still getting it. Here's the C code: void __declspec(dllexport) getText(int num, char* date_text) { sprintf(date_text, "N...more >>

PrintPreview with MS Word XP (2002) and DSOFramer problem
Posted by Christoph Riesenberger at 10/16/2007 1:32:24 AM
Hello, we have a WinForm Application in which we are embedding Word via DOSFramer. Some installations ran into an error when closing the printpreview: word crashed. For Word 2003, i found the solution from Brian at http://groups.google.at/group/microsoft.public.dotnet.framework.interop/msg...more >>

EnableVisualStyles causes CComboBoxEx to stop showing images
Posted by Mike at 10/15/2007 12:02:22 PM
I have a C# DLL that calls a function in a C++ DLL. The C++ function displays a window that has a combo box (CComboBoxEx) control. If I enable visual styles in my C# DLL, images do not appear in the combo box. How can this be fixed? Thanks, Mike ...more >>

Using standard Windows Forms controls as ActiveX controls
Posted by larsgregersen at 10/15/2007 3:47:07 AM
Hi I have created a couple of Windows Forms controls in C# either by composition or by subclassing existing controls. I'm able to use these controls as ActiveX controls by using "register for COM Interop". I then access the control in a old application written in C++ (using VS 205). This ...more >>

Converting Word Document to PDF file.
Posted by Akshit Shah at 10/15/2007 12:00:00 AM
Hi friz, I want to convert word document (with all formatings & images) to a PDF file. How i can achive this. Please Help....more >>

ComInterfaceType.InterfaceIsIUnknown and For Each and the COM side
Posted by martin.wegger.jentoft NO[at]SPAM gmail.com at 10/12/2007 7:07:46 AM
Hi, I have a .net-dll that I'm using from VB6. And when I do a for each on my Collection class (Reports), i'm getting a "Type mismatch" error. If I change the InterfaceType attribute to InterfaceIsDual or InterfaceIsIDispatch, it works fine. Can anyone tell what I shoud do to get this ...more >>

Hidden Toolstrips cause CFormView to crash
Posted by Mike at 10/12/2007 6:19:40 AM
I am using CFormView and CWinFormsControl in C++ to show a C# control. The control includes a toolstrip container and various toolstrips. If all the toolstrips are hidden (visible = false) on any of the container's panels, a mouse click will cause a stack overflow. The problem is in the PreTra...more >>

Introspecting COM Object in C#
Posted by MichaelQuinlan at 10/12/2007 5:54:00 AM
My C# program is being passed a COM object. I can successfully read and write properties in the COM object by using code like this: object tsFields = tsInterface.GetType().InvokeMember("TSFields", BindingFlags.GetProperty, null, tsInterface, new object[] { }); What I would like to be able ...more >>

Howto add a new AppointmentItem to a MAPIFolder
Posted by Timothy Parez at 10/12/2007 4:18:59 AM
Hi, I have a piece of software which creates multiple calendars. And then I get the MAPIFolder for a specific calendar like this: MAPIFolder calendarFolder = this.GetOutlookFolder(); What MAPIFolder I get is defined by the properties in this class and doesn't really matter here. I get a...more >>

Create a new calendar using c#
Posted by Timothy Parez at 10/12/2007 3:12:20 AM
Hi, I'm using Microsoft.Office.Interop.Outlook. I can get the Appointments in the default calendar, but I would like to create new calendars using code and iterate through the items in these new calendars. Can anybody link to an example, as most examples show you how to create new appointm...more >>

COM DLL version info
Posted by ahmet.goral NO[at]SPAM gmail.com at 10/11/2007 7:14:37 PM
Hi How do I get information on each COM DLL my .NET application is loading? I need to print out the version info on every DLL for debugging purposes during the start-up. Thanks in advance ag ...more >>

CoCreateInstance fails with "Class Not Registered" when in fact, i
Posted by SteveL at 10/8/2007 10:49:01 AM
I was told to move my question to this forum: --------------------------------------------- I have a C# class which is being called via COM interop from a legacy c++ program compiled under VC7 (VS2003). It worked well before we converted our C# codebase to VS2005 (.NET 2.0) and now we have the ...more >>

MFC Types from C#
Posted by Javier at 10/8/2007 5:10:00 AM
Hello, First of all, thanks for the all the help. I'm new to .NET and I have to do some unusual coding (at least I cant find much info around). I'm doing a program that has to call some functions in a MFC DLL. My problem is that some of these functions receive MFC types as parameters (CStr...more >>

2 interop questions
Posted by wpcmame at 10/7/2007 1:14:00 PM
1. If Marshal.GetNativeVariantForObject allocates memory on the (e.g. for a string or an array) how do I free this memory? (i.e. the managed version of VariantClear()) 2. How do I release a COM object. - With one instance it is easy. ComClass obj = new ComClass(); .... ReleaseComObjec...more >>

Error with Microsoft.VisualBasic.Interaction.GetObject()
Posted by jwang at 10/3/2007 8:04:00 PM
I tried to use Microsoft.VisualBasic.Interaction.GetObject() to get a reference to a running instance of an application that registers itself as a COM server. There seems to be a problem with the the GetObject() method. According to the MSDN documentation GetObject() takes two augments as ...more >>

Pass long* to VC++COM object from C#
Posted by Pix at 10/3/2007 3:18:14 AM
I'm using in a c# project an activeX component (which I can't modify) with these 3 methods: public void PutData(ref int pData, int nBytes); public int GetDataSize(); public void GetData(ref int pData); The same functions, in a c++ project are: void PutData(long* pData, long nBytes); lon...more >>

COMException error when using .NET Framework 2.0 (x64 version)
Posted by Neil at 10/1/2007 8:05:01 AM
Hi - My .NET application makes a call to a DCOM server through an interop assembly generated by VS 2005. The program runs fine under .NET Framework 2.0 (x86 version), but when it runs under .NET Framework 2.0 (x64 version), the following error occurred: System.Runtime.InteropServices.COM...more >>


DevelopmentNow Blog