Psst! Did you know DevelopmentNow is a mobile web site design agency?

Contact us for help mobilizing your site, or to sign up for our beta Mobile Web SDK!


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
February 2010


all groups > dotnet interop > april 2008

Filter by week: 1 2 3 4 5

Problem installing Outlook Add-in
Posted by John at 4/30/2008 4:05:25 AM
Hi I have an Outlook add-in solution which includes a setup project. If I install the Outlook add-in by right clicking on the setup project and sleeting Install then the add-in gets installed fine in Outlook. However if I use the setup generated in the setup project Release folder then even...more >>

HELP! Setting a ListView Item Text across process
Posted by ME at 4/29/2008 9:47:26 AM
I have some questions about setting a ListView Item from a different process. I have found that it is possible to manipulate a ListView from another process. Using a modified version of the code found here by Chris Taylor: http://www.dotnetjunkies.com/WebLog/chris.taylor/archive/2004/05.as...more >>

Using C++ unmanaged library from C#
Posted by Kenneth Porter at 4/28/2008 2:07:08 PM
I've written a cross-platform library in C++ for handling some external hardware. It communicates with the hardware via a C-calling-convention protocol library. I'd like to make my library available to .NET users and in particular C# programmers. What's necessary to do this? The API's ar...more >>

pinvoke with StringBuilder[] not working for me
Posted by LK at 4/27/2008 12:47:58 PM
Hi, From a C# program I need to access an existing DLL that enumerates the boards detected via a hardware probe of the system. The function that does the enumeration expects an int * where it stores the number of boards detected and a char *** where it stores the name of each board detec...more >>

Is vs 2008 enough for office Add-Ins
Posted by John at 4/27/2008 1:07:19 AM
Hi Is vs 2008 pro sufficient to write office add-Ins or do I need vsto 2005 SE as well to write office add-Ins? Thanks Regards ...more >>

Outlook AddIn in vs2008 questions
Posted by John at 4/26/2008 7:53:12 PM
Hi I have a simple Outlook 2003 AddIn created using Outlook 2003 AddIn template in vs 2008. The full code is given below at the end. I got warnings on Interop assemblies as I have Office 2007 installed while AddIn is 2003 but as I need to target both 2003 and 2007 I am sticking to lowest co...more >>

Marshalling [out]SAFEARRAY(HRESULT)*
Posted by juergen.veidt@capgemini.com at 4/26/2008 2:28:09 PM
Hi, I have a COM interface function that has an [out]SAFEARRAY(HRESULT) * arrHr parameter. The function is implemented in C# and is called from C++. Unfortunately it doesn't work. I always get an error 0x80131533 SafeArrayTypeMismatchException (except if I set arrHr to null). The C# sign...more >>

c++ interop performance
Posted by devdude at 4/25/2008 2:26:40 PM
Hello, I'm testing out c++ interop v/s direct p/invoke and noticing that c++ interop, for my tests, are much slower then p/invoke. I am wondering if there are any default (security??) policies I need to disable to improve performance as I would prefer c++ interop. My test is as follows: ...more >>



Trying to get strings from EVENTLOGRECORD
Posted by TheLongshot at 4/25/2008 1:44:32 PM
Ok, I've called ReadEventLog in C# and got back an EVENTLOGRECORD struct. I'm able to read that fine. But, when I try to get the strings (SourceName, ComputerName, etc), all I get is junk. I don't know if I just don't know how to convert the byte array correctly into a string. I tried conver...more >>

Exposing C# as COM, clr lifetime
Posted by Mark at 4/25/2008 1:03:02 PM
Hi... I know this is going to sound weird but we have a number of objects written in C# that we expose as COM (don't ask why). Regasm has them with ThreadModel=Both. One of our big consumers is an ISAPI filter that is CoInitialize()/CoUninitialize()ing STA at every stage. I've got a ...more >>

Class in mixed mode project inheriting from class in unmanaged project?
Posted by Chris Ashley at 4/24/2008 7:28:23 AM
I need to implement callbacks from methods in an unmanaged DLL to a mixed mode DLL. I'm having trouble finding examples on how to do this and all the examples I find seem to revolve around interactions between managed/unmanaged classes in a single mixed mode DLL. Is it possible for me to defin...more >>

Struct w/ VARIANT Marshalling
Posted by Michael at 4/23/2008 6:53:03 PM
Hi, I've been banging my head against this one and now I'm about to scream. Any suggestions appreciated. I've scoured the net too and for some reason all suggestions don't work. I've got a C++ app that takes a function pointer from a C# application (it's for a callback). The callback signature lo...more >>

Problem with COM interface using IntPtr...
Posted by theunissen@comcast.net at 4/22/2008 9:51:53 AM
Hi, This message is related to a problem I posted a few days ago: http://groups.google.com/group/microsoft.public.dotnet.framework.interop/browse_thread/thread/4d243fe978432c06/37881b961489f153?hl=en&lnk=st&q=Visual+Basic+X64+COM+parameter#37881b961489f153 I had a problem where INT"_PTR" in...more >>

AccessViolationException when sinking managed event in unmanaged C
Posted by UrK at 4/21/2008 6:04:02 AM
I am trying to sink event thrown by managed code in C++. When the event is thrown the control never reaches unmanaged client. AccessViolationException is raised in managed code at System.RuntimeType.ForwardCallToInvokeMember. I am fighting this issue for a long time now with no effect at all o...more >>

executionEngineException
Posted by JB at 4/20/2008 9:20:01 AM
Vb.net app with COM control. The COM control is an object framer used by the vb.net app to treat other apps( eg. word) as embedded objects. Generally this all works fine. One of the functions of this COM control is to search embedded app data for text ( 'Find' this or that.) This also wo...more >>

COM interface requires Integer in VB, even though INT_PTR is defined in COM interface
Posted by theunissen@comcast.net at 4/18/2008 2:22:26 PM
Hi, I have a small problem. I have defined some interfaces in a COM dll, and have defined some parameters in these interfaces as INT_PTR. I thought that when I import the COM dll in Visual Basic.NET that I can use IntPtr as the type for these parameters, but the intellisense shows me that t...more >>

Structures
Posted by cal at 4/15/2008 2:52:59 PM
Hi all, When I want to pass an api function to C#, I use [DllImport ...] public ... ReturnVariable MethodName( args .. ... ) I understand that ReturnVariable cant be a structure. Is it possible to solve this by using C++ CLI, this is, some version of C++.net? thanks very much, Carlos. ...more >>

Passing bitmap back to COM based application
Posted by pmiele at 4/15/2008 2:15:03 PM
I have an application that uses a COM interface to get bitmaps for toolbar buttons. I have implemented a C# class that supports the interface. One method of the interface passes a pointer to HBITMAP to return the bitmap handle. The RCW for this method has the parameter as an IntPtr. I crea...more >>

GC.Collect() not cleaning memory, how to find out what references to lots of memory still exist?
Posted by DR at 4/15/2008 2:03:48 PM
GC.Collect() not cleaning memory, how to find out what references to lots of memory still exist? When all my processign is done i set everything to null and then: GC.Collect(); and then GC.WaitForPendingFinalizers(); but it still shows that my process takes 400 MB of memory. Is there any ea...more >>

How to register an app to the scanner events using VB.NET or C#
Posted by BuzzLightyear at 4/14/2008 10:28:00 AM
Does someone know about a piece of code in VB.NET or C# to register an app to scanner events using Still Image (sti.dll) API? I don't understend how to implement the API correctly using the provided documentation Or else another way to do that?...more >>

Converting a HBRUSH to a managed System.Drawing.Brush
Posted by trebanloasn@googlemail.com at 4/13/2008 6:52:51 AM
Hi, for my programm I need to use some gdi objects in C#. Converting a HBITMAP hasn't been so hard, but right now I'm trying to retain a System.Drawing.Brush from a HBRUSH. This seems to be not quite easy, as there is no FromHBrush - Method or something like that nor didn't Marshal.PtrToStructu...more >>

COM Visible base class properties
Posted by helionjunk@hotmail.com at 4/12/2008 2:51:06 PM
Is there any way to expose a base property to COM without overriding or shadowing? Here's what I'd like to do: <ComClass()> _ Public Class A <ComVisible(True)> _ Public ReadOnly Property One() As Integer Get Return 1 End Get End Property End Clas...more >>

MarshalDirectiveException: marshaling fixed array
Posted by yadolov@gmail.com at 4/12/2008 12:07:31 PM
Hi! I have IDL-file: const byte DataStrLen = 255; #pragma pack(1) typedef struct { wchar_t fDataStr[DataStrLen]; } tSomeData; #pragma pack() [ object, uuid(...), pointer_default(unique), local ] interface ISomeData : IUnknown { tSomeData* getDataPtr...more >>

Can not load 'ssleay32.dll' using DLLImport
Posted by deepaknawathe at 4/11/2008 3:47:00 AM
Hi, I am trying to call the unmanaged APIs defined in 'ssleay32.dll' through C#.Net Application. I have downloaded this file and placed it in C:\Windows\System32 folder. But when I try to call any of the fucntions from this dll I get following error. Unable to load DLL 'ssleay32.dll': Th...more >>

Repost from "microsoft.public.dotnet.languages.csharp" question about char * as a parameter
Posted by Chip Gore at 4/10/2008 3:04:34 PM
Hi - I know that this is most likely a Microsoft-ism, but none the less... I have a C++ class namespace JELLO { public ref class DEMO { public: DEMO() {;} ~DEMO() {;} bool DoStuff(const char *s1, char *s2) ...more >>

COM registration problems
Posted by geekgrrl at 4/10/2008 7:23:44 AM
I've got a ATL C++ COM server that I need to put into the C:\Windows \system32\spool\driver\x64\3 folder and /regserver it there. I can copy the .exe into the folder and run /regserver using an admin mode command prompt. The problem occurs when I try to build my test VB application. Orginall...more >>

A generic error occurred in GDI+. InteropServices.ExternalException
Posted by eschneider at 4/8/2008 2:43:17 PM
Hello, I get this error when serializing a object. Specificly an bitmap in the object. This object is obtained from a different dll than the one serialized, could that be the problem? That seems to be the only difference... Any way to fix this? Thanks, Schneider below if the code and err...more >>

Basic theory question about Interop
Posted by B. Chernick at 4/8/2008 11:58:01 AM
Assume that you have referenced an Interop assembly and have created an application object. (An Office object for example) Why might such an object display an expected list of properties in QuickWatch yet fail to display their values, instead displaying errors such as RPC_E_SERVERFAULT? ...more >>

Shared Add-in (Office Integration) & Practices Exception Handler
Posted by Scott Lyon at 4/8/2008 10:17:04 AM
A little while ago I created a Shared Add-in (an integration to MS Office), and now I'm trying to implement Exception Handling in the application. The thing is, quite simply, I cannot get it working. When I try to call the ExceptionPolicy.HandleException call, every time I get an "Object refe...more >>

Explicit Interface definitions or ComClass
Posted by JohnW at 4/8/2008 6:31:04 AM
Hi all. In spite of the fact that I keep reading that it's better to use explicit interface definitions when creating .net componets to use with VB6 client apps, the only examples I come accross use the ComClass templates. I understand that using the ComClass templates means that any requir...more >>

Events in manually created RCW
Posted by khalprin at 4/7/2008 9:21:03 AM
I've got a COM dll that I want to use in a C# application. The COM dll exposes an interface with about 6 methods, and two events. I want to create an RCW to make it easier for client applications to call the methods which take arrays as parameters, otherwise the clients need to use System.Arr...more >>

Windows Explorer context menu additions
Posted by Scott Lyon at 4/7/2008 8:51:03 AM
I'm currently re-writing an integration system (the original is VB6 code, the new is being written in VB 2005), and I've come to a major hurdle that I'm hoping you guys can answer. I'm also hoping I'm posting this in the right place for this. In a nutshell, I have already created a Windo...more >>

04 April 2008 : How to get which application copied to clipboard ?
Posted by Sham Yemul at 4/4/2008 7:16:39 PM
Hello, I am not sure this is the correct forum I am posting. I am developing an application that will detect if something is copied onto clipboard. Also I want to know which application has copied the text,object or whats-ever. I could get VB.net sample that fires event (WindowsProc ove...more >>

Help me please with call COM-object
Posted by Oleg S at 4/4/2008 11:15:47 AM
I use Illustrator in my ASP.NET app and I have error on string: =20 Illustrator.Document curDok =3D=20 appIll.Documents.Add(Illustrator.AiDocumentColorSpace.aiDocumentCMYKColor= , 300, 300); =20 full error is : System.Runtime.InteropServices.COMException was unhandled by user cod...more >>

Playing with IShellExecuteHook
Posted by Bryan Callahan at 4/4/2008 1:52:54 AM
I've been playing around with The Code Project: "Creating a shell extension with C#" (http://www.codeproject.com/KB/cs/dateparser.aspx) in order to learn how to make a basic shell extension. However I'm running into a snag. I'm not getting any message boxes on the test machine (vmware). After...more >>

VB2005 code talking to various versions of Office
Posted by Barry Flynn at 4/2/2008 4:34:27 PM
Hi I have some VB 2005 code which fires up an Excel spreadsheet, creates some headings, and then populates a number of rows. There are References to Office and Excel, and I use early binding. The machine on which I compile this code has Office 2000 installed, and the code runs happily on ...more >>

Deadlock Control.Invoke sinking events from out-of-process COM object
Posted by carl.clawson@pkinetics.com at 4/2/2008 10:31:47 AM
Say you have a COM object that fires events and which exists in another process, such as an executable COM server. Now sink those events in a form and update a control on the form. The events will not come in on the UI thread so you'll have to use some type of Invoke to update the control. ...more >>

Catch events from a DCOM server
Posted by Fabry at 4/2/2008 7:01:08 AM
Hi all, I have a DCOM server written in C++ running on a machine. It fires an event in response to a command from the client, written in C#. The client is running on another machine. When the client execute the instruction "MyServerObj.RasEvent += new RASLIBAPPLib._IRasInterfaceEvents_RasEve...more >>

Looking for Vista Folder Hook
Posted by Bryan Callahan at 4/1/2008 7:27:16 PM
I've been digging around MSDN in order to find an interface or something that would allow me to hook into a Vista folder in order to make a shell extension. Has anyone come across one? I would greatly appreciate /any/ help! Take care, Bryan ...more >>


DevelopmentNow Blog