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

Filter by week: 1 2 3 4 5

file or assembly name XXXX not found error for .NET COM interop in VBA
Posted by askingroups NO[at]SPAM gmail.com at 11/30/2005 8:00:37 PM
Hi, I am kind of stuck with this problem when trying to use the COM interop functionality of .NET. I am working on .NET 2.0 FCS on Windows 2000 Advanced Server. Here is the issue: I had a small assembly built in .NET 2.0 beta 2 with a simple class definition like this: using Syste...more >>


VB.net COM app
Posted by Curtis at 11/30/2005 5:40:58 PM
I am trying to make my VB.net application a COM object so it can be accessed by a VFP application. On the development computer I was able to compile in VB.net the compiler succesully registered my app as a COM component. I was then able to sucessfully connect to it from visual foxpro. When I t...more >>

Different Interop generated, but same COM dll - issue
Posted by tbatwork828 NO[at]SPAM hotmail.com at 11/30/2005 2:28:48 PM
We have a bit of an odd Interop issue (we think). We have a COM dll registered on the DEV machine. In IDE, our .net app references that COM dll and it all works fine without issues with the interop generated automatically in the debug envt. Debug build runs fine and it works. Now, we do a ...more >>

calling C++ dll from C#
Posted by marc joanisse at 11/30/2005 1:40:01 PM
Hi Folks, I am writing a c# app that interacts with some scientific hardware (a "bird", which is just a magnetic tracker) through a C++ DLL. The actual data from the "bird" is read by the procedure birdGetFrame(), which has as a second parameter a pointer to the struct BIRDFRAME, into which all ...more >>

can vb.net support WINAPI(_stadcall)?
Posted by jg at 11/30/2005 10:28:49 AM
or would I have to use C# or C++? ...more >>

MSXML and COM Interop
Posted by DavidCoghlan at 11/30/2005 7:10:06 AM
Hi, I came across the following KB article regarding the use of MSXML in .NET applications: http://support.microsoft.com/default.aspx?kbid=815112 It states that MS does not support either directly instantiating MSXML objects in .NET code, or marshalling MSXML interface pointers across t...more >>

COM RCW references and cross-thread marshaling
Posted by Dmytro Lapshyn [MVP] at 11/29/2005 3:00:35 PM
Hi everyone, Suppose I have created a COM object on Thread 1 which is an STA thread and assiged the obtained reference to a variable "myObject". Now I create another thread, Thread 2, which is an MTA thread, and start calling methods of the created COM object by using the reference stored i...more >>

Word Object Library 11 CustomDocumentProperties
Posted by James at 11/29/2005 10:41:02 AM
Is there a way to access and use CustomDocumentProperties in the Word Object Library other than using the InvokeMember of the Type? Any attempt to cast the object into Microsoft.Office.Core.DocumentProperties fails with an InvalidCastException. Sample: Microsoft.Office.Interop.Word.Docume...more >>



'Access is denied' accessing VB6 dll through RCW
Posted by AussieBob at 11/28/2005 8:07:49 PM
Hi, I'm having trouble using a RCW for a dll I created, I receive the "Access is Denied" error message from my ASP.NET application. In my MCP 70-315 book I read that the directory containing the COM dll needs to have write permissions for the User. -- I haven't seen this advice anywhere on t...more >>

Another C# marshaling question
Posted by Laurent at 11/28/2005 6:02:33 PM
Hi again, I created a thread some days ago, while I was trying to access a C++ DLL using my C# program. First of all, I want to thanks all the guys who helped me. But I still have a problem... My C++ DLL has a function which has the following prototype: long FF_Function(void...more >>

Problems with NetJoinDomain
Posted by Pyerwoh at 11/26/2005 10:43:13 AM
Greetings, I'm trying to join a computer to a domain by using NetJoinDomain from netapi32.dll. I found the signature on pinvoke.net, but am having difficulty getting it to work. I was hoping someone could check my code to make sure that I am doing it right -- (this is one of my first forays...more >>

With what program can I see all the functions in a non-.NET assembly or non-COM dll/exe?
Posted by Gabriel Lozano-Morán at 11/25/2005 7:51:55 PM
Is there a program to view all the functions in a dll ? For example assume that I want to see all the available functions in kernel32.dll... Gabriel Lozano-Morán ...more >>

Marshaling a link list structure
Posted by none at 11/25/2005 5:37:32 PM
I'm dealing with a legacy C DLL and I need some help & guidance with one of the structures and functions. We have a link list structure defined as: typedef struct OurLinkList { OurLinkList* pNext char chValue[1]; } OurLinkList; To allocate a node in our C code, we ...more >>

tlbimp To XML???
Posted by Richard T. Edwards at 11/25/2005 4:22:08 PM
I'm wanting to create a quick interop version of a COM ocx and am doing so using tlbimp.exe. The problem is that now, I want the output to be readable by my progam so that my program can write the .Net vesion of the events inside my program. I had hoped I would be able to simply use xsd an...more >>

Where is "managed support"?
Posted by TAPIGuruFred at 11/25/2005 11:51:55 AM
I posted a message on 11/17 and as a Microsoft Certified Partner, when using this alias, we are supposed to get a guaranteed turnaround. Does anyone else have problems with Microsoft recognizing and responding to partner posts? I double checked and my alias is connected to my account, which ...more >>

managed / unmanged - StringToHGlobalAnsi / PtrToStringAnsi
Posted by Bram Hoefnagel at 11/25/2005 7:37:53 AM
Hi, I've got a problem storing a string into unmanaged memory, witch can't be restored to managed code. I've build a NT Service manager, witch acces the Service properties throug advapi32 calls. I'm pretty sure the string is stored correct into the unmanged code, because thru the default window...more >>

Mehods not showing in COM (CCW) interface of .NET assembly
Posted by nigel.stephens NO[at]SPAM parasolit.co.uk at 11/24/2005 2:04:50 AM
Hi, I have created an assembley in vb.net by adding a class based on the component tempate to my project. I have a public function called send that has some parameters and returns a long type. I have built the project and used regasm.exe to generate a type library that is a COM Callable Wrapp...more >>

MIDL and preservesig and S_FALSE
Posted by tsteinke NO[at]SPAM gmail.com at 11/24/2005 12:18:20 AM
I am in a situaion where I have a set of idl files that I am building a ..NET assembly with. using midl and tlbimp. The problem that I have is that some of the interfaces return S_FALSE which I need to detect in my C# program. I can't modify the the idls and I don't want to do the ildasm/il...more >>

C# program calling a C++ DLL
Posted by Laurent at 11/24/2005 12:00:00 AM
Hello, I received a C++ DLL and I must include it in my C# programm. The problem is that I don't know how to convert the parameters from C++ to C#, specialy when there are pointers in it. There are 2 fonctions I would like to convert. The first one has only one parameter, b...more >>

How can I connect to any Word version that has a spell checker
Posted by **Developer** at 11/23/2005 8:57:43 PM
I did this: Dim objWord = New Word.Application and developed a spell check app based on it. For the above I found I had to add a reference to Microsoft Word 9.0 Object Library Now I'm wondering if someone running my app might have a Word that would work but is not Word 9.0 ...more >>

Where can I find ALL the HRESULTS?
Posted by Juan Dent at 11/23/2005 1:56:27 PM
Hi, Too often I am presented with an HRESULT that I don't recognize. I know winerror.h has some, but where can I find ALL of them and up to date? I am now using VS 2005. -- Thanks in advance, Juan Dent, M.Sc....more >>

.NET to COM
Posted by Yama at 11/23/2005 11:11:12 AM
Gentlemen, I am considering writing a COM object I could use in a C++ 6.0 environment. Is .NET Framework required to be installed on host machine when using my ..NET COM object? Or is there an automated way of only having to register the mscorlib.dll? I would appreciate some enlightenment. ...more >>

ICorRuntimeHost.Stop
Posted by Kevin Darby at 11/23/2005 10:12:57 AM
Hi, I was wondering if anyone had any success in loading and unloading the .net framework from a process. I can successfully load the framework, load types into the default domain, and interact with those types. When the time comes to unload the framework, I call ICorRuntimehost.Stop (h...more >>

Obtain computer's domain name
Posted by Mircea Pleteriu at 11/23/2005 12:00:00 AM
Hi, I want to obtain the name of the domain associated with the computer in the way it is displayed by the My Computer's Properties dialog. I've been using the native NetWkstaGetInfo method but it does not return the full name of the domain. Ex. Properties dialog display: Domain: web...more >>

Excel Performance
Posted by pearsons_11114 at 11/22/2005 5:10:02 PM
I have a VB.NET app. calling to Excel using an interop assembly and am having huge, unreasonable performance issues. To save a workbook takes 5 to 6 times longer than under VB6. I've read up on the issues, but it's hard to believe that _any_ issue related to threading or marshalling could be l...more >>

Can't disable default behavior when doubleclick on Excel Chart
Posted by jpl at 11/22/2005 3:12:03 PM
I am trying to disable the the default behavior (pop-up) when doubleclick on object within Excel Chart. I created a program to try out Chart1_BeforeDoubleClick(). When run, This event behaves differently than the description described in the VSTO document. I use Cancel = true in the code....more >>

Interoprabilty between C++ and C#
Posted by ketan dixit at 11/22/2005 12:00:00 AM
Hi I have a set of classes written in eVC++ Now what I need to do now is to export this classes to Dot NEt C#. So how do I do it? ...more >>

register COM (not COM+) component under .NET (managed code)
Posted by Lelekács Zoltán at 11/21/2005 6:42:42 PM
Hi, I would like to register a COM ocx under managed code (C#). I cannot use reg-free way, because the code has to run under Win2K. I cannot find any useful site/code. Thanks for any help. lelez ----------------------------------- http://www.lelez.hu http://www.csitcset.hu ICQ: 17...more >>

outlook items "addition time"
Posted by hsuntn NO[at]SPAM gmail.com at 11/21/2005 12:52:48 PM
I am grabbing Outlook MailItems using the Items[] property on my Outlook inbox. When I iterate through them, I notice that they are not ordered in ReceivedTime or CreationTime order. For example, Items[2].ReceivedTime is April 2005 Items[3].ReceivedTime is May 2005 Items[4].ReceivedTime is ...more >>

COM can't call .NET dll
Posted by Barb at 11/21/2005 6:39:06 AM
I'm trying to use COM Interop for the first time, and I can't quite get it all to work on my server. I have a COM Object that needs to call my .NET dll to encrypt a file. Then that file needs to be written to the web server. When I put the .NET dll in the same directory as my COM dll on my ...more >>

Pressing Tab in .NET switches to COM window
Posted by x at 11/20/2005 7:32:35 AM
I am launching a .NET windows form from some vb6 app. When I press the keyboard tab button it switches to display the vb window. Any ideas why? I am compiling the .NET form in Visual Studio with the compile for COM flag set to TRUE. haven't used any strong naming. Thanks ...more >>

Native DLL as a resource? Possible?
Posted by Ian at 11/20/2005 7:11:33 AM
Hello, I have a .NET application that calls functions in a native DLL. In order to ease deployment, and for simplicity's sake, it occurred to me that the best way to distribute this DLL would be as a resource. So I've added the DLL to the project as an embedded resource, and I've confirmed...more >>

Using the PickIconDialog with Windows 2000
Posted by Andrea at 11/19/2005 7:40:01 PM
Hi, I need to open the PickIconDialog window (I'm using C#). [DllImport("shell32.dll",CharSet = CharSet.Auto, CallingConvention = CallingConvention.Winapi)] public static extern int PickIconDlg(IntPtr hwndOwner, System.Text.StringBuilder lpstrFile, int nMaxFile, ref int lpdwIconIndex); ...more >>

Dll parameter: pointer to a unsigned char[] as parameter
Posted by Patrick at 11/18/2005 9:46:56 PM
To people wiser than myself: I'm calling a native dll in C# that takes a frame number and a pointer to an unsigned char to populate with video data. Here's the C++ method Signature: void DirectShowSource::GetFrame(int n, unsigned char* buf) and here is my attempt: [DllImport("vidfram...more >>

Acess the message pump from with in a class
Posted by justengland NO[at]SPAM gmail.com at 11/18/2005 2:53:35 PM
Does anybody have the example of how to use getmessage api? I would like to monitor the pump from with in a class or common dialog. Thanks Justin ...more >>

AxSHDocVw.AxWebBrowser Error (on VB.NET 1.1 Winform)
Posted by webgreginsf at 11/18/2005 11:51:02 AM
I'm having a problem using an axWebBroswer control on a VB.NET 1.1 Winform. When the form first loads, I'm able to call the .Navigate method with a url and everything seems to work fine, as the correct page is displayed. However, if I attempt to use the .Navigate method at a later time to na...more >>

Events from .net DLL not reaching VB6 app
Posted by Todd Beaulieu at 11/18/2005 6:56:37 AM
I have a VB6 app that instantiates a .net DLL class, sinking the events. It never receives the events, however. This very code has been working for almost one year on a number of servers. The problem server is a new box that we're trying to bring up with our applications installed. I get no er...more >>

RegAsm.exe /regfile /codebase
Posted by PFx at 11/18/2005 2:22:01 AM
Hi, Is it allowed to specifiy %windir% in de .reg-file that regasm.exe /codebase /regfile:foo.reg produces? Instead of "CodeBase"="file:///C:/WINDOWS/System32/Concentra.TripleDeal.DLL" I would like "CodeBase"="file:///%windir%/System32/Concentra.TripleDeal.DLL" After manually ...more >>

Ptr Arithmetic w/ Marshaller
Posted by Rich S. at 11/18/2005 2:20:02 AM
Hi, It is especially challenging to do interop marshalling with the Win32 API BackupRead, because it returns a byte array that can be interpreted in several different ways. My specific question is how to use the Marshal functions such as PtrToStructure when the unmanaged structure that I...more >>

At witt's end!!!! QueryInterface for interface xxx failed.
Posted by Todd Beaulieu at 11/17/2005 6:52:25 PM
I have spend ALL DAY on this. I see TONS of references to this error on Google, but NO solution to my problem. The DLLs in questions are all mine and they all work on several machines, but they refuse to work on one machine. I have a COM dll and an interop DLL for it. I have a .net DLL that ...more >>

Function Pointers in a struct
Posted by fvillaf at 11/17/2005 5:45:30 PM
I need to utilize in managed code some security functions from secur32.dll. To do this, i have to call 'InitSecurityInterface' function, which returns a pointer to a 'SecurityFunctions' struct. This struct have pointers to the secure methods. I've defined: [DllImport("secur32.dll")] ...more >>

Marshal array in structure
Posted by Lucvdv at 11/17/2005 9:26:36 AM
I'm trying to interface to InfoZip's Zip32.dll from VB.Net code. The DLL expects a structure with all its input parameters: typedef struct { int argc; // Count of files to zip LPSTR lpszZipFN; // Archive file name char **FNV; // file names to zip...more >>

ActiveX as a Service with events
Posted by TAPIGuruFred at 11/17/2005 8:43:08 AM
Putting this all together in one message to escalate this to managed group support using our MS Partner alias Have an ActiveX created in Delphi 7 and need to run it in a service by dynamically creating the controls at runtime with event handling. Using form based apps in any environment th...more >>

IContextMenu3.HandleMenuMsg VS2005
Posted by Jeff Gaines at 11/17/2005 5:50:27 AM
Having installed VS2005 pro yesterday (MSDN download version) I am gradually moving my VS2003 stuff over. I am having a problem with IContextMenu3.HandleMenuMsg (called when the Explorer Context Menu is shown) although it worked fine in VS2003. I get an error: System.AccessViolationException...more >>

How to get a variant returned from a c++ function in vb.net?
Posted by Thomas W at 11/17/2005 1:39:40 AM
Hello, I'm trying to call a function from a C++ dll which returns a variant: VARIANT DLLEXPORT ExecuteFunction (LPCSTR); This function (which I can't change) executes a SQL query and returns a single value - whatever the query asks for: integer, string, double etc. My declaratio...more >>

interop for string[] array
Posted by Egbert Nierop (MVP for IIS) at 11/17/2005 12:00:00 AM
The P/I function ADsBuildVarArrayStr works. When I look at the IL, no heavy Marshal code is done. I even suspect, that a pointer is passed to the array and that the array even not is pinned. But when it comes to passing a string[] array through a struct, it does not work. Are there any secr...more >>

COM interop - Framework Version
Posted by Nick Hall at 11/17/2005 12:00:00 AM
I've come across a bit of a problem since installing the 2.0 framework. I had created a class library using Visual Studio 2003, with one class configured as a COM object. The project was configured to launch a simple Visual Basic 6.0 project which allowed me to create the object and call som...more >>

MAPISendMail hang
Posted by Clive Dixon at 11/17/2005 12:00:00 AM
I'm calling MAPISendMail from my form with the MAPI_DIALOG flag set. However the resulting (modal) Outlook mail message window 'hangs' until such time as I click on a window of another process and click back again. Any ideas? ...more >>

PIA for Shell32
Posted by Brian R. at 11/16/2005 3:50:07 PM
Does Microsoft have a Primary Interop Assembly for shell32.dll (Windows XP - SP2)? If not, does MS suggest that developers create and sign their own PIA for this component? -- Brian R. ...more >>

How can one enumerate COM object properties exposed via IDispatch in .NET?
Posted by dblock NO[at]SPAM dblock.org at 11/16/2005 12:51:11 PM
I have a COM object implementing IFoo and a property get_Property, put_Property... I can get a CLSID representing an object that implements this and other interfaces, then create it with Activator.CreateInstance and cal object.GetType().InvokeMember for any member on that unmanaged COM object, s...more >>


DevelopmentNow Blog