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

Filter by week: 1 2 3 4 5

How can .NET replace COM?
Posted by Robert Wehofer at 8/31/2004 4:27:37 PM
Hello! I would like to know, how .NET could replace COM? How is it possible? Imagine an application, which is a COM server, where a client could get informations or call functions (e.g. I would like to know the name of the current opened project in the application). The client has to referen...more >>


COM Interop events leak
Posted by Rupert Curwen at 8/31/2004 2:41:04 AM
This is probably old news, but I believe that the COM interop is leaking. I have a C++ COM server class (in process) that creates a thread, initialises COM for the thread, and then repeatedly calls an event method that has no parameters or return value. On the .NET side, in C#, the event han...more >>

Issue: Queued Component and Marshal.ReleaseComObject
Posted by Invalidlastname at 8/30/2004 6:36:24 PM
Hi, We used .NET EnterpriseServices Queued components in our application to = for certain asynchronous processes (code fragments was attached) However, we found out that the "Objects", "Activated" counts in the = Component Services MMC are growing constantly. The application is running on Windo...more >>

Missing full screen displayed in an Excel File
Posted by Nancy. at 8/30/2004 9:55:45 AM
I have used the following example from Microsoft to create this file. However when I double click on this file from the explore to open it, it is displayed with no default worksheet. In order to do this I have to click on View then Full Screen every time I want to open this excel. How ca...more >>

Getting Add-Ins to load at startup
Posted by ContactCortes NO[at]SPAM hotmail.com at 8/30/2004 9:31:33 AM
I managed to create a sample Add-in for Excel with a toolbar. This was painful requiring me to try all kinds of tricks until finally adding Office.dll to the Global Assembly Cache in my setup project did the trick (I discovered this by catching all Exceptions in the debugger and figuring out th...more >>

COM Interop and memory leaks
Posted by Dmitry Nalivkin at 8/30/2004 7:44:28 AM
Good morning. I have a next problem: I wrote an asynchronous protocol handler in VB.NET. Another my program in VB.NET installs it as temporary handler, creates forms with WebBrowser control, and navigates to URI's handled by my handler. I encountered continuous memory leaks while navigating ...more >>

C# dcom component
Posted by mememe at 8/29/2004 10:25:09 PM
I have created a C# library, and it registers with COM just fine, I have created another app that calls it using COM and it appears to work. My only problem is that I have to use DCOM to call this library. I have checked dcomconfig and my component is not there, not as a guid and not by name....more >>

Shell Namespace, ShObjIdl.idl, OLE-Wrapper
Posted by Roland Berktold at 8/28/2004 6:52:03 PM
Hi, I have to deal with the Shell-Namespace - should be very easy, because the API is implemented via COM-Interfaces :-)) In my old C++ code I ask for a IShellFolder calling ::SHGetDesktopFolder(...) and from then I work only with the Shell-COM-Interfaces. OK, I can call SHGetDesktopFold...more >>



GetCurrentThread returns null
Posted by Claes Bergefall at 8/27/2004 11:33:57 AM
I'm trying to call the GetCurrentThread API function from a managed C++ app, but for some reason it always returns a null handle?! And calling GetLastError (or Marshal::GetLastWin32Error) returns different values depending on where I put the code. For example: The following is the code that...more >>

Interacting with DDE Server suggestions ?
Posted by ciaran NO[at]SPAM insero-technologies.com at 8/27/2004 7:58:04 AM
I'm working with a company and I desperately need to be able to connect to their DDE server. My background is .NET. Any one got any suggestions on where to start as this is my first time using DDE?...more >>

Interop/Automation on Webserver
Posted by holysmokes99 NO[at]SPAM hotmail.com at 8/26/2004 5:25:16 PM
Hello, I have windows forms application that I build in VB.Net that uses Statistica (a statistics program) via an interop wrapper. As a stand alone app it works fine. Now my supervisor would like this to go to the web. Basically, I would be happy with just Statistica creating gif images accor...more >>

OLEAutomation Interop with object []
Posted by Phil Wilson at 8/26/2004 2:16:19 PM
There doesn't seem to be an obvious (to me anyway!) way to have an interface in .NET that passes an object [] such that it can be used by (say) VBScript. In other words, given a method: [ComVisible(true), GuidAttribute("66F12379-0C8F---------- etc")] [ClassInterface(ClassInterfaceType.AutoDi...more >>

problem crashing in callback to C# method from win32 dll
Posted by Eric Gou at 8/26/2004 12:43:11 AM
I encountered a problem when I used the .NET P-Invoke and C# delegate to make the interoperation between a win32 dll and a C# program. the flow is very simple and can be described as follows: step 1, The C# program calls a unmanaged function "SetCallBackAddress" in the win32 dll to set it...more >>

Missing interface after converting an IDL file to a TLB file (type library) with Midl.exe
Posted by style at 8/24/2004 9:08:27 PM
Maybe one of you cracks knows this... After I converted ShObjIdl.idl (found in C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\Include) with Midl.exe (found in C:\Program Files\Microsoft Visual Studio .NET 2003\Common7\Tools\Bin), in the resulting TLB file the interface IPer...more >>

Wrappping ANSI C code to C#
Posted by Arek Janicki at 8/24/2004 5:33:15 PM
Hello, I'm trying to wrap ANSI C library (MGF 3D file format parser) to my application written in C# and I have a little problem... I have currently 3 projects: - one with C source which compiles into *.lib file - a wrapper witch uses the .lib file (managed C++ library) - tester (managed C++...more >>

C# & Word: Best way to invoke AllowBreakAcrossPage on very large table
Posted by BBFrost at 8/24/2004 3:51:01 PM
I'm using the Office XP PIA's VS Net 2003 ..Net Framework 1.1 Office XP (2002) I'm extracting data from a database and formatting it into a word document. The app is working great thanks to a lot of help from this group. I'm now in the process of tuning and responding to user comments. O...more >>

How to use SCardTransmit in C# (Pinvoke) ? winscard.dll problem
Posted by Windson at 8/23/2004 7:23:02 PM
Hi, I am working with a PC/SC card reader now. I use Pinvoke to use winscard.dll raw APIs. I finished SCardEstablishContext, SCardListReaderGroup, SCardListReaders, SCardConnect, SCardDisconnect, SCardReleaseContext and SCardFreeMemory. But I was stopped by SCardTransmit. My codes: public s...more >>

Short[6] to string
Posted by Brian Reed at 8/23/2004 2:55:01 PM
I have a fixed length short[] that contains unicode characters (was a wchar[] array in IDL). What is the quickets way to convert to a string? The Decoder classes work off of byte[], not short. Is the only way to convert character by character or to transalte the short[] to a byte[]? Than...more >>

C# COM call with Optional Parameter
Posted by Binder at 8/23/2004 9:46:15 AM
I am trying to call an ActiveX DLL written in VB6 from my C# app. The function call has a single parameter that is declared optional. How do I call it from C#? The VB function is: Public Function GetTasks(Optional ByVal lngUserCode As Long) As ADODB.Recordset Thanks, Rg ...more >>

PInvoke question using .NET bitmap and SetDIBitsToDevice
Posted by John Milligan at 8/22/2004 10:47:01 AM
Hi All! I asked this in the drawing form, but no one replied. I am working on a program that is written in C# but uses a Win32 API function call SetDIBitsToDevice from gdi32.dll (for performance reasons) in the Panel View's paint handler to do the painting. It works great when I supply n...more >>

Sendmessage EM_GETLINE issue
Posted by Dave Londeck at 8/21/2004 11:35:09 AM
Why do I get a zero return from the following function??? I am usting VB ..NET 2003 Public Declare Function SendMessage2 Lib "user32" Alias "SendMessageA" _(ByVal hwnd As Integer, ByVal wMsg As Integer, _ByVal wParam As Integer, ByVal lParam As StringBuilder) As Integer Public Function Rea...more >>

Beta Testers Invited - Xavier's DNS Client .NET Component
Posted by Xavier Jefferson at 8/20/2004 4:23:28 PM
Hi all, I'm in the beta stage of distributing an inexpensive .NET component with which to do DNS queries. Looking for suggestions and to see how well this performs in some other-than-my-own real world situations. The current beta will run until 9/3/2004 after which I'll be selling this item ...more >>

Memory usage with DSO
Posted by MikeK at 8/20/2004 8:37:03 AM
I am having trouble with the dotNet_WorkerProcess growing until it crashes and respawns itself. The app uses a webService to process OLAP cubes thru DSO. To understand what is going on, I have simplified it into a test program that repeatedly connects to OLAP and processes a cube. Although I h...more >>

Object reference not set to an instance of an object
Posted by Doru at 8/18/2004 4:27:01 PM
Hi all, I have a windows service that is calling a function from an unmanaged dll. The C++ declaration is : (char *) getxmlRequest(const char *szHostName, unsigned short usPort, const int nNetTimeout, void *xml, int size); My C# declarations are: [DllImport("xmlinterop.dll", EntryPoi...more >>

How to treat GetEnumerator(); from C++ COM's IEnumVARIANT
Posted by Juan Dent at 8/18/2004 2:45:02 PM
Hi, I have an interface in C# like so: public interface ICollectionJD { // support for enumeration [DispId(-4), Description("property _NewEnum")] IEnumerator GetEnumerator(); } I am implementing a wrapper for this managed code in C++, where I declare the inte...more >>

C# & Excel: How to set all cells w/in worksheet to 2 decimal places i.e. 234.56, 1.00, 0.00, etc
Posted by BBFrost at 8/18/2004 1:31:32 PM
For some reason my users don't appreciate seeing 0.1E-08 instead of 0.00 ... can't understand why. :-) I'm using the Office XP PIA's VS Net 2003 ..Net Framework 1.1 Office XP (2002) Thanks in advance! Barry in Oregon ...more >>

Getting System Events
Posted by Alireza Haghshenass at 8/18/2004 10:38:03 AM
Hi Evenrybody, I just wanted to know whether there is a way to get system events(, for example when a process starts or when a process ends , I want an event to be raised whithin my program to get the started or ended process or any other events in the system) or not? I just need something like...more >>

COM vs .NET
Posted by Boris Condarco at 8/17/2004 10:18:10 PM
Hi gurus, Does anyone can point me to a document about the differences between COM and ..NET? thanks in advance Boris. ...more >>

Exposing WinForm Control (C#) as an ActiveX-Control
Posted by Andreas Stürmlinger at 8/17/2004 9:28:32 PM
Hi NG, does anybody know how to expose an WindowsForms Control written in C# as an ActiveX-Control ? I created a C#-Control, gave it the "[ClassInterface(ClassInterfaceType.AutoDual)]" -Attribute and get a (correct?!?) Typelib. But I cannot activate the control in C++ (what is my need) ...more >>

Scheduling a .NET component
Posted by arcvonz at 8/17/2004 6:13:59 PM
I have a.NET component that needs to be scheduled to run programmatically. How can it be done, any interface to Task Scheduler from .NET? Thanks, Arc ...more >>

Calling VB6 component that has ParamArray parameter
Posted by Bruno Miousse at 8/17/2004 4:19:50 PM
I am trying to invoke a COM component (written in VB6) which accepts parameter of ParamArray data type. What would be the proper syntax in C# for passing ParamArray in VB6? Thanks. ...more >>

DirectoryServices & COM
Posted by Bill Belliveau at 8/17/2004 3:29:01 PM
Hi all, Trying to use some unmanaged functions for DirectoryServices. I’m not very familiar with COM interoperability, but here is what I’ve got so far. Code: --- [ComImport] [Guid("C8F93DD0-4AE0-11CF-9E73-00AA004A5691")] [InterfaceType(ComInterfaceType.InterfaceIsDual)] internal in...more >>

P-Invoke + IJW Failure
Posted by Leon Gorbaty [Bentley] at 8/17/2004 2:07:02 PM
I am seeing, to say the least, some very strange behavior when a C# module is making two very closely coupled interop calls, one through P-Invoke, and the next to a MCPP module that turns around and calls a native function that it linked with. The results include call stacks that appear to or...more >>

C++ to C#
Posted by Mike Carr at 8/17/2004 1:02:04 PM
I know very little about COM, please excuse me. I am trying to convert = a c++ COM app to C# and I am having problems. I cannot change = FactoryExecMarshal. My C++ client code #import "FactoryExecMarshal.tlb" no_namespace ITestExecPtr m_pTestExec; long hr =3D m_pTestExec.CreateInstance...more >>

Type.GetMethod returns null?
Posted by Rory Plaire at 8/17/2004 12:56:47 PM
Greetings, Perhaps someone has seen this and can give me a clue: I'm loading a COM Automation Object (MSAccess) with late binding to avoid having to deal with multiple versions. Here is the code: //-----------------------------begin code Type accessType = Type.GetTypeFromCLSID(new Guid(...more >>

EnumWindows
Posted by Guido Kraus at 8/15/2004 3:51:01 AM
I have written a Windows service in C# which can start other EXE files in a new process, e.g. protected override void OnStart(string[] args) { Process p = new Process(); p.StartInfo = new ProcessStartInfo(@"C:\Program files\Test\Worker.exe", ""); p.Start(); } Worker.exe is a ...more >>

Marshal C# String to ActiveX DLL
Posted by Binder at 8/13/2004 6:04:21 PM
I have an VB ActiveX DLL with a function the receives a string parameter. I want to call this function from C#. I made a reference to the DLL in my VS 2003 project. DLL Function -------------- public function ShowMsg (strIn as String) msgbox strIn end function C# Function Call ----...more >>

Class Inheritance
Posted by Christina Huang at 8/13/2004 5:10:02 PM
I have a base class B, an inherited class A written in C#. As recommended way of interop, I create interface for both B and A. I create type library for B and A by regasm. I need to use A's function from COM, but I get an E_NOINTERFACE error. Please help! Is this a good way of doing it? ...more >>

Wininet InternetSetOption and proxy auth
Posted by Federico Sasso at 8/13/2004 9:30:30 AM
Hi all Thist of all, sorry for X-posting, but the question involves both wininet and C# interop ;-) I wrote a simple FTP client in C# using p/Invoke over Wininet.dll API functions. It works fine, as it transparently passes ISA proxy/firewall when this doesn't require authentication. ...more >>

Pinvoke RAS calls
Posted by Frustrated Pinvoker at 8/13/2004 4:03:02 AM
I am try to GetProjection Info in XP Below are my definitions, but Method call keeps returning RAS error 632(Invalid structure size) can anyone help? [DllImport(RASAPIDLLName,CharSet=CharSet.Auto)] public static extern uint RasGetProjectionInfo( [In] IntPtr rasHandle, RasPr...more >>

ASP.NET UnManaged Memory Shoots Up,
Posted by hichetu NO[at]SPAM gmail.com at 8/13/2004 1:59:41 AM
Hi All, We have a web-application in asp.net that interacts with legacy code written in COM. The memory usage in aspnet_wp.exe increases every sec and never reduces. Using the .NET performance counters, we found that unmanaged memory was 90% of the total private bytes of aspnet_wp.exe. We s...more >>

Can .NETCF and J2ME interop?
Posted by Derrick at 8/12/2004 1:48:19 PM
I've been developing projects - namely user controls - for the Pocket PC using Microsoft's .NET Compact Framework. Someone recently asked me if it is possible to use a control in a Java (for PPC, obviously) program. I know you can make .NET controls work in Java through COM and JNI on the PC, b...more >>

Remove Type Library Reference
Posted by Binder at 8/12/2004 1:15:08 PM
I added a project reference to an ActiveX DLL in my C# project. I now need to remove the reference from the project. How do I accomplish this task? Thanks, Rg ...more >>

WMI Extension Installation Error
Posted by hagmur at 8/12/2004 1:03:03 PM
I have VS 2003 Enterprise Architect installed (7.1.2346) but when I attempt to install the Management (WMI) Extensions for VS .NET 2003 Server Explorer I receive a message indicating that VS 2003 must be installed. How do I get around the error?...more >>

JMS-style Topics
Posted by Jonathan Allen at 8/12/2004 12:32:00 PM
The .Net program I am writing needs to use JMS-style topics. Is there a way to make a MS Message Queue work like a JMS Topic. Or is there a way to access a JMS Topic (preferable WebLogic 8) from a .Net application. Requirements: Multiple listeners on one queue. All listeners get all m...more >>

How to: Object to pointer/handle and pointer/handle to Object
Posted by Johann at 8/12/2004 12:19:20 PM
Hi, I'm using message queue and would like to know how do I return a IntPtr to the MessageQueue object I created in IntPtr MessageQueueCreate(string name){ MessageQueue mq = new MessageQueue.Create(".\Private$\"+name); return ?? .... } and How do I use that IntPtr to get back the object ...more >>

How to import function from unmanaged DLL that returns class pointer
Posted by Eskieboy at 8/12/2004 11:42:03 AM
I've seen lots of examples on how to import functions dealing with simple user-defined structs. Can someone point me to a sample that shows how to import something like the following: class CMyClass { public: CMyClass(); CMyClass(int A, int B); CMyClass(const char* S); ~C...more >>

tblimp warning iUnkown: _HiddenInterface
Posted by Donmn at 8/12/2004 4:13:01 AM
Hi I am getting the warning: TlbImp warning: Type library importer has encountered an interface not derived from IUnknown: _HiddenInterface. when perfomring a manual import using this command line: tlbimp myvb.dll /out:myvb_COM.dll /keyfile:myvb_com.snk /asmversion:1.0.0.3800 It seems t...more >>

interop overhead versus sockets?
Posted by markbuxbaum NO[at]SPAM hotmail.com at 8/11/2004 6:50:31 PM
Hi All, I am considering using named pipes to communicate between applications on a single machine. (single server, multiple clients) As .NET doesn't include support for named pipes to my knowledge, an implementation would necessarily involve using managed/unmanaged code transitions and mar...more >>

What happened to Properties in Access.ApplicationClass in Access 2003 ?
Posted by Konrad Rotuski at 8/11/2004 3:47:11 PM
I am developing vb.net app that works with MSAccess COM Object library, i generated RCW from VS.NET (Interop.Access.dll) on system with Access 2000 installed and it works on systems with Access 2000 and Access XP, however when i try to run it on machines with Access 2003 installed i'm getting In...more >>


DevelopmentNow Blog