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

Filter by week: 1 2 3 4 5

Setting a value in an Excel cell using C#
Posted by Emmanuel at 11/30/2004 6:20:35 PM
Hi, I 've managed to run successfully the example provided by the Microsoft Q302901 - "How To Build an Office COM Add-in by Using Visual C# .NET" article http://support.microsoft.com/default.aspx?scid=kb;en-us;302901 I want to change the button_click event code so that, when the button is p...more >>


VC++ Class Library and Implenting COM Interfaces??
Posted by Brian R. at 11/30/2004 1:07:04 PM
I have had a lot of practice creating .NET COM Interop objects in C# that can be registered and called from existing COM clients. I am trying to perform the same process in VC++ (without writing an ATL object) via a class library project -- just like I would with C#. I create a .NET VC++ c...more >>

MprAdminInterfaceEnum
Posted by Juan Ignacio Gelos at 11/30/2004 11:27:41 AM
Hi, Trying to enumerate interfaces on RRAS. Bellow is what I have so far. The MprAdminInterfaceEnum has an lplpbBuffer out parameter which is a buffer that will contain an array of MPR_INTERFACE_0's. I want to access the wszInterfaceName for each interface. How should I marshal t...more >>

QueryInterfce for interface ADODB._Recordset failed
Posted by Rolando at 11/30/2004 9:33:04 AM
I'm creating a library (based on the code of an article written by Bill Vaugh) to convert ADO.net Datatables y Datasets to ADODB.Recordsets. I just got a new dev machine with WinXP with SP2 and now when I try to use the ADODB.Recordset object I get the error "QueryInterfce for interface ADO...more >>

Debugging C# assembly called from C++
Posted by listerofsmeg01 NO[at]SPAM hotmail.com at 11/30/2004 9:09:06 AM
Hi, I have a C# assembly that is being called from VC6 via COM. I open the C# project in .Net, set a breakpoint, set debug type to "program", and specify my C++ app. F5 runs the C++ app, but my breakpoint never fires?! The C# dll is not in the GAC, and the build path is different to the...more >>

COMException "Memory is locked" on COM method call
Posted by steverino at 11/30/2004 12:37:01 AM
Hello: I am having a marshalling problem between VB.NET 1.1 and CDO from Crystal Reports 8.5. The AddRows generates a COMException that I don't understand. This is supposed to be default marshalling from what I can figure out; Object to ByVal Variant The code snippet is as follows: ...more >>

Interop problems with >1 assemblies
Posted by Patrick at 11/29/2004 5:51:49 PM
I have a .NET web service proxy client that is intended to be invokable from ASP 2.0 (Classic as follows) MyOrg.web.publications.OrderData - Data class that is at the highest level MyOrg.web.publications.iOrderData - Interface for MyOrg.web.publications.OrderData MyOrg.web.publications.Order...more >>

dllImport
Posted by Pratibha at 11/29/2004 2:44:06 PM
Can COM dll be used using dllImport coz i dont want add its reference using add refrence dialog box. ...more >>



2 dimensional array from VB.NET to C DLL
Posted by irmars NO[at]SPAM yahoo.com at 11/29/2004 11:52:38 AM
Hi, I need to pass a two dimensional array from VB.NET to a C DLL function. The prototype for the C function is as follows: int _stdcall myFunction (int **matrix) I have created an array in VB as Dim t(2,2) As Integer and initialized. Please let me know how to do this.. Thanks...more >>

Please help with SHDOCVW.DLL
Posted by Serg at 11/28/2004 6:45:02 PM
I ran into a couple of problems when trying to sign SHDOCVW.DLL After I run tlbimp.exe on the above mentioned dll I get a signed MyInterop.SCHDOCVW.DLL, BUT it is quite different from the AxInterop.SHDocVw.dll generated by the Visual Studio when you add a reference to the same dll above. ...more >>

web broswer help please
Posted by Neil Stevens at 11/27/2004 11:58:16 PM
Hi, I am developing a windows application which uses the browser control and DHTML as the UI, i have designed a class that implements the IDocHostUIHandler so that i can block the accelerator keys (F5, Ctrl+F5, Ctrl+5, and so on), i have script that runs in pages that will be displayed in...more >>

Article : Soapsuds.exe (.Net Framework tools series)
Posted by Namratha Shah \(Nasha\) at 11/26/2004 9:30:08 PM
Hey Group, Today we gonna discuss Soapsuds tool. Soapsuds is shipped with .Net FrameWork and is used by .Net remoting Client Applications to generate xml schema,proxy class or assembly for their HTTP Remoting Server. Client App can use this proxy class or the assembly as a reference to the...more >>

Function pointer was not created by a Delegate.
Posted by GB at 11/26/2004 12:59:03 PM
Hi, is it possible to pass a callback function from VB6 to VB.NET? I've tried the following and got the error "Function pointer was not created by a Delegate.". ______________________________ ' VB.NET class library: Biblioteca.Class1 Imports System.Runtime.InteropServices Imports Syst...more >>

Error calling VB6 DLL from .Net WebService
Posted by Mike at 11/26/2004 8:35:01 AM
I have a VB6 DLL that queries an MSAccess XP database and the DLL is used by a .NET Webservice. The WebService and DLL are on a Windows 2003 Web Server. The WebService runs in its own Application Pool on IIS. The DLL has been registered with COM+ and is marked as 'Synchronisation Required'. ...more >>

Problem referencing Managed class from the Unmanaged (beginner question)
Posted by Sasha Nikolic at 11/25/2004 2:38:14 PM
I have a managed ( __gc ) class and a unmanaged ( __nogc ) class in the same VC++ 2003 project (since I need to create a dotnet wrapper for some old c library code). I can easily reference unmanaged class from the managed one, but I'm having problems when I need to call managed class method from ...more >>

Excel 2003 COM interop problems
Posted by dospalabras NO[at]SPAM gmail.com at 11/25/2004 10:56:05 AM
I am trying to use C# .NET interop with Excel 2003 and I am running into a couple of problems. In this example, a .NET class called Ticker is in a .NET assembly dll called AClassLibrary. Ticker exposes a COM interface with a GetTick and a Dispose method. It also exposes a COM event with one e...more >>

Calling Unmanaged EXE from C#
Posted by Boomessh at 11/25/2004 5:53:03 AM
Hai All, I am having an EXE developed in VB6. For certan functionality reasons i want to call this in my C# program, Can i call this unmanaged EXE from my C#. I know i can call a DLL using DllImport. Is it the same with EXE. Help Me Thanks, V.Boomessh...more >>

newbie question about VB6 string to C# string
Posted by Trevor Braun at 11/25/2004 12:43:57 AM
Hi, I'm just getting started with Interop, and I would appreciate any help you might give me on this question (and others upcoming, I'm sure). I have been assigned a project which requires me to interact with a regular non-COM DLL. I don't have any definitions for the library functions, but ...more >>

calling Uniscribe from C#
Posted by Ehab Zaky at 11/24/2004 10:27:45 PM
Dear All, I have a two questions about interoperating with unmanaged code. I'm trying to call a function from a DLL file called usp.dll which contains Uniscribe functions from C#. I'm calling a function called ScriptItemize which is defined with its structures as follows: HRESULT WINAPI ...more >>

Addressing reference to struct in C#
Posted by Lau Lei Cheong at 11/24/2004 6:18:19 PM
Hello, It happens that one days I had to write program that uses Windows API, but seems C# do not have anything as convenient as "windows.h" in C++, so I had to declare the functions myself. While most of the codes I found on the net involving C++, I have to do some ports in...more >>

InvokeMember and "long *val" in COM
Posted by Jochen Kalmbach at 11/24/2004 12:28:16 PM
Hello, I am trying to do some late binding to an COM-Server. Now I have the following problem: The IDL-Description of the Method looks like this: VARIANT_BOOL StartObjectQuery( long ObjectType, long* TotalNoOfObjects); Now I try to execute this method with the following C# cod...more >>

Build Interop without Visual Studio
Posted by VVally at 11/24/2004 11:29:09 AM
Hello! (and sorry for my english, but I'm italian :-)) I'm using in VB.NET some ActiveX dll built with VB6. Everything work well, when I build my .NET executable, interops for my dlls are created. My co-worker, that don't use Visual Studio .NET (not installed in his PC) somewhere modify COM dl...more >>

Manipulating WORD from .NET
Posted by David GB at 11/24/2004 11:25:36 AM
I need to use word to edit aq document, programitically, adn then save it to a file (which will then be loaded into the database as a BLOB. Is Interop the right way to accomplish this? Can anyone give me a pointer to some sample code? -- David Gordon-Brown...more >>

handling the death of a COM app from .NET
Posted by Jiho Han at 11/24/2004 9:04:53 AM
I have a winforms app that creates a COM application(namespace imported through references). I would like to be able to know when the COM application is closed by the user in the .NET app. The COM app does not fire an event when it's closing - there is no published event. Is there a way to find...more >>

How to use a .NET Control with GUI in VC++/MFC/COM/VB applications
Posted by Ramchandra Hegde at 11/24/2004 3:55:03 AM
We need to use a previously developed .NET application with a existing VC++/MFC application. Idea is to convert the .NET application to an ActiveX control which can be inserted in the ActiveX Container Application. However there seems to be no way to do this. A .NET component without a GUI ca...more >>

calling existing DLL from .NET
Posted by Bill Wilhelm via DotNetMonster.com at 11/23/2004 9:02:29 PM
Please help. I've been stuck on this for days. I have a sample web service, written in C# that I'd like to have be able to call into a DLL written in C++ (also in the .NET Studio). I can compile and build both pieces, but I'll be hanged if I can get the call to work at run-time. My service cod...more >>

.Net object with private constructor marked as noncreatable in type library
Posted by Howard Swope at 11/23/2004 3:24:25 PM
I have a .Net object that I expose to COM. I implement this as a singleton and create my own class factory. In keeping with the fact there should only be one instance of this object, I want to have only a private constructor. However, regasm generates the type library and marks the object noncre...more >>

interops strong names
Posted by fjkish NO[at]SPAM yahoo.com at 11/22/2004 5:45:23 PM
This might be a simply question but I'm new to some of this... I have a sln which when built creates 4 DLLs and automatically generate associated Interop DLLs. The 4 Dlls will need to be signed by the person here that has the private key for our company. But do Interop DLLs need to be signed...more >>

C# Structure problem
Posted by B Vidyadhar Joshi at 11/22/2004 12:24:27 PM
Hi, I have converted a couple of C++ structures to C#. /* typedef ULONGLONG BTH_ADDR; typedef struct _BLUETOOTH_ADDRESS { union { BTH_ADDR ullLong; // easier to compare again BLUETOOTH_NULL_ADDRESS BYTE rgBytes[ 6 ]; // easier to format when broken out }; } BLUET...more >>

Convert InProcServer to OutProc
Posted by lakmann NO[at]SPAM gmx.de at 11/22/2004 11:08:34 AM
Hello, I created a COM Server .NET dll that works fine as an InProcServer. It creates it's own OdbcConnection and saves the passed data to DB. But the DB-connection of the application using this COM server gets messed up when the new connection is opened (some wierd ODBC 2 vs ODBC 3 stuff). Th...more >>

Unmarshalling LsaEnumerateAccountRights() list of privileges
Posted by Seng at 11/21/2004 6:39:04 PM
Having trouble unmarshalling the list of rights returned by LsaEnumerateAccountRights() Declared it as... [DllImport("advapi32.dll", SetLastError=true, PreserveSig=true)] private static extern long LsaEnumerateAccountRights( IntPtr PolicyHandle, IntPtr AccountSid, ...more >>

Debugging Interop
Posted by Michael J. Salamone [eMVP] at 11/21/2004 5:33:02 PM
I have two COM Callable Wrappers created by tlbimp. One of them I can create successfully in my C# application (CCWClass obj = new CCWClass()). The other, on call to new(), throws an exception - "the parameter is invalid" - or ERROR_INVALID_PARAMETER. If I go into disassembly mode, I see ...more >>

Turn Off IE Header and Footer
Posted by Richard Myers at 11/20/2004 8:15:33 PM
Hello again, I haven't done too much work with the web browser component hence the rapid fire questions. Im now wondering how to turn off the header and footer (page url - date/time) for IE when a user prints from IE as hosted within inside of our app. I remember doing something with a BHO a wh...more >>

Howto Feed AxWebBrowser.Document?
Posted by Richard Myers at 11/20/2004 1:46:42 PM
HI There, I have seen a recent post asking precisely the same question for precisely the same scenario as mine. Unfortunately it was via Matt Reynolds .NET 247 and they dont seem to supply date/times of posting. The url for that post is here (rather than me repeat the question) http://www...more >>

Excel using ado.net - operation must use an updateable query
Posted by Tom wilson at 11/19/2004 2:46:59 PM
This is driving me nuts. I'm trying to update an Excel spreadsheet using ADO.Net and Oledb in VB.Net. The connection is open, the adapter is connected and the dataset is loaded. Here's the code in question: myDataRow = myDataSet.Tables(0).Rows(RowNum) myDataRow(ColumnCount)...more >>

Article : Security Tools Part -- 1 (.Net FrameWork Tools Series)
Posted by Namratha Shah \(Nasha\) at 11/19/2004 4:22:35 AM
Hey Group, Today we look in to creating software digital certificates but we take a plunge in that we will look at certain aspects of Crytography. Cryptography is about keys for encryption. These keys can be symmeteric or asymmetric. When we say symmetric keys what we mean is that the same k...more >>

Excel add-ins does not show up in Excel>Tools>Add-ins list.
Posted by Emmanuel at 11/18/2004 8:51:54 PM
Hi everybody, I am trying to create an add-ins for Microsoft Excel using C#. I started with Microsoft's article 302901 - How To Build an Office COM Add-in by Using Visual C# .NET http://support.microsoft.com/default.aspx?scid=http://support.microsoft.com:80/support/kb/articles/q302/9/01.asp...more >>

How to examine the first 32 bits of a string in vb.net
Posted by VBS Programer at 11/18/2004 12:34:53 PM
I am working with a thermal printer that returns it's status in a string. The status can be up to 4 bytes long. In vb6.0 I would use the MidB,AscB functions to examine the first 32 bits. What can I use in vb.net instead of The MidB and AscB. Thank you ...more >>

SendMessage and WM_GETTEXT
Posted by Dennis C. Drumm at 11/17/2004 4:27:16 PM
I am programming in C# and am not sure how to supply the last parameter (LPSTR) in the SendMessage function with the WM_GETTEXT option. Do I need to use unsafe code and how do I get the pointer and pass it to the SendMessage function to get the text that it contains? Thanks, Dennis ...more >>

Remoting/Interop with Interfaces
Posted by wannensn at 11/17/2004 4:09:10 PM
Hallo, I'm trying to automate my VB.Net application for non .Net-Apps, to have only one instance of the my app I used the following pattern. My .Net-App <= ".net remoting" => RemoteService <= "COM" => non .net Client-App All of this works fine if I don't use any interface - but when I use ...more >>

Setup not working for "Everyone"
Posted by PMVT at 11/17/2004 3:22:05 PM
I'm having an issue with installing an addin for Word. I've written the addin in C# and I am using the Setup project that was created with the Extensibility project by VS. If, as an administrator, I install the addin for "Just Me". everything works fine. If I install for "Everyone", however...more >>

Classic ASP, .NET Object and Multiple Threads
Posted by DWrek at 11/17/2004 1:33:04 PM
Hello, I have a .NET object that uses the HTTPWebRequest class to contact another http server and send some information to it. I would like to use this .NET object from a classic ASP page but I do not want the end user to be delayed on account of the .NET object carrying out it’s tasks....more >>

Pointer problem with structure MIDIHDR
Posted by Reinier VDW at 11/17/2004 10:55:04 AM
Hi, My app uses the API structure MIDIHDR to receive MIDI long (system-exclusive) messages and I have got a declaration problem. The SDK declaration (in C) on MIDIHDR reads: typedef struct { LPSTR lpData DWORD dwBufferLength DWORD dwBytesRecorded DWORD dwUser ...more >>

Excel Interop and setting the Formula in a cell
Posted by umell at 11/17/2004 10:02:35 AM
Hi all, I have a problem setting the formula in a cell from my dot net app only on a French computer. If I try the same thing with VB6 code it works fine. Here is my vb.net code Dim a As Microsoft.Office.Interop.Excel.Application Dim b As Microsoft.Office.Interop.Excel.Workbook a = New...more >>

What causes an SEHException
Posted by ravenous.wolves NO[at]SPAM gmail.com at 11/17/2004 8:46:38 AM
I have an UC++ DLL which is called from a MC++ DLL. During execution we get SEHExceptions sometimes. The UC++ DLL is all our own code except for MFC and CRT. I've been able to force NullReferenceExceptions (*NULL = 2, read memory out of bounds, write memory out of bounds), and DivideByZero ex...more >>

MC++ Wrapper class - exception problem calling unmanaged construct
Posted by Nigel at 11/17/2004 2:43:02 AM
I am creating a simple test program to demonstrate calling unmanaged C++ from a managed C++ wrapper class All created and built in Visual Studio 2003 I have a very simple unmanaged class with empty constructor/destructor and one other method as double add (double X, double y). This is bui...more >>

COM / SAFEARRAY(BSTR)* / String[] / System.Array
Posted by Jon at 11/17/2004 1:48:02 AM
Hi Here's a weird one which I would appreciate help with which I can't get my head around..... If I create a .NET assembly that has a method in... string[] GetFormats() expose it as a COM components (via regasm), then create a new .NET app that references that COM component, my call ...more >>

null reference exception on DLL call in C#
Posted by Dan Mehlman via .NET 247 at 11/17/2004 1:01:16 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 >>

Q: Studio 2003 and Outlook Interop, a non working combination?
Posted by Visual Systems AB \(Martin Arvidsson\) at 11/16/2004 11:25:14 PM
Hi! I am runing out of ideas now. I have scanned several ng's but not found an answer. So this is the last try :( I have VS 2003 Enterprise, Office 2003, and i made sure that the .NET framwork was applied with "Run on machine". after office i opened VStudio. Entered, using Microsoft.Offic...more >>

.override directive missing in manual COM interop...
Posted by Nathan Baulch at 11/16/2004 4:22:09 PM
I am so close to getting my manual COM interop classes to load correctly! I have very slowly tracked down the problem to missing .override directives on the classes in the IL generated from my assembly compared to that of TlbImp. I don't really understand why the directives exist in the firs...more >>


DevelopmentNow Blog