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 > august 2006 > threads for august 29 - 31, 2006

Filter by week: 1 2 3 4 5

COM & static member function
Posted by gk at 8/31/2006 11:17:09 PM
Hi, in a .NET class I wish to use from a COM client, I have a static member function "LoadFromFile" that returns an instance of that class: class Myclass : MyclassCOMinterface { static Myclass LoadFromFile(string file) {...} } since static members are not visible by COM, how can I e...more >>


C# Class using VB6 Interface incorrectly identifies parameter
Posted by Mike Sharpe at 8/31/2006 11:20:02 AM
Here's the breakdown: 1. My class is written in C# 2. It inherits an interface called AlfaBVIO._BVInput which looks like this via the Interop metadata: [Guid("B2332A7B-42C5-4828-8B2B-9D2BE8EFA3DD")] [TypeLibType(4304)] public interface _BVInput { [DispId(161080...more >>

excel NumberFormat AND localization
Posted by swayze at 8/31/2006 6:10:56 AM
Hi All, I wrote an app (c# 1.1 framework) that formats excel files generated from html. I am using numberFormat ("#,##0.00") on certain columns that display pricing. i am in Turkey but, I use XP pro with regional settings set to Canada. The computers that display these worksheets have local...more >>

Non deterministic bahaviour using PInvoke
Posted by Chucker at 8/31/2006 5:42:02 AM
Dear Community, I have a very strange error that started to occur two weeks ago. When I run an Application that worked without problems for nearly half a year now, there suddenly is one function which I am calling via PInvoke that sometimes fails. If this happens, I find one of the followi...more >>

How to effectively transfer a Structure or a collection of Structure to managed code?
Posted by dotNeter at 8/31/2006 5:32:48 AM
I mean, the only method, I wanna use to P/Invoke into unmanaged code and retrieve a pointer which point to a block of memory, is formed as below, [DllImport("stuffs.dll"), CharSet = CharSet.Ansi)]] static extern IntPtr GetData(); The returned value is just a pointer. The content of the memo...more >>

callback from C++ dll to C# function using delegate
Posted by CosminB [IXIA] at 8/31/2006 1:33:45 AM
I've posted this to MSDN forums also, but maybe I can get feedback from here too. Here it goes: --- Hi all, I've researched this matter for a couple of days now. I've seen samples of code, got them to work on small scale samples. The problem is that the final application is *critical* to our...more >>

IsWindowVisible always returns false when passed a Screensaver's preview hWnd, Why?
Posted by ThunderMusic at 8/30/2006 11:49:42 AM
Hi, I'm doing a screen saver. When it comes to display a preview, Windows sends a /p argument followed by a space and a hWnd... When I send this hWnd to IsWindowVisible((IntPtr)hWnd); I always receive false... my definition for IsWindowVisible is like this : [DllImport("user32.dll")] st...more >>

Mind Boggling Behavior
Posted by Shea at 8/30/2006 8:49:22 AM
[STAThread] static void Main() { ApartmentState x = Thread.CurrentThread.GetApartmentState(); MessageBox.Show(x.ToString()); // etc. } Brings up a most annoying dialog box with my current three least favorite letters in ...more >>



Struct vs. Class Performance
Posted by MLM450 NO[at]SPAM hotmail.com at 8/29/2006 11:09:54 AM
When passing data to an unmanaged DLL, is there much of a performance difference between passing a structure versus an object that is marshalled as a structure? Is there another option I have not thought of? Below is an example... Thanks! // Structure option internal struct MY_RECT { ...more >>

Will SysAllocString allocation be GC'ed
Posted by Peggy at 8/29/2006 2:10:15 AM
Hi I have an unmanaged dll which returns a BSTR* allocated using a SysAllocString on the unmanaged code. Now when this BSTR is returned to the Managed world, will the memory allocated to the BSTR be freed by GC or do I need to take care of clearing off the Allocated memory? Regards Pawa...more >>


DevelopmentNow Blog