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 > december 2003

Filter by week: 1 2 3 4 5

Interop Environment Variables Problem
Posted by Ali Hon-Anderson at 12/31/2003 1:42:42 PM
I have a C# web application that is "passing parameters" to a DLL via environment variables (that is how the DLL was written to receive arguments). The problem is that the DLL seems to be taking the first set of environment variables I set in my C# code and saving them. Subsequent calls to the D...more >>


calling LSALookupNames2 from C#: NullReferenceException
Posted by Lukas Alber at 12/31/2003 9:28:53 AM
Hi I'm trying to call LSALookupNames2 from C# and get a NullReferenceException. I assume that I made a mistake declaring LSALookupNames2 or LSA_UNICODE_STRING The LSAOpenPolicy and LSAFreeMemory calls work fine (I got most of the code from another post to this newsgroup) Can anyone tell ...more >>

Windows service and messages
Posted by Brent Horine at 12/31/2003 9:18:25 AM
I need to work with an unmanaged DLL for a socket based wireless communication API. I'm wrapping it with a combination of unmanaged and managed C++ calls and running everything in a .NET Windows Service. When it receives a message over the network, it posts a WM_SOCKET_STATUS message that I ha...more >>

Connection to remote COM object works in Windows Forms application but not in ASP.NET application
Posted by José Ramón Rodríguez at 12/30/2003 3:00:31 PM
Hello there, The following code causes "Specified cast is not valid" exception when line 3 executes inside an ASP.NET application. I have tried this with several components. Exactly the same code works if connecting locally (i.e with localhost) and it always works from a Windows Forms applic...more >>

how to automate excel from Microsoft Visual C#....
Posted by Giorgos Zagouras at 12/30/2003 12:56:13 PM
Hello every one..... i have a windows application an i am trying to get some data from SQL Server and export them to Excel. I am using Windows 2000 and Excel XP. i followed the instructions from MSDN but i get the following error message "Old format or invalid type library" The example code...more >>

how do I debug my C# component when calling it from VC++ application?
Posted by Linda Chen at 12/30/2003 10:32:31 AM
I have created a C# component and successfully converted it into tlb file. Is it anyway to debug my C# component when calling it from my VC++ application without opening VC++ project from .net ide? Thanks. Linda chen...more >>

Web COM+ interop results in out of memory errors
Posted by ShikariShambu at 12/29/2003 4:54:39 PM
Hi All, I have a web site that makes calls to components hosted in COM+. Recently we started seeing some out of memory errors on the web site. On further analysis we found that the number of open handles on a COM+ package keeps going up and the memory used by aspnet_wp goes up. However, t...more >>

COM Automation - Simple port from VB failing
Posted by Mike Miller at 12/29/2003 3:47:49 PM
The following code starts an application for automation in VB: Dim IMFAObj As Object Set IMFAObj = CreateObject("Famas2000.Application") The VB.NET code is as follows: Dim IMFAObj As Object IMFAObj = CreateObject("Famas2000.Application") The VB.NET code starts the applica...more >>



URGENT: COM Interop BUG!?
Posted by Nadav at 12/29/2003 10:26:38 AM
Hi, Introduction *************** I have a system build of a collection of 'Native COM objects' and '.NET = COM interop' objects, all of the COM objects are managed through a = 'Native COM' layer, this layer manage the underlying COM Objects and = upon request, provide a pointer to those obje...more >>

Excel 11.0 object library conflict
Posted by Ramon at 12/29/2003 5:00:35 AM
I would like to import some Excel data and are using Excel 2003 on my development system. The workstations using this application have Excel 2000 installed. Because of this the Excel 11.0 object reference is not working on the workstations. I tried to include the Excel 9.0 object library b...more >>

throw new COMException("SayA error", 9000); does not get err.number:=9000 in vb6....
Posted by Jim Hsu at 12/29/2003 3:31:37 AM
how do I pass the specific error code to vb6 via COM Interop? throw new COMException("SayA error", 9000); does not work for me, there is even no error raised in the vb6 com client... ?? please help -Jim "using System; using System.Runtime.InteropServices; namespace aa { ///...more >>

Pass class reference
Posted by John at 12/28/2003 7:26:52 PM
Hi I open a word document from my vb.net app. Now I want to pass reference to one of the classes in my vb.net app to word so it can access procedures in the vb.net class. How can I pass the class reference to word from a vb.net app? Thanks Regards ...more >>

Passing value to word
Posted by John at 12/28/2003 2:46:37 AM
Hi How can I do this from within a vb.net app; 1. Create a word document from a word template and, 2 Pass a value to a variable defined within the document's VBA module? Thanks Regards ...more >>

Is this possible too?
Posted by John at 12/27/2003 3:36:48 PM
Hi Is it possible to add a com class to a vb.net exe app so other com apps can interact with the vb.net app? Thanks Regards ...more >>

Exposing vb.net procedures
Posted by John at 12/26/2003 1:09:37 AM
Hi How can I expose procedures (function or sub) in my vb.net app to vba in word? Thanks Regards ...more >>

Calling back vb.net app
Posted by John at 12/25/2003 9:45:24 PM
Hi I am opening word from my vb.net app. Is there a way to call a procedure in the vb.net app from a word macro? Thanks Regards ...more >>

System.Runtime.InteropServices.COMException: Object variable or With block varia
Posted by PRenukdas at 12/24/2003 12:28:48 AM
Hello, i am trying to use a com component in an ASP.NET application. But it gives me an error as follwos: "System.Runtime.InteropServices.COMException: Object variable or With block variable not set" i used the COM file thru ASP and that worked very well. but the same file i cannot access ...more >>

Registration-Free COM Interop...
Posted by Prem at 12/23/2003 1:02:42 PM
Hello, Is there anyone who has worked on Registration Free COM Interop? I am looking at communicating with a COM Component from a .NET application without registering it. Thank you, Prem ...more >>

exception: Couldn't get an IUnknown from GetObjectInterface we expected
Posted by Pankaj at 12/23/2003 1:21:05 AM
Hi, I have developed the a class in C# using .Net framework 1.0 SDK which is derived from ServiceCompnonent. This class is hosted in IIS 6.0 and OS is Windows 2000 profesional. Some time when server is too busy I got an exception that "The run-time environment has detected an inconsistency in ...more >>

Problem using C# dll via COM Wrapper from Access
Posted by gregor.brust NO[at]SPAM chips-at-work.de at 12/23/2003 12:30:11 AM
Hi, I have a problem using an COM-Object from Access (tested with Office 2000 and XP). The VB Code calls a function in an C# dll via COM Wrapper. This function opens a Dialog and returns 3 values. The same Code works fine when called from a EXCEL Sheet-VB. In Access VB a Error "wrong Par...more >>

How to add a strongname key to a assembly created with ilasm.exe(Intermediate Language) or to an already made DLL?
Posted by port_branco NO[at]SPAM hotmail.com at 12/22/2003 10:47:00 PM
How can i accomplish this? I want to be able to put a DLL of mine in the GAC(It must have a STRONG name) but the following command is not working: ilasm "my_il_file.il" /DLL I already tried to: ilasm "my_il_file.il" /DLL /KEY="key_file.txt" but it still didn't work Could anyone enlighten ...more >>

unsigned char* vs StringBuilder
Posted by Andrea at 12/22/2003 10:57:50 AM
Hy I have a litle problem : I have to invoke a function in an unmanaged dll (writen in C) from C# ------------------------------------------------ int string_modify(unsigned char* myparameter) -------------------------------------------------- how to declare this function in C# ? I tr...more >>

Use old Fortran dll in .Net
Posted by sara at 12/22/2003 8:18:36 AM
I have one function I'd like to call in this old dll. I believe I am calling it correctly, because of the errors I am getting, but it is not working. The funtion takes these arguments: Inputs: NOPRT - CHAR*1 L - Integer MILGRD - Char*(*) ISQR - Integer Outputs: XLAT - D. Prec....more >>

Marshal an object as an opaque pointer
Posted by schweitn NO[at]SPAM hotmail.com at 12/21/2003 3:39:36 PM
Ok... I know I'm coming up with some weird stuff... but this is needed in order in order to call some tessellation functions in the OpenGL Util library (glu32.dll). Several of the fuctions in the library take a void*, which is then passed back through a callback which the library calls later o...more >>

DllImport tutorial
Posted by Peter at 12/21/2003 2:18:43 PM
Hi all, Is there any good tutorial talking about Marshal and DllImport matters? Please suggest. Thx. Peter http://www.infopx.com ...more >>

Map HRESULT COM interfaces
Posted by Max at 12/21/2003 9:55:35 AM
Majority of COM interface functions return HRESULT. What is the correct way to map it in C# project? void, or int/uint? I am asking because I just saw a sample in some respectful source which performs mapping as void. Is it possible to map as int/uint, or the .NET framework will perform some p...more >>

Interop, struct within struct issue - unmanaged code newbe in trouble...
Posted by Raymond Andreassen at 12/21/2003 2:26:10 AM
Hi, I have been trown into the "beutiful" world of .net vs unmanaged code.. (phu!) And I really needs some help... (with my english too... Another story, another posting.. :o)) It is years since I did som C++/C coding, and now I can't make som clue between some .net code and som old .dll to w...more >>

vc++ enum convert to c$ enum
Posted by George at 12/20/2003 3:28:04 PM
Hi all, I don't know how to convert the vc++ enum to c$ enum. e.g. here is part of the code in the vc++ header file: typedef struct { RECT rect; enum STYLE style; } IMGRGN; enum STYLE{ HOR_TEXT, //Horizontal text zone VER_TEXT, //Vertical text zone ENG_TEXT, //English zone in...more >>

Printing in C#
Posted by ywchan at 12/19/2003 10:56:25 PM
Hi, all I have the following questions about printing in C# 1. How to print a document (e.g. MS Word, Excel, PDF) through C#? I have use PrintDocument and set the DocumentName to the file path (e.g. @"C:\Test.doc"). But I can't print out the content in the document...Why? So how can it print ...more >>

C# and DSO bug?
Posted by Kris Rudin at 12/19/2003 4:56:42 PM
I have written a C# .NET application that uses Decision Support Object Type library 5.1 to access an analysis server. The problem is that when the application ends (and all processes complete normally), I get a fatal error: "The instruction at 0x.. referenced memory at 0x... The memory coul...more >>

Trouble using .NET DLL from COM
Posted by Paul Thompson at 12/19/2003 3:27:34 PM
Hi all, I've been struggling with a problem for some time today, and I'm hoping someone else can spot the obvious thing I'm doing wrong. 1. I have a .NET DLL (written in C#) which uses some other third party assemblies. This DLL is in the same directory as the assemblies it uses. 2. I ha...more >>

Excel automation process will not unload!
Posted by Joe Helmick at 12/19/2003 9:05:08 AM
Hi everyone, I'm stumped. I'm building a "robot" application that operates on a System.Timer, checking a queue table in a SQL Server database and operating on the items in the queue, processing the input in Excel and then writing to another table and creating some graphics files (Excel charts...more >>

App exposing objects
Posted by John at 12/18/2003 9:49:17 PM
Hi I would like to have my app as an executable but I would also like other apps to use objects within my app bit like the old ActiveX EXE. What do I need to do in my vb.net app to achieve this? Thanks Regards ...more >>

newbie question - please hellp
Posted by Christian Kreimer at 12/18/2003 7:02:17 PM
Hi I'm new to distributed programming and I have a question concerning interoperability between two applications. I created a .net windows application that has to communicate with an existing application, implemented in an older technology, that doesn't directly support .net components. It is...more >>

IO Security problem - C# App calls unmanaged C++ dll, and the dll launch another process
Posted by jeff at 12/18/2003 2:28:41 PM
I have a C# Application test program, an unmanaged C++ dll, and a unmanaged exe application. C# app calls the C++ dll, and the C++ dll will launch the unmanaged exe program. The unmanaged exe program will read/write temporary files when executing. AFter the unmanaged exe program done the process...more >>

QueryInterface failed on such a simple test dll.
Posted by Lily at 12/18/2003 12:32:38 PM
Hi there, please help on such a simple asp.net page. 1. My vb DLL has only one class called "test" with one funtion "display" which returns string "Hello" 2. After register this DLL, I added referece to the asp.net project and called it as following. (Such a simple thing but error says Que...more >>

Marshalling a bool as a 2 Byte Int
Posted by schweitn NO[at]SPAM hotmail.com at 12/18/2003 11:51:33 AM
Ok... I know that the DEVMODE structure has been covered a ton in here... but I have yet to see this particular question answered. Here is my definition of DEVMODE... notice that I've commented out the parts that are in a union... since I can't seem to have overlapping FieldOffsets without the...more >>

Named pipes in Visual Basic .NET
Posted by Alejandro Salamanca at 12/18/2003 4:27:58 AM
I am bumping into lack of documentation for the topic - maybe I am not looking where I should. I need to manage a bidirectional communication between two applications. One of them is a package that reads from Stdin and named pipes appear to be the only solution to redirect and automate i...more >>

Deployement program that it has activex control
Posted by Ali at 12/18/2003 2:11:06 AM
I want use Microsoft Office Document Imaging control in the VB.NET application . I added this control to Visual Studion.NET tollbox and used it in my program. This program work coorect in my comuter, but it don't work in other computer, because first must install activex control for this c...more >>

.NET array to JavaScript array?
Posted by Koji Ishii at 12/17/2003 11:22:44 PM
Hello there, Has anyone successfully returned a .NET array to JavaScript running in MSIE? I have implemented a browser that hosts WebBrowser control, and I'd like to expose a .NET array through window.external. I tried MarshalAs(UnmanagedType.SafeArray) and then used VBArray() in JavaScript...more >>

UCOMIMoniker.BindToObject
Posted by Frank Oquendo at 12/17/2003 6:25:29 PM
Can anyone point me to an actual example of this method being used in C#? I'm trying to enumerate the ROT and expose every instance of an ActiveX server rather than using GetActiveObject, as that only returns a reference to the first instance of that server. -- There are 10 kinds of people. ...more >>

VB 6.0 Err object as parameter in C# function
Posted by Onno Ceelen at 12/17/2003 5:53:13 PM
Hi, I have a created a function in C# which I want to handle an Err object from VB 6.0 (don't ask why ;-)). For example: The VB 6.0 code: On Error Resume Next Dim lObj As MyAssembly.MyClass Set lObj = New MyAssembly.MyClass err.Raise 50000, "Source", "Description" ...more >>

COM Interoperability with existing clients
Posted by Mohan Bisht at 12/17/2003 5:37:10 PM
Hi The problem that I am facing is that I have created a .net Component wrapped up CCW, so that existing COM clients can call this component, and they dont break, but whenever I build the component, It gets a new CLSID, how do I stop this, and force it to use the same CLSID every time, I don...more >>

GetObject in .NET c#
Posted by Yong Yu at 12/17/2003 4:17:33 PM
Dear All, I have to move my VB code to C#. But I have no idea on the GetObject method in Vb. ----------------------------------------- Set dom = GetObject("WinNT://" & domain) ----------------------------------------- This is easy for VB to get the object by COM monikor interface. How...more >>

TAPI - Help
Posted by James Hancock at 12/17/2003 3:20:17 PM
Anyone have any class definitions etc. for TAPI integration in .net? What I'm specifically trying to do, is take a phone number and have it format correctly according to location. Outlook does this with TAPI and I'm hoping to do something similar... Thanks! James Hancock ...more >>

how to translate a ICaptureGraphBuilder2::FindPin ?
Posted by Assaf at 12/17/2003 2:53:08 PM
hi all. please help me translate the following method: HRESULT ICaptureGraphBuilder2::FindPin( IUnknown *pSource, PIN_DIRECTION pindir, const GUID *pCategory, const GUID *pType, BOOL fUnconnected, int num, IPin **ppPin ); this is what i tried (it crashes) [Preserv...more >>

ASP.Net and DirectoryServices
Posted by dopey at 12/17/2003 12:31:20 PM
I wrote the following code in a ASP.Net page: DirectoryEntry objDE; string strPath="LDAP://DC=cna,DC=com"; // Create a new DirectoryEntry with the given path. objDE=new DirectoryEntry(strPath); foreach(DirectoryEntry objChildDE in objDE.Children) Response.Write(objChildDE.Path); When I...more >>

C# Win32 Interop - LVM_GETITEM. Plz Help!
Posted by quortex NO[at]SPAM hotmail.com at 12/17/2003 10:06:02 AM
Hi all, I can't work out why this doesn't work - any ideas? I have tried absolutely everything I can think of and have read as much material on the net as I can find. I am stumped - HELP! The problem is marshalling the string back into managed code - lvi.pszText. It is either empty or contain...more >>

Problem Converting DLL Structure to corresponding C# Types
Posted by Jitu at 12/17/2003 9:31:31 AM
I'm trying to use a C dll provided by our vendor which has structure definition typedefstruct tag FCSDKSTRUCT{ WORD funcno; char foldername[11]; WORD totalindex; char indextitle[12][31]; char indexvalue[12][31]; WORD autonext; char errormsg[80]; } FCSDKSTRUCT; //proto...more >>

Overloaded Procedures
Posted by Leigh at 12/17/2003 9:29:11 AM
Hi, When an overloaded procedure is exported it has a suffix of an underscore followed by a number. I would like to know if there is a way to control how overloaded procedures are exported from .NET to COM. TIA ...more >>


DevelopmentNow Blog