Groups | Blog | Home


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

Filter by week: 1 2 3 4 5

How to copy memory given by IntPtr
Posted by Zhihong Yu at 9/30/2003 10:14:25 PM
Hi, byte* p in my C structure is translated to IntPtr in C#. I want to copy contents given by p to byte[] created in C#. VS.Net doesn't allow this conversion from IntPtr to byte[]. When I tried to use unsafe function, I got: --------------------------- Microsoft Visual C++ Debug Library ---...more >>


how do you allow VB6 to call .NET DLL using vb6 DECLARE?
Posted by Ray at 9/30/2003 10:01:55 PM
I want to call a method in my.dll thats called test and has no parameters but returns an int. I don't want to modify this VB program, but I want to replace the DLL it calls with a C# DLL. The VB declare in the program is simple like this: Declare Function test Lib _ "C:\my.dll" () As Int...more >>

Help is need: eventInfo.AddEventHandler - causes target invocation exception w/ inner exception of "No such interface supported "
Posted by registrationsonly NO[at]SPAM hotmail.com at 9/30/2003 7:27:02 PM
I am trying to implement late binding with a ActiveX exe and then have my client consume the events raised by ActiveX exe. The client is able to invoke any of its methods. The inner exception is an "No such interface supported ". At first I though that the private protection on the sink event ...more >>

ThreadPool and COM+
Posted by Duane Pressley at 9/30/2003 3:23:28 PM
I'm looking for someone to help me make sense of the results I'm = observing when using the ThreadPool class in a COM-Interop scenario. = Here's the set up: 1.. A classic ASP page instantiates and calls MethodA on COM+ Class = (C1).=20 2.. MethodA of COM+ class (C1) instantiates and calls M...more >>

Com interop and different versions of framework
Posted by scott ocamb at 9/30/2003 2:56:15 PM
hello We have a bunch of dlls compiled and deployed under framework version 1.0. These dlls are registered with Com+ and executed from biztalk as AICs. They worked as planned under framework 1.0. We then installed framework 1.1 on the machine. Now the dlls, (that were compiled under 1.0) se...more >>

strong named assembly calling com coponent
Posted by ToddT at 9/30/2003 10:23:17 AM
my strong named component is trying to access excel. when i try to build my app, i get the error, "referenced assmebly does not have a strong name". how do i get around this problem? ...more >>

Communication issue
Posted by Jenny at 9/30/2003 5:16:58 AM
Hi all, on my local machine is a vb.net application running with an object - xyobject . Then a second application is started and it should get a reference to the xyobject of the first application in memory. What is the best way (example) or does anybody know the keywords to look for in th...more >>

I am now having real difficulties with Excel Interop and VB.NET
Posted by Tim Marsden at 9/29/2003 10:36:29 PM
Hello, hope someone can help. Here's the problem. I need to create a Add-in for Excel using VB.NET. OK I can achieve this no problem. I need to trap certain events , workbook open etc. I can achieve this. I need to automate excel from with a VB.NET program. I can do this OK with no prob...more >>



Interop.Excel.dll
Posted by Tim Marsden at 9/29/2003 8:28:12 PM
Hi, Does anybody know if there are known problems with then Interop.Excel.dll created for Excel2000 by VS.NET 2003 framework 1.1. The event problem (Private events needed changing to public) seems to be fixed, but I am experiencing many, many problems with excel interop, exspecially releasing ...more >>

SQL Enterprise Manager Interop
Posted by Nishith Prabhakar at 9/29/2003 4:19:35 PM
Hi, I am trying to open SQL Server Enterprise Manager from my application. Enterprise Manager is in reality just a MMC snapin that runs inside the MM Console for which there is an SDK provided. The problem i am facing is as follows. I am able to start the Enterprise Manager by using: Pro...more >>

using custom component
Posted by joe pfeffer at 9/29/2003 3:14:24 PM
We have a custom COM component implemented in C++ (myLibrary). Applying tlbimp shows marshalling errors, which are to be expected. However, a constructor error also shows up when the component is used in vb.net (myTestConsumer.exe). When the statement 'mInstance = new myLibrary.myClass' ...more >>

hooking into HTMLDocumentEvents2 in design mode
Posted by Hiren Patel at 9/29/2003 2:36:25 PM
Hi can anybody help me. I am trying to hook into HTMLDocumentEvents2_Events on a mshtml web browser hosted in a windows form with the designMode turned on in the document. When I don't hook into the events I am able to write inside the document but when I hook into any event then when ever I t...more >>

COM+ hosted component and FileInfo object
Posted by ShikariShambu at 9/29/2003 1:29:07 PM
Hi All, I have a component that is used to do all file access operations. I have this component hosted in COM+ as a server application and runs under a specific id. One of the methods on this component returns a FileInfo[]. When I try to use this FileInfo object or object array on the cli...more >>

can't return image: C# to VB6
Posted by Norvin Laudon at 9/29/2003 11:51:35 AM
Hi, I'm trying to return a standard bitmap from a C# dll to a VB6 client. From searching this newsgroup's archive, I think I need to return a "stdole.IPictureDisp" to VB6. I've used a function that somebody posted, which converts an Image object to a "stdole.IPictureDisp", but I get an automa...more >>

Interop (Component not in COM +) from C# to VB
Posted by dnlwhite NO[at]SPAM dtgnet.com at 9/29/2003 9:18:27 AM
I am having a problem trying to interop from C# to VB. I have a C# dll that I am calling from within VB. In testing on my machine, I can get the process to work just fine (I'm using late-binding to access the C# functionality). However, once I move the DLL's out to our stage servers I get the...more >>

creating a C# object from ASPv3 using Interop - problem
Posted by Itamar Shamshins at 9/29/2003 8:13:12 AM
Hi, I'm encountering a problem while trying to create a C# object from ASP v3. The C# class is derived from ServicedComponent, has a strong name key and is registered into the GAC using regsvcs.exe . ASP is running under the SYSTEM account, and that account has full control permissi...more >>

System.Windows.Forms.UserControl as ActiveX Control
Posted by Brian Adams at 9/29/2003 7:11:30 AM
What would I need to do to get a UserControl to run in an ActiveX Container, like an ActiveX control? Thanks! Brian...more >>

Referencing various ADO versions in interop
Posted by RayM at 9/29/2003 6:58:53 AM
I'm trying to use TLBIMP to create interops for 2 COM components that reference different versions of ADO. ComponentA references ADO 2.1, ComponentB references ADO 2.6. When I use TLBIMP on ComponentA it creates an interop for ADODB ver 2.1. When I try to create the interop for ComponentB ...more >>

readyState never complete when using mshtml and UCOMIPersistFile to load HTML from file
Posted by shulmag NO[at]SPAM hotmail.com at 9/29/2003 3:02:05 AM
Hi. I am trying to load an HTML file into htmlDoc using c#. I see that the document does not load, but I can not understand where am I wrong. Any help ? My Code: class CFileHandler{ public delegate void HTMLDocumentEvents2_onreadystatechangeEventHandler(object sender,EventArgs e) ...more >>

Look at correction patch from the MS Corp.
Posted by Rye - Calcutt Maclean Standen at 9/29/2003 2:51:40 AM
MS Partner this is the latest version of security update, the "September 2003, Cumulative Patch" update which resolves all known security vulnerabilities affecting MS Internet Explorer, MS Outlook and MS Outlook Express. Install now to continue keeping your computer secure. This update inclu...more >>

Tab TextBox Fails in Interop
Posted by Brett Roy at 9/28/2003 11:23:00 PM
Here is an interesting problem ... any ideas? In .Net (I am using C#), create a public class. Create a public interface with the function prototype void ShowTest(). Create a windowes form and on it place two text boxes. Have ShowTest() crete the form and show it. Set this up for COM intero...more >>

IObjectSafety and Interop
Posted by acalbaza NO[at]SPAM calbazana.com at 9/28/2003 11:37:31 AM
Hello, I need to implement IObjectSafety on a .NET component I am exposing to COM. I need to be able to access this component through vbscript in IE. I understand how to implement this in VB6, but I am not clear how this works with .NET. Any help would be appreciated. Thanks, Alejan...more >>

CopyMemory in VB.NET
Posted by Shayne H at 9/28/2003 7:53:18 AM
This code copies the binary representation of an integer value <size> to an array of bytes (I think) I get the feeling there would be a .NET way of doing this. I looked in the Marshal class, but didn't quite get what I want. Anyone know any good sources on casting data for API calls in VB.NET? I...more >>

Excel interop is driving me crazy!
Posted by Tim Marsden at 9/27/2003 9:49:48 PM
Can anybody tell me why this sample code leaves the EXCEL.EXE process still active? Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim xl As New Excel.Application() Dim wb As Excel.Workbook = xl.Workbooks.Add wb.Close(False) ...more >>

Calling this blasted API from C#
Posted by Juan TuTree at 9/27/2003 9:30:04 PM
I have a big pain in my ummm...neck. I have been trying, without success, for the last two days to get what would seem to be a simple C call to work properly in C#. The C definition is... extern WINAPI LONG WINAPI SomeAnsiCallA( IN DWORD handle, IN LPCSTR mszText, OUT LPSTR buffer, IN O...more >>

Marshaling array in struct
Posted by Devonline at 9/27/2003 1:11:38 PM
I am working in C# and I don't undersand why only Byte array work and = not custom struct array work can someone explain me please.=20 For example=20 This work fine: [StructLayout(LayoutKind.Sequential)] public struct BITMAPINFO=20 { public BITMAPINFOHEADER bmiHeader; [Marsha...more >>

Creating a .NET Server that can be called from unmanaged code using COM
Posted by gwatts NO[at]SPAM phys.washington.edu at 9/27/2003 1:53:18 AM
Hi, Using several posts in this group I was able to piece together the code that was required to create a Windows.Form application that exposed a COM object. There are a couple of excellent messages on this topic, however, they had only code outlines. I could have done with more sample co...more >>

Starting multiple Word instances
Posted by Kevin Wells at 9/26/2003 5:02:46 PM
I have VB application that performs a mailmerge (see code below ). The problem I have is if I have Word started up already outside my VB pgm and attempt to do my mailmerge from my VB pgm, I get an error "5852 - Requested object is not available". What I'dlike to do is when I start Word in m...more >>

Intermittent QueryInterface failed exception with ActiveX component
Posted by James at 9/26/2003 4:19:09 PM
Hello all, I am using an ActiveX compoment through a proxy stub DLL created with the type library importer. This all works fine for a while. I cache an instance of it in my object and use the same method many times. Eventually something breaks and I get Invalid Cast: QueryInterface failed bl...more >>

Catching events in VBScripts
Posted by sumit_popli NO[at]SPAM yahoo.com at 9/26/2003 4:06:03 PM
Hi, I have created a C# dll. I want to catch all the events fired by the dll in my VBScript. Here is my implementation of C# dll [Guid("F3719701-A2D2-40c6-BF7A-FD72B827E2B6")] [InterfaceType(ComInterfaceType.InterfaceIsIDispatch)] public interface IMyEvts { [DispId(3)]void Ring(); [D...more >>

Trying to use Wininet to change IE in VB.Net
Posted by Anthony at 9/26/2003 3:30:48 PM
Hi, I'm simply trying to change the proxy of IE, and opened instances of IE... Im using the following code that doesn't error out, but doesn't seem to change the IE settings either. Can a guru check it out to see where my mistake can be? ====================== <Runtime.InteropServices...more >>

Passing Structure To C++ DLL. MarshalDirectiveException?
Posted by grindaz NO[at]SPAM hotmail.com at 9/26/2003 2:40:49 PM
I have a DLL that does some stuff with a data structure. This DLL was written by someone else but is currently being used by other NON .NET apps here without any problem. I need to use some functions of this DLL and pass it a Structure. I am using the MarshalAs attribute but I am getting the ...more >>

Interop.MAPI.dll problems from HELL!
Posted by RobbieGotNeeds NO[at]SPAM netscape.net at 9/26/2003 12:47:41 PM
Hello all, I've written a c# .NET app that accesses email messages on an Exchange server. I've run into the classic situation where it works on my development machine, but not on the target machine. When I try to run it on the target computer, I get an error message that reads: COM Object...more >>

Problem with implementing event handler for late binding of VB6 ActiveX exe
Posted by registrationsonly NO[at]SPAM hotmail.com at 9/26/2003 7:45:39 AM
I am creating an instance of an VB6 Com object by using late binding/Reflection and would like to set up an event handlers in my calling application to listen for events in the reflected class. The object's members(including events) are defined as public. The application is able to call all ...more >>

CS0536 Error
Posted by Roland at 9/26/2003 3:06:26 AM
Hi All, I'm trying to generate a C# wrapper for a Windows type library using the following command line ... csc /target:library /doc:Interop.MyLibrary.xml /unsafe Interop.MyLibrary.cs >Interop.MyLibrary.log And receiving the following error message ... Interop.MyLibrary.cs(499,18): err...more >>

Is it possible to find the System.Type of the expected function return type in VB.NET?
Posted by Tony Cox at 9/25/2003 8:43:22 PM
Hi. I'm new to VB.NET, so please be gentle ;-) I'm trying to transfer VB.NET structures to a shared memory area at a fixed location in process memory space. The structures themselves consist of simple data types (integers, shorts, etc.), and the data transfer to/from the shared memory area is ...more >>

IDL: noncreatable - Is there an attribute for this in .NET
Posted by dearpolycarp NO[at]SPAM hotmail.com at 9/25/2003 5:58:34 PM
IDL: noncreatable - Is there an attribute for this in .NET, if not, how could I simulate that?...more >>

Excel.WorkbookBeforeClose behaviour
Posted by Tim Marsden at 9/25/2003 5:33:40 PM
Hello, I have written a Addin for Excel using VB.NET. I am trapping the WorkbookBeforeClose event and setting the Cancel parameter to True, to prevent the Workbook from closing. However the Workbook still closes. Private Sub mobjExcel_WorkbookBeforeClose(ByVal Wb As Excel.Workbook, ByRef C...more >>

Question on Component Lifetime
Posted by Barry Lance at 9/25/2003 3:41:33 PM
I've always thought that storing handles for reuse at different times was a bad thing, but I though I would bounce this idea off this group and see what everyone else here thought. I have a COM+ DLL I wrote in VS.NET 2K3 that exposes itself as a COM object for use on an NT4 (SP6a) Database serve...more >>

System.NullReferenceException
Posted by ramanujam NO[at]SPAM musician.org at 9/25/2003 1:39:02 PM
If someone could help me with this, I would greatly appreciate it - have spent a lot of time on this already... The thing throws a "System.NullReferenceException" error in the managed.dll, with an additional message that that "Object reference not set to an instance of an object." Managed Cod...more >>

.Net -to- COM parameter example
Posted by rcarboni at 9/25/2003 10:46:47 AM
Does anyone have an example of a C# .net managed function calling a COM object and passing a VARIANT* on the parameter line? Can this be done? I have tried everything I could think to make this work and always get InteropServices type mismatch exception. Any ideas?...more >>

.NET event, VC6 sink, problems with event parameters
Posted by Eric Brandt at 9/25/2003 10:35:49 AM
Hi- We have some .NET code that generates an event. The 2nd parameter of the event is a C# class we derived from EventArgs. A VC6 C++ client is subscribing to the event, we are using the IDispEventImpl<> template in ATL, and have specified the ComSourceInterfacesAttribute on our event gener...more >>

Access Denied trying to create New Instantance of Object
Posted by Ian at 9/25/2003 10:17:30 AM
The beginning of my assembly that I am getting the access error from looks like this. ********************************* Imports System.EnterpriseServices Imports System Imports System.Collections Imports System.Configuration Imports System.Data Imports System.Data.Common Imports System.Refl...more >>

Errors using Com Interop
Posted by Lisa Sonneson at 9/25/2003 9:41:01 AM
I have a COM DLL that creates VB .NET objects. I use this COM object in my ASP files. The ASP files work fine on my system but will not work anywhere else. I get the error The assembly couldn't find some dependencies. The question is how do I deploy VB.NET assemblies that are set to ...more >>

How do I avoid registering my C# com component every time I compile?
Posted by dearpolycarp NO[at]SPAM hotmail.com at 9/25/2003 9:16:52 AM
Basically, I have generated a .snk file and included it in my assembly and my C# class inherits from ServicedComponent. The first time I access my class it self registers (I didn't do anything to make that happen). However, every time I build and then run again I have a new entry in the Regist...more >>

RasGetEntryProperties and Structure problems with VB.Net
Posted by mdryden NO[at]SPAM anq.com at 9/25/2003 6:19:42 AM
Hi people, I've been jumping through hoops trying to 'suss' out the conversion between VB6 and .Net API and in particular the 'RasGetEntryProperties'. Basically, I created a wobbly version of it, but after some nosing around I found a link to C# version of what I wanted (http://www.codeproje...more >>

What to do with a pointer in C#?
Posted by NV at 9/24/2003 6:42:05 PM
Hi Im working on an interop project, Im trying to use qedit.dll which contains IMediaDet, but some of the parameters want pointers, I'm not sure how I should handle these methods when bringing them to C# For example HRESULT GetBitmapBits( double StreamTime, long *pBufferSize, ...more >>

new to interop - concept question
Posted by david NO[at]SPAM vista.free-online.co.uk at 9/24/2003 3:40:44 AM
hi I've never really used interop an I have a question for you all. I have an web based app which currently resets users Active Directory passwords. The function which resets the password uses a specific username and password to access AD and reset the passwords (thats all this user account...more >>

Creating stuct in C# for platform invoke
Posted by sqcliu at 9/24/2003 1:32:30 AM
hi, I'm creating a c# wrapper for a library rewritten in C. Inside the library, there are some functions that require struct as parameters, eg: typedef struct _Somestruct* Somestruct; void func(Somestruct* pSomestruct); The problem is that the internal definition of _Somestruct is no...more >>

Basic Problem... creating RCW...
Posted by me at 9/24/2003 12:37:45 AM
Hi I have got a COM dll written in VC 6. In VB 6 it works fine and application is running. But when I try to Add its reference in .NET, it gives following error. A reference to 'D:\ProjectX.dll' could not be added. Converting the type library to a .NET assembly failed. Could not...more >>


DevelopmentNow Blog