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 > september 2005 > threads for september 15 - 21, 2005

Filter by week: 1 2 3 4 5

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

How to pass VBA Collection to/from VBA macro when calling from C#?
Posted by Gary McGill at 9/15/2005 11:31:32 AM
I have a COM add-in written in c# that calls a VBA macro embedded in a Word document. (It invokes the "Run" method of the application object using InvokeMember). I can successfully pass simple parameters (string, etc.) and receive a simple return value but what I'd really like to do is pass & ...more >>

Word/Excel check for an existing file lock
Posted by Mike Loux at 9/15/2005 7:52:05 AM
Hi All, Does anyone know of a way (in .NET) to determine if a Word or Excel file is currently locked for editing by another user BEFORE trying to open it? I am using the DsoFramer control to embed Word/Excel documents into my VB.NET app, and when a user tries to open a file that is locked b...more >>


DevelopmentNow Blog