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

Filter by week: 1 2 3 4 5

How do I get the Moniker Word uses for a Link?
Posted by Robin Tucker at 9/30/2004 9:08:13 PM
Hi, I am embedding links, via. VBA (well, via. VB.NET, through VBA!) into Word. I know where my OLE object is, I want to embed a link from it to some text. When I "record a macro", "pasting special", the resulting field code looks something like this: { LINK OurCompany.InfraredImage "Doc...more >>


Using third-party OCX from Windows Service
Posted by Neils Christoffersen at 9/30/2004 6:53:02 AM
I've been tasked with upgrading a VB 6 app to .NET. The current app runs constantly and has a GUI interface, however, the GUI is not necessary so I am planning to implement the functionality as a Windows Service. Unfortunately, I need to use the facilities provided by a third-party (Sterlin...more >>

Returning Failed HRESULTS from Managed to Unmanaged code
Posted by Kyle Eberle at 9/29/2004 9:33:12 AM
I spent some time looking for existing discussions about this topic but was unable to find any resolution. If I have missed a solution in some other newsgroup discussion then I apologize for the redundancy. Also, sorry for the long posting but I figured it would be better to answer some of the ...more >>

event fired by C# component not traped in VC.NET(ATL composit cont
Posted by satyaprakash at 9/28/2004 9:53:02 PM
Hi Everybody, We have C# component. which has been hosted in ATL composit control. we are trying to caught event fired by C# component in ATL component. we have implemented sink class derived from IDispEventImpl. our call to DispEventAdvise method failed with error code - " 0x80040200" ...more >>

Get an IPictureDisp
Posted by Shao at 9/28/2004 5:50:51 PM
Need help converting this function in this old post into a function in MC++ Can anyone help? ***** I noticed a bunch of similar requests, looking to get an IPictureDisp from an .NET Image for use either in VBA or other interop. I've found an easy way to do it, so long as you have reflectio...more >>

Howto determine name of a type library?
Posted by ecastro NO[at]SPAM hp.com at 9/28/2004 4:33:11 PM
I'm trying to replicate what Visual Studio does when it imports a COM type library using tlbimp.exe. I'm having a hard time getting it just right because I need to determine the name of the type library to use as a namespace. In "COM Programming with Microsoft.NET" page 59 suggests using the fol...more >>

"Class doesn't support Automation" error
Posted by rob NO[at]SPAM roblocher.com at 9/28/2004 12:00:35 PM
Greetings all, I'm having a very challenging problem. We have a VB.NET middle-tier assembly (.DLL) made up of several classes. The code needs to run both periodically and on-demand, so we decided to use some very simple SQL Server jobs which run VBScript code to call the assembly. Other cla...more >>

Calling a .NET component from "C"
Posted by Jon Prisbe at 9/28/2004 9:22:01 AM
I have a .NET (C#) component that via COM interop is called from C++ and VBA so it can be called from the CAD packages AutoCAD and Microstation. I now have a need to be able to call it from IntelliCad. Is it possible to call a .NET component from a win32 Dll written in "C", and if so can a...more >>



Determining entry point (Unicode or ANSI) chosen at runtime
Posted by Chuck Heatherly at 9/28/2004 8:55:29 AM
I am calling ODBC API functions from a C# program. At first I was specifying CharSet=CharSet.Unicode because I wanted to assume that the Unicode versions were available. However, now I think I need to check whether the ANSI functions are being called. In Adam Nathan's book ".NET and COM: The...more >>

OLE Automation
Posted by Tim at 9/28/2004 7:27:05 AM
I have a VB.NET app that I want to integrate with a couple of other applications that only support OLE interfaces. Is this likely to be possible in VB.NET (I don’t want to have to use C++), and if so, how difficult is it? If it can’t be done, what are the best options to suggest to the v...more >>

Returning UDT encapsulated in a Variant from a COM method leads to exception in managed code
Posted by Jürgen Weiss at 9/27/2004 4:55:20 PM
Hi, I've encountered a very basic problem when dealing with User Defined Types (UDT) in a COM class. If a COM method returns a UDT in a VARIANT, the calling .NET application receives an exception "The specified record cannot be mapped to a managed value class.". In order to reproduce this prob...more >>

How do I create COM+ from VB.NET DLL
Posted by G. Harland at 9/27/2004 10:59:01 AM
I am a PowerBuilder coder by nature, so please go easy on me. I have a VB.NET DLL that I need to turn into a COM+ component. I currently use VS.NET 2003, and what I hope to achieve is that I can add a package in Administrative Tools>Component Services and add the DLL as a component in the ...more >>

Windows Service to Populate Text Boxes in Pre-Existing Adobe PDF
Posted by Geoff at 9/27/2004 10:41:02 AM
I succeeded at writing a Windows Forms app to write values into text fields on a PDF, save the PDF and email or fax the PDF to customers, and then the server team asked me to turn the program into a Windows Service. I'm having a couple of problems related to removing windows.forms from the ...more >>

Speed : The PIA impact (VB 6.0 vs VB.NET)
Posted by Philippe TEIRUH at 9/27/2004 9:45:05 AM
Hello, I have made a migration from VB 6.0 to VB.NET and noticed a great speed change when I access (from VB) to Excel Cells (same problem to write Visio formulas from VB). The same code takes 21 seconds in VB 6.0 and 54 seconds in VB.NET (see below) 1. Is that fact well known? 2. How to...more >>

how to marshal array of structs inside a struct?
Posted by tnewton NO[at]SPAM cbnco.com at 9/27/2004 7:06:13 AM
Hello, I am trying to create a C# DLL layer for out current C dll. The following is the current code. (I apologize if I made any mistakes in converting it to non-confidential. Also, I'm a complete C# newbie... ) **************************************************************** namespa...more >>

How can I get ASP.NET to work on Linux
Posted by Novice at 9/26/2004 8:13:06 PM
Hey all, I'm sure I'm in the wrong group - but I don't know which one - so feel free to redirect - but also feel free to try to answer my question. I am trying to find out how to get ASP.NET code to run on a Linux machine. I found this article: http://www.csharphelp.com/archives2/archive317...more >>

PROBLEM: Threading with an OCX
Posted by dov_sheinker NO[at]SPAM yahoo.com (| at 9/26/2004 10:50:30 AM
Hi, I have the following problem: I have a GUI application which uses an OCX (mscript.ocx). I would like the application's GUI to refresh (receive events) when the OCX is working. However, even when I've moved the OCX's methods to be invoked from a seperate thread the application's GUI still do...more >>

copying block of unmanaged memory to other block of unmanaged memory
Posted by flamer at 9/25/2004 9:35:45 PM
is there any better way to copy block of unmanaged memory to other block of unmanaged memory than looping through individual bytes or integers ? Marshal.Copy only copies data between managed and unmanaged memory. Buffer class also doesn't do the job. the second part of quetion is maybe i don'...more >>

passing nothing from vb.net to vb6 com
Posted by frank NO[at]SPAM policecentral.com at 9/25/2004 11:48:49 AM
I have a vb6 function like this Public Sub Init( Parent ) Set mparent = Parent End Sub from vb.net I call it like this Dim util As New example.dbUtil util.Init( Nothing ) The vb6 com object fails. Using the vb6 debugger I can see that the value of Parent is empty and not Nothing. ...more >>

COMException with Type Mismatch when doing interop with VARIANT* calling parameter
Posted by jeff.laporte NO[at]SPAM gmail.com at 9/25/2004 11:35:13 AM
Hi Folks, I am having a problem passing a parameter from .NET into a COM method with a VARIANT* parameter. I have read about a similar problem when trying to set a COM VARIANT property (Microsoft Knowledge Base Article - 316138), but the solution to that problem does not apply here because it...more >>

slow COM
Posted by YuriL at 9/24/2004 1:57:02 PM
Hello, I developed a Windows Form Control, and put a COM wrapper around it. The control runs correctly on my development machine, but when I deploy it to other machines (using VS Setup utility), some of the functions in the control take up to 3 minutes to return (I found the functions by w...more >>

asp.net deploy issue with 3rd party activex
Posted by Scott Dawson via .NET 247 at 9/24/2004 8:16:59 AM
Hello, I hope someone can help as after I have been searching the net for two days now to no avail. I have deployed an asp.net application that uses a third party dll. When I run this application locally it runs without any problem however when I deploy to our web server, as soon as I try to ...more >>

Easier way to get the default property?
Posted by Chad Myers at 9/23/2004 9:15:25 PM
I have a .NET class that's COMVisible(true) and it has a method that takes an object (VARIANT*) argument. I'm running into a problem where an ASP/JScript client is passing a Request.QueryString("foo") result into this argument. Request.QueryString("foo") returns an IStringList which is not ...more >>

Pass Array from VB to C#
Posted by jake at 9/23/2004 11:22:16 AM
Hi, I am trying to pass an array from VB to a C# component and I keep getting this error: "Function/Interface Marked Restricted or Automation Type Not Supported in Visual Basic" Here is the code I use below: C# using System; using System.Runtime.InteropServices; namespace Test { [Cla...more >>

ASPCompat with "Both" Threading Model?
Posted by Glenn Miller at 9/23/2004 4:07:02 AM
I have a legacy VC++ 6 COM object. It is registered with "Both" threading and has a free thread marshaller. Should I use the ASPCompat=TRUE directive in my ASPX pages that are using that COM object? -- Glenn Miller Optinfo, Inc....more >>

Excel Automation
Posted by iman.sadreddin NO[at]SPAM gmail.com at 9/22/2004 4:37:45 PM
Hi I am using DSOFramer to embed excel into a winform. The excel workbook has only one sheet which contains a dropdown. How can I access that dropdown from my C# code in my winform. - Thanks....more >>

Passing Array From ASP to C#
Posted by Wes.Stueve NO[at]SPAM hendersonengineers.com at 9/22/2004 1:24:12 PM
Could someone please post how to pass an array from ASP (VBScript) into a C# exposed object? I have this code in ASP: Dim arrBefore(2) Dim arrAfter(3) Dim lngId lngId = 987 arrBefore(0) = 1234 ....Some more init code Set obj = Server.CreateObject("MyCSharpLib.MyObject") obj.MyMetho...more >>

.NET 1.1 SP1 has a breaking change for COM Interop
Posted by Bill Menees at 9/22/2004 12:31:48 PM
As of .NET 1.1 Service Pack 1, the COM Interop layer will only allow a COM object to talk to a .NET object if the .NET object has public visibility and is marked [ComVisible(true)]. Prior to .NET 1.1 SP1, you could pass a class instance to COM even if the class was internal or didn't have [...more >>

Using C# Assembly in COM and .Net
Posted by jake at 9/22/2004 8:52:41 AM
Hi, I am trying to create a C# business object component that can be used by a VB6 application and a C# application. I understand how to get the C# component to work in COM however I keep getting this task message when I reference it in my C# application. COM Interop registration failed. C...more >>

Implementing COM interfaces in MC++
Posted by Ditha_Chan NO[at]SPAM hotmail.com at 9/22/2004 4:54:20 AM
Hi! I am new in this managed world. I want to use some com interfaces in a managed c++ project (specifically ICatRegister). I haven't found any samples so far on how implement a COM interface in MC++. If you know of any sites, please point me in the right direction. Or if you could post a sim...more >>

PIA and Excel 2000
Posted by Tom Donohue at 9/21/2004 8:53:03 PM
I have a desktop application which has been upsized from .Net 1.0 to .Net 1.1 (VS2003). The application creates an excel spreadsheet as an output option. Some users do not have Excel; others have Excel 2000 (stand alone rather than Office). My development machine has Office 2003. My questions...more >>

Help! Question with marshalling
Posted by jemmicat NO[at]SPAM hotmail.com at 9/21/2004 11:31:45 AM
I have an old dll written in vc6 and have used it in vb6. Everything works fine. The vb6 declaration just and client code just like below: Public Const DEF_D_OPERATER = 1 Public Type CRNO No1 As String * 3 No2 As String * 5 End Type Public Type DLG_IOSTR keiban As ...more >>

(out pointer to) array of structs marshaled from c++ to c# as return value
Posted by pavel.savara NO[at]SPAM seznam.cz at 9/21/2004 5:36:18 AM
Hello, c++ signature: struct TickInfo { time_t ctm; char symbol[8]; double bid; double ask; }; __declspec(dllimport) TickInfo* MtGetUpdatedTickInfo(const int handle,int *items); my c# try: [StructLayout(LayoutKind.Sequential, CharSet=CharSet.Ansi, Pack=8)] ...more >>

regasm or tlbexp ?
Posted by shahidmehmood NO[at]SPAM gmail.com at 9/20/2004 11:35:46 PM
i want to use .net components in my vb6 application, should i used regasm or tlbexp to use the .net dlls, moreover will these dlls run without the .net runtime ? I was to basically use the serialization scheme of .net, binary formatter class is sealed and moreover i cannot export the mscorlib...more >>

Using a C# GUI component from VB6
Posted by Einstein at 9/20/2004 7:11:01 PM
Hi All, we have two applications...one is Next Gen .NET Application written in c#...where as one application is in VB6...we need to use some .NET components in VB6 ... I understand this is possible via Inter-OP in case of NON GUI business components ....but is the same possible for UI component...more >>

ARRRGGGHHHH Function Pointers!!!!
Posted by Mark Olbert at 9/20/2004 5:48:50 PM
I am totally bollixed up on this one. If I can marshal a delegate to a legacy DLL as a callback, why the hell can't I do something to a delegate to assign it to a function pointer variable in a structure?!? It sure seems like the two operations are very similar; why do I have to cross a DLL bou...more >>

Why is image is upside down?
Posted by assaf at 9/20/2004 2:33:50 PM
hi all i included the sources of my form. when run, u can open a bmp file. once opened, and resized, u will see that the image is upside down. can someone please tell me why this is happening? tnx assaf the code: using System; using System.Runtime.InteropServices; usin...more >>

ICatRegister interface in managed c++
Posted by snchandra95 NO[at]SPAM yahoo.com at 9/20/2004 1:30:15 PM
Hi! How do you use ICatRegister interface in a managed c++ project? I need to add some category information and want to use this interface. I know you can use ComRegisterFunctionAttribute and directly add it to the registry. Is there a way to use ICatRegister interface instead to do this? ...more >>

Unmanaged Function Pointer from Managed Code?
Posted by Mark Olbert at 9/20/2004 12:10:51 PM
I have a legacy unmanaged DLL function that expects to be passed a structure like this: typedef struct tag_ACALLBACK { void *ncCallbackFunction; void *ncUserData; } ACALLBACK; I'm stumped about how to assign a managed class method to the ncCallbackFunction function pointer. I've tried...more >>

Accessing com-object with same name and versions but different functionallity?
Posted by ssunnerberg NO[at]SPAM hotmail.com at 9/20/2004 4:39:09 AM
Hi! I´m writing a VB.net app which communicate with Adobe InDesign through a com-interface. Adobe has released a new version of InDesign called InDesign CS and a new com-component accessing it. In my app I have some different project, one talking to InDesign CS and another one talking to the ol...more >>

looking into what the .net code is doing from a vc6.0 c++ app??
Posted by Hazzard at 9/18/2004 5:54:23 PM
i am trying t.o troubleshoot an app in vc6. c++ which imports a few .net dll's. The tli,tlh's are created from tlb's and I am off and running. Problem is, I am playing a guessing game about where the app is failing. It is neither an art or a science. I make sure the .NET components and code w...more >>

Methods that return pointers to managed objects
Posted by Mark Olbert at 9/18/2004 4:29:40 PM
I am thoroughly lost on how I go about implementing a method in C# that must return a pointer to a managed object which can be used in unmanaged code (I'm trying to interface with a legacy package). Example: public class ClassA { .... } public class ClassB { private ClassA classAInst...more >>

Implementing IDispatch in C#
Posted by Juan Dent at 9/18/2004 4:21:03 PM
Hi, Yes, it sounds strange. Yet, I am doing a migration of some code in C++ using COM to C# in .NET and this C++ unmanaged code calls the IDispatch methods GetIDsOfNames and Invoke which have a special implementation in the original C++ COM servers. All the logic of these COM servers depend...more >>

Help Serializing .Net Generics List object
Posted by Michael Rockwell at 9/18/2004 6:59:01 AM
I am attempting to serialize a C# generic list collection but it is not working. My code looks like this: public struct RawData { public Guid id; public DateTime Time; public Double Value; } List<RawData> RawDataList = new List<RawData>(); foreach (datarecord dr in AllDataRecords) { ...more >>

Embed interop DLL file in executable
Posted by Guogang at 9/17/2004 4:20:36 PM
I am tring to create a single .exe file that user can download. However, this program need reference to COM object, thus need a interop dll file like this: Interop.CAPICOM.dll. Is there a way to embed this DLL file and the exe file into one single executable (like using a static link in the C+...more >>

.ASP 6 <--> ASP.NET/C#.net
Posted by Curt Smith via .NET 247 at 9/17/2004 11:11:28 AM
(Type your message here) Please point me in the right direction to figure this out. Aging .ASP v6 needs to share the Session[] with a co-resident ASP.NET/C#.net assembly. I have the ability to place the .NET directories within the .ASP stuff if needed. I'm told that .NET apps do not shar...more >>

ChangeDisplaySettingsEx
Posted by tomer at 9/16/2004 3:01:47 PM
Hi, I am trying to DllImport ChangeDisplaySettingsEx function from user32.dll. It works well, unless I try to use it in order to get VIDEOPARAMETERS struct. When I pass the struct the function returns DISP_CHANGE_BADPARAM and the struct doesn't get filled. This is the DllImport: [Dl...more >>

Windows Service to start OC4J
Posted by Sunil at 9/16/2004 9:29:58 AM
Hi, I have created a .net windows service to start the Oracle OC4J using the startup batch file. Though the OC4J has started, the windows service still shows starting.How Can I change the windows service status to started (without killing the process) so that the windows service can be used to ...more >>

Interop with unregistered DLLs
Posted by mg689 NO[at]SPAM columbia.edu at 9/15/2004 7:13:27 PM
Hi all, I'm trying to avoid registering a COM dll, since it causes problems in the production environment. What I would like to do is somehow load a COM dll from the application folder at runtime by a .NET application without registering that COM dll. So ideally I would design the app in Stud...more >>

Force a COM object reference to decrement
Posted by Joel at 9/15/2004 5:15:23 PM
I have an method that intstantiates a COM object. I need it to be accessed by only 1 thread at a time so I use a Mutex to enforce this. But it doesn't look like the COM object is being released from memory when I'm done with it before the next thread tries to instatiate it again. Is there a way t...more >>


DevelopmentNow Blog