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 > april 2007

Filter by week: 1 2 3 4 5

what is the message loop I should use for .net com server componen
Posted by Benny at 4/30/2007 11:50:02 AM
Due to the 3rd party library limitations, I have the following constraints: - max of one instance of a a class instance per exe instance (RegisterTypeForComClients(..., SingleUse). - the module must run under a pre-configured nt account. - solution must be in .net The solution i have is a CO...more >>


How to call (Win32)FindResource in WPF app?
Posted by MichaelG at 4/30/2007 7:50:01 AM
I'm building a splash screen for a .Net 3.0 WPF app. The SplashScreen class needs to load a bitmap (.png) using Win32 functions but I'm having trouble figuring out how to add the bitmap to my project so it is visible to (Win32)FindResource and then determine what the ResourceID or ResourceNam...more >>

ASP 2.0 web page -> C++/ATL/COM service -> C# test app for service
Posted by Gold Panther at 4/27/2007 11:43:53 AM
I posted these message under another post that wasn't named well. Since I don't know how to change the post name, I'm starting a new one. The tutorial can be found at: http://support.microsoft.com/kb/811645 It's about writing event sinks in C# to catch events from C++/COM. The idea is...more >>

Intermittent/Random Enumeration of VB6 Collection Class
Posted by PatrickHRAS at 4/27/2007 8:44:05 AM
I have a VB6 collection class that does not always return the correct number of items when enumerated using a c# front end. However the enumeration only fails in a release version of the exe. If the project is debugged in Visual Studio or a debug version of the exe is made the enumeration alw...more >>

How do do CoRegisterClassObject(... REGCLS_SINGLEUSE) in .net
Posted by Benny at 4/25/2007 3:30:02 PM
I have a class written in an EXE. How do I express the same behavior as CoRegisterClassObject(... REGCLS_SINGLEUSE) in .net for that class. For example, for every instance created by the server object, I would like it launch a new instance of the EXE. Thanks....more >>

<DispId(0)> attriubute
Posted by JerryWEC at 4/25/2007 2:40:46 PM
I'm using <DispId(0)> attriubute for my COM-Interop interfaces... I have two interfaces one for events and another for properties and methods. I'm using <DispId(0)> attriubute to <DispId(16)> attriubute some are used in one interface and some are used in another. Can I do ranges l...more >>

Regasm /regfile attribute lies?
Posted by Matthew Wieder at 4/25/2007 2:24:01 PM
I have an Office Add-In that I am distributing and installing. When I run Regasm /regfile on it, and then double-click the resultant regfile (adding it into the registry) my Add-In does not appear in the list of available automation servers on the machine. However, if I call Regasm on it, it...more >>

NullReferenceException - COM Interop method fails on Windows 2003 Server - Urgent
Posted by GPG at 4/24/2007 6:05:24 PM
I have a dll compiled from VFP which I need to access from my ASP.NET web application build using VS .NET 2003. Everything work fine on Windows XP (dev) machines but when I deploy the solution to a 2003 Server I get errors calling the methods of the VFP class. I can create an instance of th...more >>



how to create a com object using a progid read from config file
Posted by Benny at 4/24/2007 3:44:04 PM
How to I create a COM object when all I have is a GUID that is read from an ext config file and w/o using interop to raw WinAPI calls. For example, I defined interface IFoo in a .net dll. I also have a ServicedComponent that derives from IFoo named FooSvr. In my .net client code, I want t...more >>

Marshaling question
Posted by Markward Schubert at 4/24/2007 9:44:08 AM
Hi! I would like to call a c-function with the following signature: STATUS LNPUBLIC NSFDbOpen (const char far *PathName, DBHANDLE far *rethDB); The paremeter PathName is the path to a Lotus Notes database. My PInvoke declaration looks like this (VB.NET): <DllImport("nnotes.dll")> Priva...more >>

com in winform of .net could not display wrong character??
Posted by nightsky at 4/22/2007 10:38:02 PM
sorry , my english is poor. hope you guys could understand me. i have a activex window(com), an i use this activex ctrl on a winform window(.net). The Acitvex Ctrl has en Edit Window taking character. when i input character like chinese or japanese, the edit window CAN NOT display the righ...more >>

COM object not firing events when used in .NET apps
Posted by ISGADMIN at 4/19/2007 3:20:01 PM
Hi - I am trying to use the Lotus Sametime COM Toolkit (http://www14.software.ibm.com/webapp/download/preconfig.jsp?id=2007-03-15+03%3A35%3A07.908116R&cat=collaboration&fam=&s=c&S_TACT=104CBW71&S_CMP=) in a .NET app via COM interop. The events fire properly when used in a VB6 app, but I d...more >>

const void*
Posted by Sajan NO[at]SPAM community.nospam at 4/18/2007 5:41:10 PM
From C# I am trying to call the following API (http://msdn2.microsoft.com/en-us/library/ms684063.aspx) JET_ERR JET_API JetSetColumn( JET_SESID sesid, JET_TABLEID tableid, JET_COLUMNID columnid, const void* pvData, unsigned long cbData, JET_GRBIT grbit, JET_SETINFO* psetinfo...more >>

Question about C# & non-automation compliant interfaces
Posted by carl_bevil NO[at]SPAM yahoo.com at 4/18/2007 3:07:47 PM
Hi all. I have searched on the web and usenet but haven't seen a good solution for this problem; there may not be one that meets my needs. But I thought I'd ask here; if you can help I'd appreciate it. I have a COM interface that I would like a C# object to implement. I also have a C++ DLL t...more >>

excel process not terminating properly
Posted by chuckie_9497 NO[at]SPAM hotmail.com at 4/18/2007 10:28:35 AM
hello all you gurus. I am struggling with releasing com objects. I have isolated the problem to the code below. Objects are released and the process ends until I use "int k = sheet.Count;" Then the process does not end. So I feel confident the problem occurrs here. It appears another referen...more >>

Returning a struct with an array from a C++ dll to C#
Posted by abhiM at 4/18/2007 9:19:50 AM
Hi, I have a C++ Dll that has a function that is being exported as shown below extern "C" __declspec(dllexport) validationResult __stdcall _validateData(double dataToMat[], int time); A structure is defined in the header(.h file) as shown below struct validationResult { int r...more >>

excel reference remains open
Posted by pleaseexplaintome_2 NO[at]SPAM yahoo.com at 4/17/2007 2:43:47 PM
using the code below (some parts not included), I create a new excel workbook with spreadheets. I then want to delete a spreadsheet, but a reference remains open and excel stays in task manager when the code highlighted below is used. can someone help me identify what object remains open and ...more >>

Calling method COM+ server failed
Posted by dom_perron NO[at]SPAM hotmail.com at 4/17/2007 10:25:32 AM
Hi, I wrote a COM+ server application with these attributes: [ObjectPooling(MinPoolSize=1, MaxPoolSize=1)] [JustInTimeActivation(true)] [ClassInterface(ClassInterfaceType.AutoDual)] [ComSourceInterfaces("Thales.OPPSR2.TacticalLayoutClipboard.IClipboard")] [SecurityPermissionAttribute(Secur...more >>

print the current time on the screen
Posted by Allen Maki at 4/15/2007 3:09:31 PM
Hi everybody, I need help. I want to print the current time on the screen. After research I managed to run the codes below in regular C++. But I could not make it to run in .NET Framework environment. Can anybody tell me how to make these codes to work in .NET Framework or sho...more >>

Shell32 COM and other question(s)
Posted by Ondrej Psencik at 4/14/2007 9:01:51 PM
Hi, I have basically 2 question related to COM objects. 1) I am using in C# project (NET 2.0) Shell32 (so it is referenced in the project) and I am using it to retrieve details of the file. The code is: FileInfo f = new FileInfo(path); Shell32.Shell shell = new Sh...more >>

RegFree Com with Microsoft Access 2003 (XP / NET 2.0)
Posted by Patrick Wolf at 4/13/2007 8:35:52 PM
Hi, I am trying very hard to use RegFree Com from Microsoft Access 2003 on XP Pro .NET 2.0. I made a class library project in VS 2005 C# (Service.cs & Assembly.cs). When referencing in from a local installed Access it works fine. When trying to run it from a different workstation where Tes...more >>

closing excel from c#
Posted by pleaseexplaintome_2 NO[at]SPAM yahoo.com at 4/12/2007 11:36:57 AM
Help please. The excel instance is removed from task manager when I run the code below. If I uncomment the lines pertaining to a workbook, the instance of excel is not removed from task manager. can someone help? Thanks Excel.Application xl1 = new Excel.Application(); //Microsoft.Office.I...more >>

How can one use or extend a C++ class in a pocket pc project?
Posted by Pulkit at 4/12/2007 3:54:00 AM
How can one use or extend a C++ class in a pocket pc project which uses C#. Suppose I have written a C++ class,in a Visual C++ project,which gives output as .DLL. Now my first query is How can i add this DLL to my C# project(can i add it in references)?Secondly how can i access this class in ...more >>

Marshalling of VB6 variant containing an array
Posted by buerklma NO[at]SPAM arcor.de at 4/11/2007 11:23:07 PM
Hello NG, I have a problem using variant parameters in C#. I have interface defined in VB6. In this interface there is a method defined containing a variant parameter (vParam): Sub gNotify(ByVal oNotify As srvUIConst.UIInterfaceClass, ByVal lMsg As Long, lParam As Long, Optional vParam A...more >>

Didn't work
Posted by Gold Panther at 4/11/2007 10:35:24 AM
The article seems to be missing something. I've jerry-rigged some message boxes into my DLL that fires the event, and I get them every time. It seems to say that there are no connections although the program I have that has the event sink has advised the DLL that it wants the messages like in ...more >>

Problems with enumerable interface in COM
Posted by Mads Nielsen at 4/10/2007 1:58:02 AM
Hi, I am converting a C# application to run on version 2.0 of the .Net Framework. The previous version was built on version 1.1 of the .Net Framework. The application is a workflow engine which can run a “Project”. The developer of the workflow project can add custom code at each step ...more >>

System.Security.SecurityException, EnumWindows & Callback
Posted by Zamdrist at 4/6/2007 1:47:38 PM
Running an application executable (release) runs find on my computer: "The application attempted to perform an operation not allowed by the security policy."... System.Security.SecurityException: System.Security.Permissions.SecurityPermission... Thoughts? I was able to narrow the problem...more >>

c# struct to asp
Posted by danny at 4/6/2007 1:29:09 PM
can anyone tell me how i need to get a struct of strings to asp? thanks all ...more >>

EnumWindows, how to identify windows
Posted by Zamdrist at 4/6/2007 6:19:11 AM
I can return a list of windows and their titles using the API, AddressOf & Callbacks, however I get all programs/processes like GDI+, DDE Server, etc. I really just want the programs opened in the taskbar, such as Outlook, Query Analyzer (whatever)...How can I fliter the list? I was hoping to...more >>

Unable to find entry point
Posted by ice at 4/6/2007 12:19:24 AM
I've created very simple dll i c# *************************************************** using System; using System.Collections.Generic; using System.Text; namespace dodawanie { public class Class1 { public int suma(int x, int y) { return x + y; ...more >>

Does .Net modify native IDataObject within an Application?
Posted by Jim Parsells at 4/5/2007 2:52:03 PM
Please bear with me here. The point of the question is a very narrow difference in behavior between Drag/Drop between applications and Drag/Drop within an application. However, some background is needed to actually understand the question. The environment in which I observe this problem i...more >>

Wrong Interop Version of Excel loads
Posted by george at 4/5/2007 2:08:07 PM
I have both Office 2003 and 2007 on my desktop. I am tryin to force VS 2005 to use the 2003 version bit keeps getting a refernce to 2007 Specifically: When I select Excel 11.0 object library it references: C:\WINDOWS\assembly\GAC\Microsoft.Office.Interop.Excel\12.0.0.0__71e9bce111e9429...more >>

WinWord crashes when closing Print Preview mode within DSOFramer
Posted by Brian at 4/5/2007 9:38:40 AM
We have a WinForm app in which we are embedding Word 2003 via the DSOFramer control. We have hooked into the "OnPrintPreviewExit" event of the DSOFramer control. On some machines (but not others), when in Word's PrintPreview mode, if the close button is clicked, an exception occurs in "Win...more >>

opening recordset causes intermittent hang when debugger attached - ADODBSlowness.zip [0/8]
Posted by Dandle at 4/5/2007 9:11:13 AM
Hi, We have converted our database connection layer and business layer to ..net, but still have the UI in vb6. That is why we are still using ado 2.8 (we often times return a recordset to the UI). We are having a problem where the call to open the recordset is intermittenly hanging. Th...more >>

Could not load file or assembly 'Microsoft.Office.Interop.Word
Posted by sajithkahawatta NO[at]SPAM gmail.com at 4/5/2007 12:33:58 AM
my web page C#.net is work properly in my iis .but when i publish in another server it give errers.i used vs2005 and ms word 2003. but in the server there is no vs2005 or word installed. it has only .net frame work installed.folowing the error, Parser Error Message: Could not load file or asse...more >>

Excel VBA Paste of Range with PrefixCharacter fails from VB.NET
Posted by gurfle NO[at]SPAM oz.net at 4/5/2007 12:00:00 AM
Operating System: Microsoft Windows Version 5.1 (Build 2600.xpsp_sp2_gdr.050301-1519 : Service Pack 2) Visual Basic: MIcrosoft Visual Basic 6.3 Version 9972 VBA: Retail 6.4.9972 Forms3: 11.0.6550 (comes with Excel 2003) The code below fails to copy the PrefixCharacter from cell "a1" to ce...more >>

Invalid cast exception when debugging a VB6 COM addin
Posted by Magnus Hyllander at 4/4/2007 3:42:46 PM
I have a problem with debugging a COM add-in for Microsoft Word, written in VB6. I access the COM add-in from a C# application using COM Interop. The C# app begins by getting a handle on the Word.Application object, and using that a handle on the correct COMAddIn object. Then I use the Obje...more >>

Pointer to array of structs in a struct.
Posted by Christoffer at 4/4/2007 1:44:33 PM
Heya, I know this has been debated alot, but everywhere I look there is a different solution. So I need some advice on this: The source if the following struct: typedef struct { BYTE Ps; tSTRUCT_NUMERIC * Rates; char * RegNr; char * Cashier; } tFUNC_PARAMS; Ho...more >>

Working with windows out side the VB.Net app
Posted by Zamdrist at 4/4/2007 7:15:28 AM
Looking for a clue in on the .Net functionality to manage windows outside the application, i.e. other applications. Just looking to find the window handle by title and adjust its properties such as top, left, etc. Much like here, but using Win32 API http://vbnet.mvps.org/index.html?code/hel...more >>

When NOT to use SafeHandles?
Posted by obiwanjacobi at 4/3/2007 8:54:59 AM
Hi, I use PInvoke interop to call the Win32 multi media Midi functions (midiXxxxx). This API uses a handle for an open Midi in or out port (device). I also use a callback function to get notified of opening and closing of the port and of incoming midi data or when sending midi data has finish...more >>

Possible to embed .NET control into MS Word?
Posted by Duracel at 4/2/2007 3:29:18 PM
Hi, I know you can embed OLE (COM) based objects into a word document, but is it possible to do the same with a C# or VB.NET windows forms control? If not, are MS working towards such functionality? Thanks ...more >>

Interop Interface from .Net to VB6
Posted by Rory Becker at 4/2/2007 11:47:31 AM
Ok, first off I hope I'm asking this in the right place. I realise that many people (especially those who love VB.net/c#) actively detest VB6. Please understand that if this is your viewpoint, answering this question will in fact speed us on our way to using .Net instead of VB6 I need t...more >>


DevelopmentNow Blog