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 >>
Don't see what you're looking for? Search DevelopmentNow.com.
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 >>
|