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

Filter by week: 1 2 3 4 5

COMException passing args by reference, fix causes another problem
Posted by mdsousa at 1/31/2005 6:41:01 PM
I converted an ActiveX control from VB6.0 to a Windows form in .NET for a Visual Basic program. There is a bug in the 1.1 framework that causes a COMException when you pass arguments by reference to functions of this object (http://support.microsoft.com/default.aspx?scid=kb;en-us;815633). ...more >>

Mapping with CreateProcess
Posted by Ed McAndrew at 1/31/2005 2:49:11 PM
I'm trying to map a network drive share in c# with: CreateProcess("net", @"use " + LocDrive + " " + Quotes + userShare + Quotes + " " + userPass + " /USER:" + userName, out exitCode, out output); Everything is right, and it works perfectly when the compiled executable is launched manually...more >>

Launching the .NET environment
Posted by Pete Davis at 1/31/2005 2:16:37 PM
First of all, I'm going to try to avoid going into a complete description of what we're trying to do as it would take a great deal of text to explain the reasoning and the actualy design. Essentially, we are going to have a launcher application in unmanaged C++ that's going to launch our .NET ...more >>

QueryInterface for interface ITypeInfo failed
Posted by Marc Tardiff at 1/31/2005 11:53:01 AM
We recieved the following error stack from an ASP.NET page written in VB.NET 1.1. I can't find a reference to this error, what could be the cause? We are calling into a VB6 object at this point of the process. Exception: QueryInterface for interface ITypeInfo failed. Stack: at Mic...more >>

COM+ Interop
Posted by SunnyM at 1/31/2005 11:03:04 AM
Hi, I am importing a COM object to my C# project. I use the 'add reference' option from the Solution Explorer. I have 10 enumeration in the COM IDL file and each one has its unique GUID. But in the C# project with I reference the object, it only shows 8 of them. Is there anything I am missing ...more >>

c# and delphi
Posted by was19 NO[at]SPAM gmx.de at 1/31/2005 8:09:23 AM
hi guys, I need to use a function in a c# dll from delphi. I have written a sample: <code> using System; using System.Data; using System.Runtime.InteropServices; namespace DelphiTest { public interface IDelphiTest { void getparam(string IN_Param, out string OUT_Param, string IN_...more >>

difference between InstallAssembly and Reasm.exe /tlb
Posted by Secret Squirrel at 1/31/2005 7:52:46 AM
Hi, What is the difference between what RegistrationHelper.InsallAssembly vs Regasm.exe /tlb does? They both seem to register the object in COM+ Catalog? They both generate tlb files? So what is difference? Jon Paugh ...more >>

No such interface supported
Posted by Sachin at 1/30/2005 10:31:03 PM
Hi, I am using a COM component from ASP.NET and am getting "No such interface supported" along with "InvalidCastException". Can someone please give some pointers? Thanks ...more >>



SMTP Server events handling
Posted by mehal.ua NO[at]SPAM gmail.com at 1/30/2005 1:58:03 PM
Hello, I'm try to handle some message from Virtual SMTP Server (on IIS, Wiindows XP Pro), and I know about MailMsg COM Object, but its empty. I can't understend how I can handle events from SMTP Service, can you help me ? Thanx. ...more >>

QueryInterface does not work for services, works for other applications.
Posted by sdaman29 NO[at]SPAM gmail.com at 1/30/2005 5:01:49 AM
hello, I've got a problem that can be more or less reliably reproduced. I've got a com object described in a c++ written com library. There's also an interop for this library. the object has two interfaces. as long as use the default interface, everything works fine, but when I cast to the othe...more >>

Is is possible to use VT_ARRAY in ExecWB to print custom footer?
Posted by A Miller at 1/29/2005 11:21:01 PM
The documentation[1] for ExecWB with IDM_PRINT describes 3 forms of pvaIn. The 3rd form is a VT_ARRAY, where the 1st two BSTR's specify a custom header and footer. I have not been able to get this to work. The printed document always uses the default header and footer. For example, Dim ...more >>

Server Busy Dialog Box
Posted by Joe at 1/29/2005 1:25:50 AM
When using a web service I currently have sometimes I get a dialog box "Server Busy", not that I mind being told that but I would like to delay it from coming up so quickly. Is there a setting somewhere for a timeout time for this dialog box? Thanks Joe ...more >>

custome COM Wrapper in .NET - Handling/exposing events
Posted by Sheikh Nabeel Moeen at 1/28/2005 5:48:07 PM
Hello, i'm writing a custom wrapper for TAPI 3 COM component to be used in .NET (C#). can someone please tell me whats the best way to expose events generated by the COM object as events in the .NET Wrapper so that clients using my ..NET wrapper can handle these events? Regards, Nabee...more >>

Interop with Emulator
Posted by baronics at 1/28/2005 4:18:04 PM
I've been writing a Win CE 5.0 app in C# and testing in VS 2003 with the "Windows CE .NET Emulator" as my target. As long as I stay within .NET, I'm fine. I just added code that calls an unmanaged function via System.Runtime.InteropServices. Even though my unmanaged DLL is loaded along wit...more >>

Delete a Computer Account from
Posted by S Garratt at 1/28/2005 4:21:03 AM
I can use DirectoryEntry.DeleteTree() to delete a Computer Account but when there's a problem, the error message always seems to be "Unspecified Error". I need to know whether I've got user credentials problems or non-existant objects. Reading around the problem, it seems that the implementa...more >>

calling ADSI objects from Web Application
Posted by johnny at 1/28/2005 1:15:02 AM
Hello, I got this weird problem. I have an intranet application that needs to communicate with Active directory. Authentication to Web application is done by means of active directory accounts. Now I have this code: DirectoryEntry objDomain = new DirectoryEntry("LDAP://rootDse"); string d...more >>

C++ Interop - Mixing unmanaged & managed worlds
Posted by Luis Fajardo at 1/27/2005 2:15:05 PM
I have a C++ (mixed .dll managed & unmanaged) to expose a C# class to the unmanage world. I'm creating an unmanaged method that calls a C++ managed method that forwards the request to my C# class. Traditional unmanaged code -> Unmanaged Wrapper -> Managed Wrapper -> C# Everything is worki...more >>

Calling functions from .NET dll from Win32 C++
Posted by Igor at 1/27/2005 12:22:10 PM
I need to call functions in the .NET assembly (dll) from an unmanaged application via winAPI calls (LoadLibrary...). I've found examples on how to modify the .IL code of an assembly so I can export the methods needed, but I have a following problem : Everything works fine when I use __stdcall cal...more >>

Issues with NetLocalGroupAddMembers and PInvoke
Posted by Brandon Langley at 1/27/2005 11:45:04 AM
I'm attempting to implement NetLocalGroupAddMembers via pinvoke. I want to be able to use either type as the member argument, whcih means using an intptr rather than a ref to a specific LOCALGROUP_MEMBERS_INFO structure. My pinvoke signatures: [StructLayout(LayoutKind.Sequential, CharS...more >>

Encapsulation - Using Word On The Server
Posted by msnews.microsoft.com at 1/27/2005 10:25:35 AM
I am going to use Word on the Server. I am aware of all the implications to this, but I am only using Word for printing. There does not seem to be any tool yet to print Word documents without the loading of Word. I am using Dot Net to talk to Word. Does anybody have recommendations for the best w...more >>

Any reason NOT to strong-name an assembly?
Posted by Tony Jones at 1/27/2005 8:46:28 AM
Can anyone think of a reason why a 3rd party vendor writing .NET components would NOT strong name their assemblies? What harm does adding a strong-name to assembly present - I would think none whatsoever. Strong-naming the assembly should benefit the end user just in case he/she wants to refe...more >>

Circular conflict using ADOMD in Visual Studio
Posted by Andrew Wiles at 1/27/2005 3:55:03 AM
Hi I have a project which uses ADOMD (Version 2.8.0.0) as a reference. This automatically includes the ADODB interop assemly as well as ADOMD. When I build this project I am getting a warning message.... "Warning: The dependency 'Interop.ADODB, Version 2.7.0.0, Culture=neutral in Projec...more >>

Receive byte array of unknown length?
Posted by Tom Glen at 1/26/2005 6:21:56 PM
I am calling an unmanaged funtion [1] like this [2] and it works but I am worried that I should be freeing memory allocated to the IntPtr - should I, and if so, how? [1] DWORD GetID(PBYTE* ppbID, LPDWORD pcbID); [2] [DllImport(dllName)] private static extern uint GetID([Out] out IntPtr ...more >>

Struct signature?
Posted by Tom Glen at 1/26/2005 10:59:51 AM
Would someone help me figure out the signature for this struct [1]? Thanks. [1] typedef struct _DATA { WCHAR wzName[24]; WCHAR wzKey[30]; VERSION version; BYTE hash[76]; } DATA, *_DATA; enum VERSION { A = 1, B = 2 }; ...more >>

Shared Add-In - COM Shim - MSI Error
Posted by Rob Lorimer at 1/26/2005 10:31:14 AM
The setup project for my COM Shimmed managed assembly builds OK but displays an error dialog when the installer is run: Module C:\...Tool.Shim.dll.manifest failed to register. HRESULT -2147024703. Contact your support personnel. If I click to continue installation, my add-in appears to be wo...more >>

problem with ITCallInfo.CallState when dialing to a phone.
Posted by Nadav at 1/26/2005 1:47:03 AM
Hi Everybody, I've started to learn TAPI and I'm trying to dial to a phone (eventually I wan't to send a voice message to a phone, but right now I can't even dial properly). I'm using C# & visual studio 2003,and I imported the TAPI3 com object (TAPI3Lib) into my project. This is the code I...more >>

FindNextPrinterChangeNotification and pPrinterNotifyInfo confusion
Posted by kalbakk NO[at]SPAM gmail.com at 1/26/2005 12:22:12 AM
I'm sorry if this is a regular question, but I have found no answer allthough I've been searching for an answer a long time now :) I have declaration like this [DllImport("winspool.drv", EntryPoint="FindNextPrinterChangeNotification", SetLastError=true)] public static extern int FindNextPrin...more >>

MSHTML.dll problem please advice its urgenttttttttttttttt
Posted by Kiran at 1/25/2005 5:49:04 PM
I am automating data entry and retriving from IE 6.0 SP1 using MSHTML.dll in VB.net but this works fine on a few machines and gives errors like object reference not set in others. Please Advice Kiran...more >>

.NET / Excel Hell
Posted by pearsons_11114 at 1/25/2005 4:59:03 PM
And I thought COM to Excel was a pain. Having eventually discovered the tech note that lays out the idiom for referencing Excel COM objects from .NET, I'm still getting the familiar memory errors on program termination under certain circumstances. The problem seems to revolve around passing E...more >>

msxml2.dll
Posted by Steve Covert at 1/25/2005 4:31:56 PM
I have a VB.NET app which uses the msxml2.dll through Interop. The application works fine on my development PC, but when installed on a user machine, the program fails. When a new xml document is created, the resulting error message says that the com object is "not valid" or is "not register...more >>

DSOFRAMER control in ASP.NET
Posted by Madhu Rai via DotNetMonster.com at 1/25/2005 10:48:52 AM
I have used DSOFRAMER control in VB.NET for opening a word document in window form. But I am unable to do the same thing in ASP.NET. Can any one suggest me that how to open a word document in ASP.NET. Opening a word document in VB.NET & ASP.NET have any difference. -- Message posted via http://...more >>

compact framework interop: passing c++ structs
Posted by dvanderboom NO[at]SPAM panatrack.com at 1/25/2005 7:48:48 AM
How would I pass a structure like this by reference through an interop call? I keep getting a NotSupportedException on the call that takes a pointer to this structure as a parameter. The DLL I'm calling was created by someone else in C++ and it's not a COM object. The C++ definitions: typ...more >>

pass VARIANT parameters by reference
Posted by An Jiye at 1/24/2005 11:35:02 PM
Recently, I met a problem when using ActiveX control in VB.NET. The control is created by MFC, it provides a method which needs a parameter of type VARIANT *, so the parameter must be passed by reference. But under .NET, this will cause a System.Runtime.InteropServices.COMException. I hav...more >>

Strong Name Microsoft.ApplicationBlocks.Data.dll
Posted by Aberon at 1/24/2005 7:05:03 PM
Can anyone give me specific instructions on how to assign a strong name to microsoft.applicationblocks.data.dll. I keep getting errors when I try...more >>

Advice Needed
Posted by Robert Porter at 1/24/2005 6:55:40 PM
We are in the process of porting a series of applications from VB6 to managed code. Our programs automate via COM a third party application. In order to minimize the impact of this effort we are porting small portions or components one at a time, so for a period we will be living with Interop. A...more >>

unable to set a new windows call back procedure
Posted by Danya Samuel via .NET 247 at 1/23/2005 9:31:44 AM
Hi, I am new to vb=2Enet and am try to migrate a screensaver= application written in vb to vb=2Enet=2E To capture the key board= and mouse movements across the screen, i have a hook dll written= in vc++=2E I have a windows call back procedure which used to= process the key board and mouse...more >>

null reference exception on DLL call in C#
Posted by Dan Mehlman via .NET 247 at 1/23/2005 9:29:12 AM
I'm trying to implement calls to an existing C-based DLL within a C# program. It sounds straightforward enough, but any calls to the extern functions produce a NullReferenceException. My code looks like this: [DllImport( @"e:\jbhexe\sscam.dll", EntryPoint="BAM_calcs" )] public static extern ...more >>

Marshalling WCHAR[] struct member?
Posted by Martin Müller at 1/22/2005 2:09:02 PM
Hi! Perhaps somebody can help me... I'm trying to create COM interface and struct declarations in C# to access parts of SAPI 4.0a. The problem is that several structs look similar to this: typedef struct { // srw DWORD dwSize; DWORD dwWordNum; WCHAR szWord[ ]; } SRWORD, *PSRWORD...more >>

Good refs/Books for intermediate level IJW interop
Posted by _BNC at 1/22/2005 3:58:48 AM
I know that Richard Grimes' book on Managed C++ is probably the most complete ref on using managed/unmanaged C++ as a bridge to C#. But I'm missing pieces here and there. I'd like to find books and references that ramp up more gradually. I need to fill in blanks in my knowledge of Marshalin...more >>

Win32 dll from C#
Posted by Ricci Hammond at 1/21/2005 7:31:30 PM
I have the header file for an old dll I need to use from C# : #define API_NAME_SIZE 30 #define API_COMMENT_SIZE 30 typedef struct { unsigned long a_reference; char state; char name[API_NAME_SIZE+1]; char comment[API_COMMENT_SIZE+1]; } api_a_info_type; typedef struct { ...more >>

Signing an interop assembly
Posted by Friedrich Fröhn at 1/21/2005 6:51:34 PM
Hi! I want to add a strong name to my class library which depends on a COM Component, for which the interop DLL is automatic build. But the compiler always yells "Referenced assembly does not have a strong name" How, can I sign this automatic build interop dll ? Johnny ...more >>

Using UCOMIStream
Posted by Chris Puncher at 1/21/2005 2:17:31 PM
I need to be able to pass streams across the Interop boundary. Using the article http://support.microsoft.com/default.aspx?scid=kb;en-us;321695 I can call into and ATL COM object that has a method STDMETHODIMP CSimpleObj::GetUnmanagedData(IStream** ppData) from .NET using the following C...more >>

how to stop the "password protected" dialog box
Posted by Andy Fish at 1/21/2005 11:11:58 AM
Hi, I am automating ms word 2003 through .Net office interop, and my app is running on an unattended server. If I try to open a password protected document, word pops up a dialog box asking for the password. Obviously since the machine is unattended, there is nobody to press cancel, so m...more >>

Union of structs - TypeLoadException
Posted by Jason Cartwright at 1/21/2005 9:26:05 AM
I have a union of structs that is returned from an unmanged C++ API. Everything works fine until I add a specific type of struct [EvEndBitInfo] as a member of the union. I know you can't mix value and reference types in the same union, but I don't see the conflict because I believe all members o...more >>

Issues with making calls to an MFC dll from c#
Posted by stu at 1/21/2005 8:13:41 AM
First I want to check and make sure that I can call non-system dlls and MFC dlls at that. Assuming that I can, I've been getting an EntryPointNotFound exception for the follow code: C# calling code... [DllImport("pptcontroller.dll")] public static extern int PPT_Start(string PPTFileName); ...more >>

Native Com to .Net not releasing the dll
Posted by Travis Rogers via DotNetMonster.com at 1/20/2005 10:52:38 PM
We have an application written in VC++ 6 which uses late com binding to execute methods in dll's dynamically based upon registration information in a database. This app is affectionately know as "the engine". We are moving to .net and at this time don't want to rewrite the engine; however, we wa...more >>

How to test if Microsoft Excel is installed?
Posted by Mansi at 1/20/2005 9:09:01 PM
I'm trying to automate excel from visual c#. One thing I need to be able to test is if excel is even installed on the target machine and what version of excel is installed on the target machine. Is there a way to do this via c# code? Thanks. Mansi...more >>

Debugging question
Posted by Daryn Kiely at 1/20/2005 5:23:02 PM
Hi, I have an unmanaged DLL that I have written a managed wrapper around, however I am getting intermitent crashes where it seems like the heap has been corrupted. My theory is that a garbage collection has moved something that I didn't expect to be moved. I have scoured the code and have...more >>

Exchange OnSyncSave Event in C#
Posted by David A. Coursey at 1/20/2005 9:01:02 AM
I am making an event sink that will recieve the mail object, process it, and then delete it. Is my understanding correct that the OnSyncSave event happens in memory before there is any disk activity? I would really like to avoid disk access if possible. Thanks dave...more >>

COMException in VB.Net Windows Service
Posted by Frank at 1/19/2005 9:37:04 PM
Hi All, Am having a problem trying to receive events from a COM object when the VB.Net program is running as a Windows Service. The same code works fine when running as a Windows Forms app. I can create an instance of the COM object, call methods and set properties, but when I call the m...more >>


DevelopmentNow Blog