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 > september 2005

Filter by week: 1 2 3 4 5

Read Exchange Mailbox
Posted by Terry Holland at 9/30/2005 10:32:38 AM
Im not sure if this is the correct group for this question. If not please advise of other group more suited. I am trying to write a windows service that would read a number of Exchange mailboxes at set intervals and respond to unread emails in the mailboxes. Could someone point me in directio...more >>


How to handle dispevent in C#
Posted by Ying-Shen at 9/29/2005 8:55:02 PM
Hi all, I'm trying to port a C++ program to C#, this program interoprates with a COM component, and it needs handle hanle some disp events exposed by that program, in C++, this program archive this using ATL by mixing in IDispEventSimpleImpl class and some SINK_MAP definitions. The qu...more >>

Help! How do I Specify .config Information if my Assembly Client is a VB6 Application?
Posted by Joseph Geretz at 9/29/2005 5:35:41 PM
I need to download a greater than 4 megabyte attachment via WSE / DIME. The only way I know how to configure this is via a .config file. Normally, the ..config file is the same name as the base application. I built a .NET driver program to test this, NetBrokerDriver and provided a NetBrokerD...more >>

How to tell if Outlook interop created new Outlook process
Posted by Rodger Constandse at 9/29/2005 3:57:19 PM
Hello, I have a WinForm application that interacts with Outlook using interop. Is there a way to tell if the 'new MSOutlook.Application()' call is actually creating a new Outlook process, or it is using an existing Outlook process? I want to terminate the Outlook process if it was spawned...more >>

Can't debug VS.NET 2003 COM server application after installing VS 2005 RC
Posted by Jeff Brown at 9/29/2005 3:18:12 PM
I've developed a C# class library that runs as an in-process COM server within a VB6 application. I developed my library with VS.NET 2003, and it must continue to be developed on that platform for the foreseeable future. Yesterday, for a completely unrelated purpose, I downloaded and insta...more >>

How to return an HRESULT to COM caller?
Posted by Ying-Shen at 9/29/2005 1:54:43 PM
Hi all, I need to implement an COM interface in C#, there is one method whose IDL definition is HRESULT IsServerAvailable(); which is supposed to return an hresult value to indicate the server status. I saw .Net tlbimp just translate it into void IsServerAvailable(); ...more >>

COM Interop Deploy issue
Posted by krissy_kernan NO[at]SPAM hotmail.com at 9/29/2005 1:14:40 PM
I am getting the following error when I try to run my code on the deployed server: "File or assembly name dllname.dll or one of its dependencies was not found." It is a VB6 app. that calls a .Net dll. (The .Net code also calls VB6 dlls, but I don't have a problem executing that part of the code...more >>

Problem with .NET MSMQ wrapper - FileNotFoundException
Posted by Christer Brinchmsnn at 9/29/2005 9:30:47 AM
Hello. Don't know if this is the right group, but my problem involves COM interop, hence the post to this group. We have a simple API which we use to send messages to a private MSMQ queue. This API is C#, and it abstracts some of the details in using the System.Messaging namespace. It runs...more >>



C++/C# interop causes OleInitialize (STA) to fail?
Posted by Bill Cumming at 9/29/2005 8:26:02 AM
Is there something about C++ / C# interop that initializes the threading model to MTA so that OleInitialize will fail? I have a mostly C++ app that calls a single C# class DLL. Only one source file in the C++ app is compiled as managed (with /clr) – the single file in which only one of th...more >>

Can't create COM object (VB6) in Web user control on WEBFORMS
Posted by Ton at 9/29/2005 6:02:04 AM
Hi, I've developed several Webuser controls. One of the controls is using a VB6 based activeX component. The code looks like: Dim dbF As Object ''dbRecordFrm.dbRecordForm If ses Is Nothing Then ses = CreateObject("dbOLEserver.Session") End If dbF...more >>

Good book on interop (C#) and a general question
Posted by Joe at 9/28/2005 3:50:31 PM
Hello, my boss just gave me my first project that will involve some interop, specifically referencing a com dll that has a method that computes a few numbers. This is for part of an ETL process where I'll have a table full of input parameters (each record is a unique set of input parameters), t...more >>

UnauthorizedAccessException with third party component
Posted by Felipe Garcia at 9/28/2005 2:05:25 PM
I'm using a third party COM+ component inside C# (v 1.1.4322) application. I installed the proxy on my machine, it were working fine. But since yesterday, unexpectedly, the component stopped working. Then exactly at the moment that i'm instantiating the component, I get an exception of type U...more >>

How can I access C++ .lib with C#
Posted by tor.martin.saur NO[at]SPAM gmail.com at 9/28/2005 10:45:18 AM
I'm a newbie to C++ and C#. I have a SDK written in C++ (in a lib file). I can't modify the lib file. Can I in anyway access C++ functions in C# classes? I supose I'm looking for a way to wrap the C++ class(es) in to C#. I have heard about managed/unmanaged code, plattform invoke What sh...more >>

Excel API from VC++ .NET
Posted by bill at 9/28/2005 7:28:25 AM
I cannot find any examples of doing Excel automation from a VC++ .Net environment. Does anyone ay least know what the namespace should be to expose the Excel app? i.e. using namespace System::????????????????? Someone on another group suggested the following: <<<<For managed, you use...more >>

COMException accessing C++ COM VARIANT
Posted by sathya.krishnamurthy NO[at]SPAM gmail.com at 9/28/2005 6:04:23 AM
Hello Everybody I have an ActiveX DLL, the base implementation is HRESULT GlobalComputeClass ([in] VARIANT *inArr, [out,retval] double *pval); The VARIANT array contains all doubles. The implementation is STDMETHODIMP CMP::GlobalComputeClass (VARIANT *inArr, double *pVal) { // Trying t...more >>

ActiveX and casting?
Posted by Karen Kenworthy at 9/27/2005 12:16:11 PM
Hope you don't mind some questions from an interop newbie ('m not even sure what questions to ask, but I want to learn) ... I'm trying to access a COM object (the MS Agent server) in VB.Net 2005. I can create the object that represents the server, access its methods and properties, and mor...more >>

COM Object - Reference to a base class?
Posted by Wilbur Slice at 9/27/2005 9:55:40 AM
I have developed a.NET class hierarchy that I can use in my .NET application, but I also need to make it available to some legacy programs, so I created a COM warapper around it, exposing the appropriate functions. When I create a new .NET solution to test the COM object, I add a reference to...more >>

Importing ActiveX control into VS 2005 issues
Posted by daaan23 NO[at]SPAM gmail.com at 9/27/2005 8:44:17 AM
Hello! I am importing an activeX control into VS .NET 2005 . Dropping the control into the designer gives the generic "cannot load control error, make sure it is registered." error. But when i try to create the interop manually i get the following error: "AxImp Error: Parameter 'validate' ...more >>

ClassCast-Exception for COM-interface, but only when run in own thread
Posted by taj at 9/26/2005 10:24:01 PM
Hi there, i hope anybody can help or just give a hint... using C#, i try to get an instance of a COM-class of the ShellAPI, IShellIcon in this case pericular case, but is also reproduceable with other Shell-interfaces :-) See the code... object iconObj = null; ShellAPI.IShellIcon shellIco...more >>

Can Unmanaged Code call LoadLibrary on a managed DLL?
Posted by Bill Davidson at 9/26/2005 4:25:11 PM
All: I know that a managed component can call an unmanaged DLL function. I also know that a .Net component can be invoked from unmanaged COM code. However, can a managed DLL be made to look like an old-fashioned unmanaged DLL such that an unmanaged client can invoke LoadLibrary() on the m...more >>

SendMessage help
Posted by Ken Beauchesne at 9/26/2005 2:09:19 PM
I have a stand alone c++ program that uses SendMessage to communicate with a stand alone C# program. The c++ program looks like this hWind has previously been determined; wchar_t wts[] = L"123456"; ::MessageBox(NULL,wts,L"",MB_OK); // just to display it gets set SendMessage(hWi...more >>

COMException
Posted by Milosz at 9/26/2005 2:38:14 AM
hi, i have a problem to get the properties of a com object. I tried it with CallByName(aWorkOrder, "ClassID", CallType.Get) and myType.InvokeMember("ClassID", Reflection.BindingFlags.DeclaredOnly Or Reflection.BindingFlags.Public Or Reflection.BindingFlags.NonPublic Or Reflection.BindingFlags...more >>

Refresh COM Object
Posted by RC at 9/24/2005 12:00:00 AM
Hi, I have a Vb6 DLL Called from csharp which is a report object. It can fetch data properly, however, when I run 2nd, 3rd, 4th time with differenct report criteria, the fetched data still remained as same as the first time. The object seems cannot refresh after first creation. It only ref...more >>

QueryInterface Fails for Word 2000
Posted by Mark Olbert at 9/23/2005 11:06:55 AM
I have a .NET application which uses Word and Excel to do mail merges. It is designed to use plug-in assemblies for particular versions of Word and Excel (e.g., 2000 and XP). The assemblies for 2000 use Interop assemblies created by VS .NET 2003 when I add a reference to Word 2000 and Excel 2000 t...more >>

Passing objects between c# Managed and c++ unmanaged code via COM
Posted by info NO[at]SPAM gerbenheinen.nl at 9/23/2005 4:45:34 AM
Hi everybody, I have some troubles with using my managed C#.Net code in unmanaged C++ code through COM. I have troubles with passing C# objects to C++ code. - I have an interface IObjectPass and an object ObjectPass that implements the interface. - I have an interface IPassedObject and an ...more >>

Nothing displays on Word window!
Posted by Kash at 9/23/2005 4:30:02 AM
Hi Guys: I'm facing a strange behavior when trying to invoke and open a Word document through my aspx (vb.net) file. I'm working with Office 2003 and I can see that the requested document gets opened on the screen. Some of the Word's icons on standard toolbar and other toolbars come up and di...more >>

Interop (c#, VB6) problem
Posted by shesh at 9/22/2005 10:47:06 AM
We have a C# class library (with interfaces and classes dervied from them). This is refernced in a VB6 application and everything is fine. Currently if the library is modified, then VB6 reference to that library needs to be changed and VB6 app needs to be rebuilt for changes to be seen. Is ...more >>

New Code Working /w .NET and Unmanaged Code
Posted by rob at 9/22/2005 8:26:29 AM
I am creating a new app in .NET (VS 2005, C#). A good amount of the underlying code (structures, classes, etc) produced for this project must also be accessible in old unmanaged apps (VS6, C++). Obviously, I do not want to write seperate code for both apps. Note that I prefer to have more work t...more >>

COM and Threading problem(I think)
Posted by Brook at 9/22/2005 12:00:00 AM
I have a VB.net application which creates two threads (A&B). In Thread A I create an instance of an object contained in a COM dll which performs a lengthy search operation. In Thread B i create an instance of the same object in the same COM dll but i perform a short search. As i'm using multiple...more >>

dll & VS2005 & C#
Posted by rob at 9/21/2005 11:52:32 PM
I need some help with the following: Assume I have a dll that has a function MyStrcpy that does exactly the same as strcpy. The dll was written in VS 6 C++. The project would look like this something like: BOOL APIENTRY DllMain( HANDLE hModule, DWORD ul_reason_for_call, LPVOID lpReserved){ ...more >>

HELP -- Good way to read "fielded" fixed-lenth records
Posted by Lee Gillie at 9/21/2005 4:01:53 PM
In other forms of BASIC and even other languages, we have been able to read X byte fixed length records over a field record layout. It seems very problematic in VB.NET. What we are trying is to have a 750 element byte array into which we read with a FileStream. Then we Marshal.PtrToStructur...more >>

.NET optional feature using Word object model
Posted by Michael Jackson at 9/21/2005 3:33:20 PM
I am developing a .NET 2003 app that reviews Word and Excel documents via a third party component that does NOT require Word or Excel to be loaded on the target system. However, we need to be able to retreive document properties, such as Author, from the Word/Excel file that this third party...more >>

Getting rid of _Object
Posted by emma_middlebrook NO[at]SPAM fastmail.fm at 9/21/2005 2:19:47 PM
Hi I don't want to factor out my public functionality into interfaces, suppress the ClassInterface, use ClassInterfaceType.None and ComInterfaceType.InterfaceIsIUnknown as attributes just to find that when I use OleView my pretend coclasses implement some mysterious interface _Object which my...more >>

PIA for VBRUN and VBA
Posted by Brian R. at 9/21/2005 11:58:18 AM
As I understand, there are no PIAs from Microsoft for VBRUN or VBA (Correct me if I am wrong). What does MS suggest you do if you want to sign a VB control instance via the aximp tool? Is the suggestion to sign our own copy of VBRUN and deploy it to the GAC for use by our components? Any ...more >>

How to dispose C# object created via VB6 COM component interop?
Posted by natety at 9/21/2005 10:46:25 AM
I am having problems getting a C# component to release itself fro memeory when calling it from a VB6 COM component via an interop. Thi is what I am doing: VB6 COD Dim oInterOPConnect As Object Set oInterOPConnect = oContext.CreateInstance("namespace.Interop") oInterOPConnect.Save(szXML...more >>

Marshal union struct from C callback
Posted by Simon at 9/21/2005 10:32:03 AM
Hey guys, I'm wrapping a C lib in C#. The C lib has a callback which I pass a C# delegate, which passes me a struct, but the struct has fields in it that are unions. I'm having a hard time marshalling this. Here is what the C struct looks like and how I have declared my version in C#....more >>

Calling .net from COM (not the obvious)
Posted by EP at 9/21/2005 9:15:07 AM
I know to call .net code from COM you regasm the assembly and so on, butt... I have a situation where I need to call a .Net assembly from VBScript. The problem is that the type I need to create does not have a default constructor, and thefore is not exported by regasm. Is there any possib...more >>

Doubt in CCW and RCW
Posted by BabuLives at 9/21/2005 4:33:24 AM
hai groups... Is CCW,RCW are same as the one in the surrogate process(DllHost.exe) ? ie, there is wrappers like factory wrapper(IclassFactory) and ObJect wrapper in the surrogate process... what is the difference between these wrappers???????? Regards, Satheesh babu ...more >>

Writing COM component in C#
Posted by Jan Eliasen at 9/21/2005 12:00:00 AM
Hi I am terribly sorry to disturb you all with this probably very simple question... but I have searched the net for two hours, and there are a lot of webpages out there with the words n it that I have tried searching for :-/ Anyway, I need a simple quick guide to how I cna write a dll in C...more >>

Exposing IEnumerable for COM interop with VB6 - Need help
Posted by Bob at 9/21/2005 12:00:00 AM
Hi, I have followed the advice by Adam Nathan in his ".Net and COM - The Complete Interoperability Guide" to develop a COM component in C# which exposes the COM enumerator thus exposing the IEnumerable as follows: [ Guid( "84843982-800D-4B5B-84F3-78173EE1731B" ), Description("The S...more >>

Help: Office XP Service pack 3 has (I think) killed my application :@( Class not registered
Posted by Mark at 9/20/2005 10:34:04 PM
Hi Folks I installed service pack 3 for Office XP a couple of days ago. On my dev box when I opened up my application (which contains web controls etc.) I got errors straight away. I got round the errors by changing a couple of references relating to AxInterop.OWC10 and 11 (sorry for being...more >>

hiding System.Object from COM ??
Posted by emma_middlebrook NO[at]SPAM fastmail.fm at 9/20/2005 7:07:23 AM
Hi I'm exposing a simple VB.NET object for use by COM. If I expose the class using the following attribute System.Runtime.InteropServices.ClassInterface(System.Runtime.InteropServices.ClassInterfaceType.AutoDual)> then in the .tlb file I get all the System.Object methods ... Any ideas...more >>

referencing a .det component without a strong name from a vb6 app
Posted by Naim at 9/20/2005 5:50:53 AM
hi, we have a .net component that we want to call from a vb6 application. The .net component doesn't have a strong name and we don't have the code for the .net component. Is there any way to call the .Net component from the vb6 application ? or is it just impossible ? regards *** Sent...more >>

Question about default parameters in COM type lib and use in C# after using tlbimp.exe
Posted by Mac Dyer at 9/19/2005 9:33:49 PM
Hi there. I have a COM DLL that I have converted into an interop assembly via the tlbimp.exe tool. One function that I am trying to use now in C# has a default parameter defined in my IDL file: HRESULT Convert( [in, defaultvalue( "" )] BSTR file, [out, retval] long *count ); When I try t...more >>

My c# app crashes on closing due to AxWebBrowser - I need some ide
Posted by david hodgson at 9/19/2005 6:14:01 PM
However it happens after the managed code had been unloaded. The error message I get says The exception ( 0xc0020001) occurred in the application at location 0x7c81eb33 this appears to be happening as it's trying to unload the activeX control, which is then trying to call back into managed...more >>

How to turn-off Timer that calls MSCOMM32.ocx on Form's closing event
Posted by VR at 9/19/2005 3:30:28 PM
Hi, I have an WinForm app that is described bellow: 1. The main app 2. A Form that's shown as .ShowDialog() 3. A User Control inside this dialog form 4. An instance of MSCOMM32.ocx inside this user control The scenario is: 1. When the dialog form is loaded, it starts a timer (that has an...more >>

Handling events for FaxServer
Posted by Richard at 9/18/2005 1:11:08 AM
Can anyone please give me some help regarding how do you handle events for FaxServer through .NET ie C# . My problem is I would like my application to be notified of the events that have been fired. Once I have called connectSubmit I would like the event, FaxServer_OnOutgoingJobChanged to b...more >>

How to load add-ins into a OWC spreadsheet control?
Posted by Shmuel Cohen at 9/17/2005 7:24:15 AM
I'm writing an application that embeds the OWC spreadsheet control, but I also want to load/unload several external excel add-ins (.XLA) - how can this be accomplished (I'm using C#)? ...more >>

COM calling .NET methods, and inherited interfaces.
Posted by Gemma M at 9/16/2005 10:38:58 AM
Hi, I have a COM component which calls methods on a .NET object. However, some methods originate in an inherited interface. COM cannot "see" the inherited methods. In the code fragment below, if a COM component creates an instance of Child class, it cannot "see" the property ParentKey....more >>

I need to call CoInitializeEx(IntPtr pvReserved, uint dwCoInit); pvReservered = null, so what is the value of COINIT_APARTMENTTHREADED?
Posted by Uchiha Jax at 9/16/2005 12:00:00 AM
I've been recently getting around a lot of issues with the DirectX.AudioVideoPlayback.Audio class. It's a difficult class to work with, bad enough to make someone write this article: www.codeproject.com/cs/media/DirectX9_media_playback.asp I however don't want to use Media Player as the au...more >>


DevelopmentNow Blog