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


all groups > dotnet interop > october 2004

Filter by week: 1 2 3 4 5

Firing COM Events from C# Class
Posted by Tyler at 10/31/2004 1:35:39 AM
I would like to know what is required in order to create a C# class that can fire events to a COM object. I have seen many posts of the reverse (catching COM object events in C#), but not many of the case where the C# class is firing the events. As an example, consider a MyProject Active X DL...more >>

ActiveX for Outlook forms
Posted by castle8000 at 10/30/2004 5:10:02 AM
Hi folks. I dunno if this is the right place to ask for help with ActiveX / .net / Outlook, so ill siimpl give it a try :) I want to develop an ActiveX Control for MS-Outlooks 2003 with Visual Studio.Net 2003 and .net Framework 1.1 installed. Ive read tons of stuff about dlls with .Net, s...more >>

COM Enumeration Interop Problem
Posted by James Hancock at 10/29/2004 10:43:46 AM
Hey all. I have a problem with my implimentation of IHTMLElementCollection which I have defined like so: [ComVisible(true), Guid("3050f21f-98b5-11cf-bb82-00aa00bdce0b"), InterfaceTypeAttribute(ComInterfaceType.InterfaceIsIDispatch), TypeLibType(TypeLibTypeFlags.FDual | TypeLibTypeFlags.FD...more >>

Short Array from COM to C#
Posted by jo_mil2003 NO[at]SPAM yahoo.de at 10/29/2004 4:15:57 AM
hello, i try to pass a simple short array from COM to C# but I only get back wrong values from the COM Server. The COM Server: *.h : ... [id(4), helpstring("method Short_Array_read")] HRESULT Short_Array_read ([in, out] short* pcElems, [in, out, size_is(*pcElems)] short** Array_Out);...more >>

Problem when using COM from a webservice
Posted by rknewsaccount NO[at]SPAM yahoo.co.uk at 10/28/2004 3:10:05 AM
Hi, I have written some code in VB.net that uses a COM object via a reference I have add to my project. This program works as expected. I thought it would be a neat idea to expose the functionality offered by this program as a web service so that I can use the program across my UNIX/LINUX and...more >>

tlbimp on Excel9.olb
Posted by Tim Marsden at 10/27/2004 4:31:28 PM
Hi, I hoping am using Tlbimp Excel9.olb to generate the office.dll and excel.dll so i can then use ilasm to created the ils to modify. However I get the message "Tlbimp error: System.IO.FileNotFoundException - File or assembly name Microsoft.Vbe.Interop, or one of its dependencis, was not fou...more >>

Office interop
Posted by Luca Guccione at 10/27/2004 3:34:54 PM
How I can use different version of the same assembly in one project? Ex: microsoft.office.interop ver 11.0 (for Office 2003) and ver 10.x (for previous Office version). Thx Luca Guccione ...more >>

GetCustomAttributes: MarshalAsAttribute
Posted by Chakravarthy Bollapalli \(IFIN SCC COM\) at 10/27/2004 12:22:48 PM
Hi, I tried to retrieve CustomAttributes from a field in a class that has a MarshalAs attribute but I couldn't. Out of frustration I tried all possible combinations. GetCustomAttributes(true); GetCustomAttributes(false); GetCustomAttributes(typeof(MarshalAsAttribute), true); GetCustom...more >>



CFSTR_SHELLIDLIST Clipboard Format
Posted by Jeff Gaines at 10/27/2004 11:38:56 AM
I am trying to use the CFSTR_SHELLIDLIST clipboard format to allow the creation of links to files for a drag and drop operation in a C# app. I am obtaining PIDL's to the files in question and then setting up a CIDA structure in global memory - reading it back it seems to be in the format req...more >>

C# Word automation
Posted by Weston Weems at 10/27/2004 10:08:11 AM
Hello... I've seen about 10 ways to do this, and for whatever reason I cant insert page breaks or linebreaks (or rather I can, but they dont appear to happen in the resulting document. I get a reference to the endofdocument bookmark range then I can create a paragraph based on that, a...more >>

ASP.NET and Excel
Posted by Jan at 10/27/2004 2:23:01 AM
I want to use Excel-sheets as input and output in an ASP.NET environment. I always get the message that the application has not enough priviliges to open Excel. Can anybody give me an idea what i have to do. I'm working on a localhost with IIS...more >>

Bug in Office Interop using SaveAs?
Posted by Jediah L. at 10/26/2004 11:55:24 PM
The following code snippet fails when trying to save a mailitem to a windows folder: I've tried many variations of path - If i supply a file name I get an "Invalid Parameter" error - so i'm pretty sure it just wants path - and when I supply path (with \ or without \ as the last char) this i...more >>

Preventing aggregation in a .NET class
Posted by Robert Simpson at 10/26/2004 3:01:02 PM
Is there any way to mark a .NET interop class as non-aggregatable? My .NET classes are being instantiated as aggegatable objects by 3rd party COM objects, and when they're passed around to my other .NET objects they're being passed as __ComObject because the Marshaler can't figure out what to...more >>

Attaching a form object to an existing window?
Posted by RichM at 10/26/2004 11:23:02 AM
Is it possible to create an empty form that attaches to an existing window handle? I have a .NET class library method that requires a form ref as a parameter, but all I have is a window handle. I'm hoping to do this the easy way....more >>

How can you call managed code without hosting the CLR
Posted by Roy Chastain at 10/26/2004 11:18:15 AM
The code at http://www.codeproject.com/dotnet/bridge.asp is an example of how to call managed C++ from an unmanaged CLI program. This code does not make any of the calls to initiate the CLR etc. I have tried it, and it works, but I really don't understand how and why since the CLR and default...more >>

Marshal::StringToHGlobalAnsi implicit
Posted by rcotton NO[at]SPAM mindspring.com at 10/26/2004 10:51:56 AM
Does the following code cause a memory leak in .NET? Void Function1() { hFile= CreateFile(static_cast<const char *>(Marshal::StringToHGlobalAnsi(s).ToPointer()), GENERIC_WRITE, 0, NUL...more >>

Remoting: Returning an Arraylist of datatables
Posted by Z D at 10/26/2004 10:27:51 AM
Hello, I'm currently using Remoting (HTTP/Binary) to remote a simple object. Everything is working fine except for one function that returns an arraylist of datatables. When I call this function, nothing is returned (ie length of array =0). However, if I comment out my config file so tha...more >>

Non-visual C# objects on a webpage are not marked as "safe for scr
Posted by lwickland at 10/26/2004 8:11:04 AM
Non-visual C# objects on a webpage are not marked as "safe for scripting" I'm developing .NET components in C# which are used as ActiveX-style controls on web pages that are displayed inside a custom browser which is based on the IE web browser control. On 3 of about 100 PCs that the control...more >>

Java classes called from .net program
Posted by licx_ NO[at]SPAM hotmail.com at 10/26/2004 6:24:53 AM
I need to call methods of java classes from a .net program. There is a way to do this?...more >>

IDE is very slow because of Output window
Posted by James NO[at]SPAM avecsys at 10/26/2004 5:31:01 AM
I have a C# WinForms app which reuses unmanaged C++ dlls using COM interop. When I debug the app by running the code in the IDE, it is very very slow. In fact almost too slow to use. However, when I run the .exe, it is very very fast. I have noticed huge numbers of lines of info being printed ...more >>

program dialing a RAS connection from C# program
Posted by Nadav at 10/26/2004 1:25:03 AM
I have a program in C# that uses P/Invoke to dialup a RAS connection. On some computers this does not work. The error I get is #86 (The specified network password is not correct). I tried looking for information on this error on the internet and As far as I can tell this error is related to aut...more >>

Changing an unmanaged string from managed code
Posted by Roy Chastain at 10/25/2004 2:47:40 PM
I have successfully loaded a MANAGED C++ dll from an UNmanaged C++ program. I can even manage to call methods in classes in that DLL. What I need to know is how to pass a string back to the UNmanaged code from the managed code. public __gc __interface KMS::Transport::Managed::IManager { pub...more >>

Office 2000 Interop
Posted by Ken at 10/25/2004 6:43:03 AM
I've written a VB.Net application that uses Office 2003 (Word and Excel) automation. But, I have a mix of Windows 2K workstations with Office 2K, Office XP, and Office 2003. I've read KB articles about Office development under the .Net framework, including an article on the Office XP PIAs. ...more >>

Messages for MouseLeave, MouseEnter, etc.
Posted by James Hancock at 10/23/2004 12:23:54 AM
Anyone know what messages are analogous to: MouseLeave MouseEnter MouseHover ?? Thanks! ...more >>

Read Only Recommended
Posted by Aric Levin at 10/22/2004 4:28:05 PM
I am creating an Excel File through code, but when I try to open the file, I always get the following message: <File name> should be opened as read-only unless you need to save changes to it. Open as read-only? KB Article 181688 Mentions this problem: http://support.microsoft.com/default.a...more >>

Office Add-in. Trapping/Redirecting CTRL-S
Posted by Jason at 10/22/2004 3:21:02 PM
Built an Office Addin with .net 2003. I have captured the save and save as menu options so I can run my own code before the regular save function executes. However, I have not been able to figure out how to do the same with CTRL-S. Does anyone have any ideas? Thanks Jason ...more >>

Whidbey TypeLibConverter improvements? (please leave my interface types alone)
Posted by Per Bergland at 10/22/2004 1:30:42 PM
Does anyone know if the Whidbey TypeLibConverter has an option that corrects the IMO greates flaw of all: The VB6-esque conversion of all coclass default interfaces to the coclass itself (just like VB6 pretends that the default interface == the coclass but does a much better job at it than .N...more >>

Passing blittable types in callback functions
Posted by Ken Soh at 10/22/2004 12:15:02 PM
Hi all, I'm having problems passing a blittable type (bool) from unmanaged C++ code to a managed callback function. I have an unmanaged C callback function declared as follows: typedef int __stdcall PostProcFileCallback(void *pData, LPCTSTR pszFilename, bool bSkipped); and some code ...more >>

Confusion: Threading & COM Interop
Posted by Z D at 10/22/2004 11:48:22 AM
Hello, I'm having a strange problem that is probably due to my lack of understanding of how threading & COM Interop works in a WinForms.NET application. Here's the situation: I have a 3rd party COM component that takes about 5 seconds to run one of its functions (Network IO bound call...more >>

Want my app to dynamically load SpeechLib, possible?
Posted by BCauldwell at 10/21/2004 1:21:02 PM
So I'm developing an application for my company which uses the MS SpeechLib. I want everyone to be able to use it, so that the machines which do not have the speech library installed will still work correctly, but won't be able to have further functionality provided by the speech library. C...more >>

cleaning up IWin32Window
Posted by ebloch NO[at]SPAM phreaker.net at 10/21/2004 10:51:11 AM
First, apologies for cross-posting. I'm writing a Visio add-in using the .NET Framework. The add-in displays a number of windows forms as modal dialog boxes. In order to display properly, I set the parent to the Visio Window. I've done this by creating a class that implements IWin32Window. ...more >>

uninstall/reinstall a .net-built COM-callable DLL ?
Posted by t.hanson NO[at]SPAM faz.de at 10/21/2004 2:41:52 AM
last week i successfully created and installed (with visual studio / ..net 2.0beta and then with the .net 1.1 framework) a DLL i can call from ASP under IIS5 on a machine running the .net 1.1 framework. both development and target machines run w2k and iis5. [c.f. (microsoft.public.dotnet.fra...more >>

Should not automate Office from a worker thread in VB.NET?
Posted by Robin Tucker at 10/20/2004 8:39:27 PM
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dv_wrcore/html/wrconthreadingsupportinoffice.asp This info (above) means to me that I should not automate Word from a thread. I am currently automating Word from a worker thread, not my main process. However, I thought that as I...more >>

Strange problem on runtime
Posted by Tamir Khason at 10/20/2004 7:03:20 PM
See the thread in csharp group. Please try to help us. TNX ---------------------------------- -- Tamir Khason You want dot.NET? Just ask: "Please, www.dotnet.us " ---------------------------------- Yes, I know this. FooCOM.dll (original com) is in the same directory with i...more >>

DllImport, how to dinamically assing the DLL path?
Posted by Luis Fajardo at 10/20/2004 12:51:04 PM
I don't want to put the .DLL in a known OS path folder, I'll like to define or load the .DLL from an specific location at runtime. How should I do it? Thanks in advance...more >>

What's the correct .NET type...
Posted by James at 10/20/2004 11:22:21 AM
when a function wants an MFC CString? TIA....more >>

COM Client and .Net Application
Posted by Michael Lohr at 10/20/2004 9:48:55 AM
Hallo, is it possible to call a remote .Net Application from a local COM Client using .Net interop?? All I have read until now, using remoting requires that you have a Client and a Server writen in managed code so I'm not shure if above scenario can work. Thanks in advance for all hin...more >>

Calling C++ library function from C# ?
Posted by Christophe at 10/20/2004 7:27:05 AM
Hello, I would like to call unmanaged code (C++ Library Code) in C# library. When I Call C++ Function with an "int" parameter. It seems that there is a Marshalling problem; because when I put 88 as parameter, My C++ function receives 1240420 How to keep same parameter value between C# ...more >>

2nd Post - Any Help Here
Posted by DavidS at 10/20/2004 7:13:07 AM
Have Excel document that I attempt to open using Interop Assemblies with ASP.NET. Problem is Excel is opened but is not visible from web app. Code used is as follows: Dim oExcel As New Excel.ApplicationClass() Dim oBooks As Excel.Workbooks oBook.Open( "some excel report"...more >>

Need Help with DocumentProperties & GlobalLock
Posted by Benoit Courchesne at 10/20/2004 2:16:57 AM
Hi, I'm trying to build my custom Printer Dialog box. The following code is supposed to Pop up the printer properties form and edit the PrinterSettings. My problem is that I'm able to show the Printer Properties form but I'm unable to write back the settings to my PrinterSettings It either...more >>

Proposal to extend documentation about interop
Posted by John Allberg at 10/19/2004 11:44:22 PM
Hi! I think the MSDN docs about interop doesn't state clearly enough that there is a character encoding conversion automaticly done from Unicode to the characterset for the computer during interop. This got me really puzzled for a few days. I've got a legacy C-application (dll) that tak...more >>

MarshalDirectiveException only in release mode
Posted by Bill at 10/19/2004 7:05:03 PM
When running our assembly which PInvokes to an unmanaged dll, I am getting the exception System.Runtime.InteropServices.MarshalDirectiveException : Can not marshal parameter #1: Invalid managed/unmanaged type combination (Int/UInt must be paired with I or U). This exception only occurs when ...more >>

How to execute unmanaged exe from .net application...
Posted by CEP921 at 10/19/2004 2:13:04 PM
Hi All, I have a compiled Fortran executable that I must execute from a VB.Net windows application. What is the best way to go about this? In a similar application, developed with VB6, I used the ShellExecute Win API function. Is there a cleaner way in .NET? Best Regards, Chad...more >>

Drag and Drop
Posted by Jeff Gaines at 10/19/2004 1:25:02 PM
In my file manager app I have set up the ability to drag and drop objects (files and folders) between its two ListView panes and also between it and Explorer. I fire off the dragstart event in the ListView: (having set up apipt from the top left of the ListViewItem) JFunc.JCopyFilesToClip...more >>

Static and IJW issues.....Help!!!!
Posted by Luis Fajardo at 10/19/2004 1:19:06 PM
I need to interface an old C application with C#.NET, I created a IJW C++ bridge, here is a sample code ...... #include "stdafx.h" #include "MyCPPClass.Interop.h" #pragma managed #using <mscorlib.dll> #using "MyCSharpAssembly.dll" using namespace System; using namespace System::Runtime...more >>

FindNextPrinterChangeNotification() problem
Posted by anze_hrast NO[at]SPAM hotmail.com at 10/19/2004 1:01:31 PM
I have been trying to use this c++ Windows API function for over a week now, reading MSDN, threads in forums... However, I have made little progres. I used a code example from a thread "http://groups.google.com/groups?hl=en&lr=&threadm= ugy6CyX%24DHA.268%40TK2MSFTNGP10.phx.gbl&rnum=1&prev=/group...more >>

Files required for IE Interop
Posted by news.microsoft.com at 10/19/2004 10:39:22 AM
I have a Windows Forms project that embeds Internet Explorer. On my development machine all that is required for the application to run is the 48KB file AxInterop.SHDocVw.dll and the 124KB Interop.SHDocVw.dll. (Btw, what is the difference between these two? Can I reduce this to just one?). ...more >>

Return array to vbscript as Variant*??
Posted by tale at 10/19/2004 10:30:46 AM
Hello all, I'm beating my head against the wall on this problem. Everything else has been really easy. I need to call a COM object, that is implemented in C#, from vbscript. VBScript only knows Variants, so I need to return an array as a variant from one of my functions. [Guid("10612AA1-...more >>

COM, STA threads and internal threads
Posted by Sunny at 10/19/2004 10:19:42 AM
Hi, as I'm not really a COM knowledgeable, but I have to deal with it :), I have some questions. The background: C# COM addin for Outlook 2000. Framework 1.1 SP1. VS.Net2003. Ok, Outlook works in STA mode with addins. Reading here: http://weblogs.asp.net/larryosterman/archive/2004/10/1...more >>

Visual Studio..NET COM Interop
Posted by BrianS at 10/19/2004 6:59:03 AM
I have two questions: 1. I have written a dotnet assembly and registed it as COM object (using Register as Com Interop in Build). Is there a way to reference this as a COM object in another .Net application? I want to test that COM clients will effectively use this object. 2. When I buil...more >>


DevelopmentNow Blog