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

Filter by week: 1 2 3 4 5

Bill
Posted by Bill at 5/30/2007 5:20:05 AM


Passing String to Unmanaged Code
Posted by dzar at 5/29/2007 2:23:20 PM
I'm new to .NET but am trying to pass a string pointer as the lParam of a SendMessage call from some managed code to my DLL written in unmanaged C++. What I've done so far is this (in VB.NET as that's what my colleague wants to use, but if you want to give me a solution in C# that would be f...more >>

Unmanaged code calling .Net from another directory
Posted by herc at 5/28/2007 8:13:05 PM
In years passed I recall learning that there is a way for unmanaged code to setting up an applicatoin context in a different directory. The goal is to enable the users to write their own .net modules that my program will load and call. I just cannot figure out what I should be looking for in th...more >>

TypeLoadException struct problems
Posted by Nuno Magalhaes at 5/28/2007 2:29:40 PM
Hello, When I use the following structure at the Load event I get a type load exception. [StructLayout(LayoutKind.Explicit)] public struct TempStruct { [FieldOffset(0)] public int a; [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 4)] [FieldOffset(0)] public string b; }...more >>

Returning VBEmpty from .NET to Classic ASP
Posted by wangdawei1117 NO[at]SPAM gmail.com at 5/24/2007 12:46:20 PM
I am trying to return the variant type vbEmpty from a .NET .dll to Classic ASP but it is not working correctly. Here is the code that I am using... In C#: return Microsoft.VisualBasic.VariantType.Empty; However, this returns an integer value of 0 (the value of the constant) and not the ac...more >>

how to pass a struct with a point to a mfc dll
Posted by zhanglr at 5/23/2007 7:59:00 AM
Hi, I am a new guy in C#. I try to pass a struct with a point to a mfc dll. But I am failed. Anybody knows what I must do? The following is my code: ------------------------------------ C++ dll: class MyStrStruct { public: int size; int* buffer; }; extern "C" bool PASCA...more >>

thread differences from button_click and timer_elapsed (winForms - interop)
Posted by Victor Reboucas at 5/22/2007 9:24:59 PM
Hi, I'm experiencing some kind of thread behavior problem in a WinForms app in Vb.Net 2.0. Actually I'm doing some huge interop using DirectShow to interact with my miniDV camera. The problem is that if I put the code to read the camera's timecode inside a button_click routine it works just...more >>

App is crashing after communicating with ActiveX control
Posted by nickdu at 5/22/2007 6:06:00 PM
We're having some trouble getting our .NET 2.0 application working with an ActiveX control. We're using the RTList control (http://www.xyris.com/products/rtlist.htm). I've created the interop assemblies using aximp. It appears that we're communicating with the control and get back the res...more >>



attach to excel process
Posted by chjossi NO[at]SPAM gmx.ch at 5/22/2007 6:13:02 AM
Hi I would like to attach to a running excel application. What I would like to do is presenting the user a list of excel applications that are currently visible. The user will specify one of these application which will be the target for some data that will be exported from my program. ...more >>

.net dll in NT4
Posted by Venedict at 5/22/2007 2:46:03 AM
Hi All, I have developed a .net dll which using COM interops interface. I developed and VB6 application to utilize the dll file. It is working fine when testing in Windows XP. After that, I tested the application in NT4 workstation, it prompts thtat ActiveX object cannot be created. ...more >>

Problem of referencing Media Player library file
Posted by jpl at 5/15/2007 7:46:01 PM
When I load my VS2003 program to VS2005 environment, I received the following error during Form loading. I am trying to find a right COM for the following type. Any help will be greatly appreciated. thanks! ------------ Could not find type 'AxInterop.MediaPlayer.AxMediaPlayer'. Please mak...more >>

.NET CLR 1.1 does not release the COM object reference.
Posted by johnxhc NO[at]SPAM gmail.com at 5/15/2007 6:51:26 PM
We have a project in .NET 1.1 , some of the .NET methods take COM interface reference pointer as a parameter, somehow we have to call Marshal.ReleaseComObject to release the COM Object, otherwise the COM object will never get release, Even we call gc.Collect() But the same code compiles in .NE...more >>

ATL ActiveX in C# User Control crashing designer
Posted by jhamers at 5/14/2007 11:23:48 PM
Hi, I'm using a ATL ActiveX on a C# windows form (Visual studio 2005). That works great. However, I wanted to create a C# user control which would wrap this ActiveX. Therefore I created an empty user control and just put this ActiveX on it. No problem so far. However, when I wanted to test ...more >>

Cannot marshal 'return value'
Posted by ShaunO at 5/14/2007 12:26:02 AM
Hi, I am trying to call an old Delphi .dll // DELPHI definition (should return an array of 256 chars) function DiskSaveFooter(missionname,qlffilename,id:pchar):TCharArray; export; // My C# definition [DllImport("qn.dll", CharSet=CharSet.Ansi,CallingConvention=CallingConvention.StdCall)] ...more >>

Calling .NET from MFC
Posted by T at 5/11/2007 10:33:04 PM
Hi, Could somebody point me to some sample code to call a .NET from MFC (no managed extensions please) ? I understand that this involves using COM Interop but a complete example will be a great help because I believe there has to be some additional plumbing on the .NET side. Thanks in advance...more >>

Callback Not Being Called
Posted by Tim Barber at 5/11/2007 2:08:14 PM
I am attempting to incorporate a 3rd party DLL that is unmanged into my managed project. The problem as you might have guess is regarding getting a callback to occur. The one big problem is that I don't have access to either the code or the developer at this point hence my posting here. I h...more >>

Tlbimp reference naming problem
Posted by Andria at 5/11/2007 9:29:15 AM
I am trying to write a utility that will go through all of my COM dll's that I am using in my .NET app and update the Interop wrappers for them. To do this, I am using tlbimp and have done everything I want with only one problem. Some of my COM dlls reference other COM dlls, so tlbimp is gener...more >>

GetActiveObject and E_NOINTERFACE
Posted by jhh NO[at]SPAM locus.no at 5/8/2007 5:08:03 AM
I just got my first box running Vista. (yihaa!) My happiness didn't last long - my code broke. This snippet works in Windows XP but not in Vista. TransFleet.Application application = null; Object appObject = Marshal.GetActiveObject("TransFleet.Application"); application = (TransFleet.Appl...more >>

Interop with leaky dll
Posted by kh at 5/8/2007 5:02:23 AM
Hi. We are using a third-party unmanaged DLL via PInvoke, but we have discovered that over time the application's process is accumulating memory and analysis has shown that this is because the unamanaged DLL is aggregating state between calls. We do not have control over the third-party DL...more >>

Code working in 1.1 doesnt work in 2.0
Posted by Piyush Daiya at 5/3/2007 3:38:54 PM
Hi All, I have this following code which works fine in 1.1 but gives runtime exception 2.0:- Reflection Code to get One Property from COM Object ------------------------------------------------------------------------------- Dim objSession as Interop.ComObj.Session Dim objAgen...more >>

Jit Debugging - COM Interop
Posted by JerryWEC at 5/2/2007 3:59:43 PM
Hi all! I am debugging a VB6 client application through to a dotNet 2.0 class library (dll) using the following in my app.config files... <configuration> <!--system.windows.forms jitDebugging="true" />--> </configuration> With the system.windows.forms.jitDebugging="true" uncommented...more >>

Excel 2003 + 2007 on dev machine - deployment problems on Excel 2003 machine
Posted by David Hearn at 5/2/2007 12:42:16 PM
I'm writing a C# app which will populate an Excel spreadsheet. The app references Excel using COM. I have Office 2007 on my machine, but the machine which will be running the application will have Office 2003. Therefore, when I added the Excel COM reference, I chose the Excel 11 one. N...more >>

To Pin or Copy memory?
Posted by obiwanjacobi at 5/2/2007 4:13:32 AM
Hi, I'm trying to decide what is the best way to pass a data structure to a P/Invoked Win32 function. As far as I can tell there are two options: 1) Use the Marshal class to allocate native memory an copy the data into it. 2) Use the GCHandle to pin a managed object that has the exact same...more >>

Outlook 2007 automation with VS.NET 2005
Posted by Mark Rae at 5/1/2007 5:53:21 PM
Hi, I'm trying to iterate through the contents of a folder in a pst file using VS.NET 2005 + SP1 and Outlook 2007 running on 64-bit Vista Business. Virtually all the examples on Google and MSDN seem to be on how to write add-ins - I don't want to do that. I did find this article: http:...more >>

InvokeMember passing null for IDispatch* param fails, Type Mismatc
Posted by TomCat at 5/1/2007 5:20:00 PM
Seems like there is no way to enable this using .NET interop COM method signature: HRESULT CSomething::put_IDispProp (IDispatch* obj) ..NET InvokeMember call: object[] args = new object[] { null }; // <-- passing null IDispatch* comObject.GetType().InvokeMember("IDispProp"...more >>

COM Inter-op Error Message
Posted by JerryWEC at 5/1/2007 2:23:18 PM
I'm getting the following message when debugging between VB6 and my COM Wrapper (.net)... The callee (server [not server application]) is not available and disappeared; all connections are invalid. The call may have executed. (Exception from HRESULT: 0x80010007 (RPC_E_SERVER_DIED)) This ...more >>

Deserialization in COM
Posted by Simon Osborn at 5/1/2007 12:00:00 AM
I am having problems deserializing an object in my namespace extension. I keep getting "unable to find assembly"! The assembly is referenced but still I get the error. Has anyone had a similar issue where they could point me in the right direction? Thanks, Simon. ...more >>


DevelopmentNow Blog