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
all groups > dotnet interop > october 2005

Filter by week: 1 2 3 4 5

Access violation calling C# interface from C++
Posted by Tony Towers at 10/31/2005 10:45:10 AM
My company has been given a set of COM interfaces ( as .idl and .tlb files) by a customer, which represents the interfaces to a system they are in the process of developing. One of the interfaces included is outgoing (i.e., implemented by us), and will be used to notify our code of changes. The...more >>


calling fortran functions from c++ code
Posted by ve at 10/31/2005 9:08:10 AM
Hi, i have requirement of calling fortran functions from c++ code. I have no idea as how to do this. I did some searching on this but could not figure it as how to do exactly. if you guys can suggest me some good links where i can start. thanks vinod...more >>

problem trying to marshal instance of ActiveX class from pointer..
Posted by Steve at 10/31/2005 7:59:08 AM
I'm interfacing from .NET to an ActiveX DLL and I'm having one problem I cant figure out. (The ActiveX DLL is from a vendor so I cant change it.) There's a function in the ActiveX DLL which returns a type of Object, but it's actually an instantiation of another class defined in the ActiveX DLL,...more >>

unresolved externals porting managed wrapper from 1.1 to 2.0
Posted by Chucker at 10/31/2005 6:57:04 AM
Hi Folks, I am just trying to port my Application from .NET 1.1 to 2.0. Native C++ Code works fine. Native C# Code also works fine (just some deprecations). The problems start when trying to port my managed C++ Wrappers. In .NET 1.1 with a lot of reading (mostly newsgroups like this) I ...more >>

How to select an image for display in aspx
Posted by Peter Wallington at 10/31/2005 12:00:00 AM
Hi All, Can anyone help me out with this one. I have a basic aspx page with an = image placeholder on it. I want to be able to click a button on the page = and have a dialog window appear where I can navigate the Client's PC = and select a file (a JPG of GIF). I then want to change the image ...more >>

sending files in C#
Posted by Xonix at 10/31/2005 12:00:00 AM
Do you know how to send all kind of files from a server to a client?i can't only send files .txt and i'd like to send all kind of files. Could you help me? contact me joanma6@hotmail.com...more >>

STAThread or MTAThread for my .net service ?
Posted by zvika.ferentz NO[at]SPAM gmail.com at 10/28/2005 2:43:45 PM
I've created a ".net service" mainly for database access. The service consists of 2 threads, the first one uses Interop.SQLDMO and the second one uses SQLClient and other (third-party) classes . 1. Which attribute should i use for my Main ? does it matter anyway ? 2. When I tried the STAThread...more >>

Office 2003 interop question
Posted by Kikoz at 10/28/2005 1:14:28 PM
Hi all. I got small app. One of its functions is supposed to interact with user's Office 2003 (don't care about earlier versions). This functionality works just fine on dev machines if I reference PIA's in VS.2003. But I have no idea if the end user will have Office 2003 installed (and if h...more >>



Reading EVENTLOGRECORD Structure from Pointer
Posted by Jeff Reese at 10/28/2005 11:07:39 AM
I'm attempting to make sense of all of the data from a pointer obtained by calling ReadEventLog. The pointer contains an EVENTLOGRECORD structure, plus additional data tacked on to the end that can be of variable length. I'm able to successfully pull the EVENTLOGRECORD structure out of the p...more >>

NetUserEnum
Posted by nat at 10/28/2005 4:29:02 AM
Hi can someone help me, when I call this NetUserEnum(null, 0, 2, out bufPtr, -1, out EntriesRead, out TotalEntries, out Resume); but when I call this it does not work NetUserEnum("\\nataliya", 0, 2, out bufPtr, -1, out EntriesRead, out TotalEntries, out Resume); null is for my ...more >>

COM Interface's GUID property in .NET
Posted by keith at 10/26/2005 7:27:33 PM
Hi, I have a COM interface definition which has a property set like this: [propget, helpstring("property Prop")] HRESULT Prop([out, retval] GuidType *pVal); [propput, helpstring("property Prop")] HRESULT Prop([in] GuidType newVal); Where 'GuidType' is a typedef of GUID. I wish to impl...more >>

Interop System.TypeLoadException (PINVOKE)
Posted by Javier Jaen at 10/26/2005 12:00:00 AM
Hello, I need to interop from C# with a native method and pass an array of structs. I have done it as follows: [StructLayout(LayoutKind.Sequential,Pack=4)] public struct ISD_STATION_STATE_TYPE {... //struct fields}; [StructLayout(LayoutKind.Sequential,Pack=4)] public struct ISD_TRACKER_D...more >>

Can't find the problem with gdi32 import
Posted by Softimax at 10/25/2005 6:27:17 PM
The following code contains a mistake, but I can't find it. Polyline works ok and PolyPolyline doesn't draw. Why? Thanks! [StructLayout(LayoutKind.Sequential)] public struct POINT { public int x; public int y; } [DllImport("gdi32")] public static extern int PolyPolyline(IntPtr h...more >>

Debugging legacy ASP application on VStudio under XP SP2
Posted by mukesh bhakta at 10/24/2005 3:21:49 PM
Hi guys, I have a rather strange problem with debugging a legacy ASP project that uses COM Interops written in VB.NET. The project when debugged on Win2000 allows JIT debugging of the CLR code using the DefaultDomain in the 'Debug Processes' dialog. I also see two DLLHost instances that can...more >>

Deployment of Windows User Controls for Web Pages
Posted by Wayne Gibson at 10/24/2005 11:59:40 AM
Hi, Was wondering if anybody could point me in the right direction. I'm looking at developing a Windows User Control using Visual Studio .NET 2005 in C#. The user control is to be used on a web page to replace an existing Java applet. One of the main reasons for switching from Java to th...more >>

Interop problem while implementing "Observer" pattern
Posted by CAra at 10/24/2005 2:22:49 AM
Hi All, I have a problem with interop as explained below: I have a component build in VC++ 6.0. I have built another component in C#. These two components follow "Observer" pattern where VC++ component acts as the subject and C# component acts the observer. As C# is the observer, it ha...more >>

crash at gc_heap::mark_object_simple
Posted by doublezeta NO[at]SPAM gmail.com at 10/23/2005 4:49:29 PM
I post this at the framework group, but then later I realize mine probably a interop question, so I am reposting here. I am using running my app at win2003 sp1 dotnet 1.1. My aspx app always crash inside gc_heap::mark_object_simple. The crash stacks are similar each time. I was wondering is...more >>

Passing a Delegate for Callback from C# to MFC C++
Posted by John Kortis at 10/22/2005 8:34:18 AM
How do you Pass a Delegate for Callback from C# to MFC C++ I am programming both ends. Any thoughts? tia john ...more >>

Interop error in vb.net
Posted by justin.hayworth NO[at]SPAM gmail.com at 10/21/2005 10:43:15 AM
I am trying to use a function in an unmanaged dll and I am getting a System.NullReferenceException when called. I do not have source code for the vendor dll. >From the dll header file the declaration is: WEBEXPORT char* function1; vb.net ------ <DllImport("vendor.dll")> _ Public Shared...more >>

Passing array of IUnknowns from unmanaged to managed
Posted by John Lutz at 10/21/2005 9:43:02 AM
I need to implement a COM interface in VB.NET and C#.NET. The interface has the following method: void SetObjects([in] SAFEARRAY(LPUNKNOWN) objects); In other words, I need to pass an array of IUnknown pointers to VB or C#. I can change the interface however I want. My goal is to make t...more >>

Calling a .Net form in vb6 MDI Application
Posted by Splat021 NO[at]SPAM gmail.com at 10/21/2005 8:17:25 AM
Hey Everyone In my current project, which is invloving making enhancements to an old VB6 application, I need to do following things: 1. Call a .Net WinForm (present in a .net dll) from a VB6 MDI application 2. The called WinForm should behave like a child form of the main MDI form in the VB6...more >>

Windows XP themes in a COM Add-in
Posted by Chris at 10/21/2005 12:00:00 AM
Been trying to get WinXP themes to work in an Office COM Add-in. I came across this article: http://support.microsoft.com/default.aspx?scid=kb;en-us;830033 which had a C# example. All good, until I hit the juicy statement at the end, which makes it all work: using( new EnableThemingIn...more >>

Remote Installation Program
Posted by Peter Avalos at 10/20/2005 2:51:20 PM
My goal is to create a remote installation program to rollout program installs and updates. We're a small company with about 60 workstations, so it's not worth the investment in SMS. I have the first part working which used the directory services namespace to enumerate the workstations in a ...more >>

suppress blank page
Posted by Veena at 10/20/2005 12:43:01 PM
I am using visual c#.net to do Mail Merge with Microsoft Word 2003. When the word document has 18 or more merge fields, the merged document works fine, but creates a blank page at the end. Please let me know, if you have a solution for this issue. ...more >>

IntPtr marshal causes exception
Posted by MLM450 NO[at]SPAM hotmail.com at 10/20/2005 11:15:46 AM
I am writing a C++ program that is using a C# control. It calls a function that requires a handle to data in memory. If I set up the C# function to take this parameter as a uint, it works fine. I would rather set up the parameter as an IntPtr. But when I do that, I get an exception when the C++ ...more >>

MFC calling .NET component. Get Error Message
Posted by Anthony Yott at 10/20/2005 8:58:05 AM
Folks, Quick question. I've created a .NET library component that will be used by some of my MFC C++ customers by making the .NET component COMVisible (ie I will create the .NET Component in C++ as a COM object). I'm creating a simple MFC Dialong application to test the component. Everythi...more >>

CompiledAssembly.CreateInstance returns nothing
Posted by Eric at 10/20/2005 8:02:08 AM
I have a .Net class in a dll that compiles code on the fly. Everything is working great from all .Net applications. I'm now trying to make this class Interopable. I don't receive any erros after calling CompileAssemblyFromSource but when I try to create a instance of my class (CompiledAss...more >>

Displaying modeless VB6 form in a WinForms app
Posted by WeBe at 10/20/2005 12:00:00 AM
Hi, We have a large application built with a PlugIn/SnapIn technology in VB6 today. We are now in the process of upgrading it to .NET 2.0. But of course we cannot convert all SnapIns at once, some of them might exist for a long time. So we need to use Interop... However, when one of the...more >>

help needed passing array to COM caller by marshalling
Posted by jg at 10/19/2005 9:09:58 PM
I have searched marshaling articles from MSDN and Google but I am stuck with solving my problem to marshal arrays to COM caller from my managed COM class I built a .net COM class in VB and tested it from an application built with C tool.. It worked well except for those functions in the ...more >>

Unmanaged COM process doesn't exit when .NET client ends
Posted by Robin at 10/19/2005 7:28:07 AM
I'm sure it's something simple I'm overlooking but... I have a .NET app written in C#. I imported a couple of different COM servers via the Add Reference->COM window. I then start up the servers by "new"ing them up (see example code below). The server starts up correctly. The problem is that w...more >>

Best way to write an app using Excel sheets that doesnt look like excel
Posted by Tom Couvret at 10/19/2005 5:51:58 AM
Hi, Appologise for the cross post, but this fits both in Excel and .NET world. I've got a requirement to build a windows app for a specific type of financial modelling. My ideal position would be to write a .NET windows form app that embeds an excel worksheet in the way a grid control woul...more >>

Create/use Interop but still have to register dll?
Posted by Mike Eaton at 10/18/2005 3:15:02 PM
Hi there, I'm working on a simple VB.NET app in Visual Studio 2003 that uses classes in the msxml4.dll. I added a reference in my project to the msxml4.dll and VS created the Interop.MSXML2.dll. However, when I attempt to execute the program, I get an error stating that the COM object wi...more >>

Winform inside MDI client
Posted by MLM450 NO[at]SPAM hotmail.com at 10/18/2005 1:17:07 PM
Is it possible to show a C# winform that stays within an unmanaged C++ MDI client area? Basically, I want the winform to behave like a standard view window. If it is possible, how can I accomplish it? Thanks ...more >>

C# passing managed byte array to C++ function in unmanaged code
Posted by tsnyder NO[at]SPAM digital-ego.com at 10/18/2005 9:02:28 AM
Hello All, I've recently come accross a problem when trying to work with a unmanaged dll compiled in C++ (Visual Studio 6.0). When calling the dll from my C# application primitive data works okay for converting PLONG, INT, BOOL to the right function signature. For example: C++ Function: LO...more >>

'Type Mismatch' exception when calling Word.Application.Documents.Open method in Office (Word) 2003 PIA from C#
Posted by webstuff NO[at]SPAM urbanperspective.net at 10/18/2005 8:41:47 AM
Hi, I'm getting a 'Type mismatch' exception when calling the Word.Application.Documents.Open method when using the Office XP 2003 PIAs. the actual error is: System.Runtime.InteropServices.COMException (0x80020005): Type mismatch. This method works when using the Office XP PIAs (not that ...more >>

Access is denied
Posted by ruca at 10/18/2005 12:00:00 AM
Hi, I'm getting this error "Access is denied" in my Web Application when I try to communicate with a Com object that I have. It's running under Windows 2000 Server. Can anyone help??? -- Programming ASP.NET with VB.NET Thank's (if you try to help me) Hope this help you (if I try to h...more >>

Forms Authentication
Posted by Michael Tissington at 10/17/2005 6:03:41 PM
I'm having problems with Forms Authentication in a hosted environment. On our in house server and on my development machine everything works correctly However in a hosted environment, when clicking on a link to any exe file in my download\installs folder the login page is not displayed and...more >>

Producing idl files?
Posted by Juan Dent at 10/17/2005 3:55:01 PM
Hi, I have some C++ native clients that need to interact with managed assemblies for which there are existing idl files (these assemblies are migrations from C++ to C#). The C++ clients use idl files to build the .tlh and tli files so they can interact via COM with the assemblies. Using #...more >>

Calling Win32 method from a Thread, never returns.
Posted by Daniel Halan at 10/17/2005 10:34:03 AM
Hello, I have a Win32 DLL that I call, it works perfectly when the methods are called from the main process of the application (witch is a ASP.NET site) but when called from a new thread it gets locked inside the call. Just to exclude any type problems & lockings I have exported a test meth...more >>

Using Winerror.h in C#
Posted by Lady_A at 10/16/2005 12:00:00 AM
Hi, I would like to use one of the error codes defined in WinError.h. There is no iclude anymore. I have put in "using System.Runtime.InteropServices" and the compiler still doesn't recognize the error code. There must be some way, other than defining it by myself... Anybody ? ...more >>

Retrieve multiple instances of an object through GetActiveObject ?
Posted by ME at 10/15/2005 8:55:47 AM
I have a registered COM application (.exe) that creates a telnet session upon startup. If the application is running I can use GetActiveObject("Reflection1.Session") to get a reference to the Session interface of the running application. Using Process.Start("path to exe") I can even get th...more >>

Excel COM Wrapper in C#
Posted by ps at 10/15/2005 12:00:00 AM
In OLE/COM Object Viewer, I found Excel Interface _Worksheet like this. [uuid(000208D8-0000-0000-C000-000000000046)] [helpcontext(0x00020010), dual, nonextensible] dispinterface _Worksheet { // : // : [id(0x000000c5), propget, helpcontext(0x000100c5)] Range* Range([in] VAR...more >>

problem mashaling struct to in/out of legacy dll.
Posted by Nick at 10/15/2005 12:00:00 AM
I've got a structure I'm trying to marshal to a custom.dll I'm missing something, because some of the values marshal, others do not. I dummied up a .dll so I can see both sides of the problem, but that's not been much help.. When I call the function, the strings marshal fine, as do the b...more >>

C++ Windows Handles From C#
Posted by PleaseHelp at 10/14/2005 5:28:09 AM
I have an app which creates a window and C# and needs to pass the window handle (HWND) and App Instance (HINSTANCE) to a C++ dll whicj will do some direct show stuff. I have created the C++ MFC app and pass the window.Handle (System.IntPtr) There is a wrapper which looks like: [ DllImport(...more >>

OleDb and foxpro dbc in Com+ component
Posted by Gibson at 10/14/2005 3:55:35 AM
Hi, i created a dll for database access. i use it in combination with a foxpro dbc. using it directly in an application and/or with mssyl, it works fine. if i wrap it in a com+ dll and want to open the OleDbConnection it fails with the following error: at System.Data.OleDb.OleDbConnec...more >>

Find vb6 app name from .net DLL
Posted by DBLWizard at 10/14/2005 2:04:22 AM
Howdy, Is there a way to get the VB6 calling application name in a .net dll called via com interop? What I am trying to do is determine what the app.config file should be named when the .net dll objects are called from ASP. My guess is going to be either svchost.exe or dllhost.exe but I was...more >>

.net control from vb6
Posted by Kevin Earley at 10/13/2005 2:04:41 PM
I had a .net control running fine in vb6. I change something in the control and now I can still get the .net control on the vb6 form, but i can only see the standard properties, not the ones I've added. I tried creating a new project with a new control and it now does the same thing for every ....more >>

Dynamically updating DllImport reference
Posted by Joe at 10/13/2005 2:01:24 PM
In my program I am setting the DllImport attribute as so.. [DllImport("mydllname.dll")] public static extern void etc etc.. The dll gets updated often so I wanted to store the dll name in an App.config and then have the program set the attribute. Is this possible? Any help appreciated. Jo...more >>

Passing huge array from C# to c function
Posted by JocK at 10/13/2005 3:32:47 AM
Hello everybody, We are evaluating the use of C# and GDI+ to develop a GUI based application which elaborate image (stored as array of native type). This application needs to call several native C functions in order to perform some intensive computation on the image. Basically I will store th...more >>

QueryInterface for interface ... Failed
Posted by John Bailey at 10/13/2005 12:12:01 AM
I have written a service that uses a VB6 COM dll. The service access the COM dll through a .Net wrapper assembly and interop assemblies generated by Visual Studio. I have a windows forms application that I used to test this assembly. The service runs fine when tested on my Windows XP mach...more >>


DevelopmentNow Blog