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

Filter by week: 1 2 3 4 5

Enum
Posted by kris at 6/29/2007 5:02:09 PM
Hi , I have a problem passing enum as a parameter in my C# code. I tried declaring the parameter as int as well as long . I even tried using MarshalAs attribute. I am getting exception saying parameters are not matching. This code is talking to a C++ DLL that takes enum as one of the paramet...more >>


Excel Interop with in-memory document - no file system
Posted by mj2736 NO[at]SPAM yahoo.com at 6/29/2007 7:34:31 AM
I have Excel 2003 documents stored in a SQL 2005 database, VARBINARY(MAX) column. I need to read the documents out of the table, open them up, modify their header, and write them back to another table. In .Net 2.0 is it possible to do all of this in memory using the Excel interop interface, with...more >>

Read-Only Word document in AxWebBrowser
Posted by craigeandrews NO[at]SPAM gmail.com at 6/29/2007 1:24:35 AM
Hi, I've been trying to find a way to host a 'view' of a Word document in a Windows Forms app. Ideally I'd like it to be just the document; no controls or toolbars, and certainly no editing functionality. It seems that the recommended way is to us the WebBrowser control, and to be able to acc...more >>

Windows application with OCX on Win64
Posted by Dahab at 6/28/2007 12:29:17 PM
Hi, I'm developing a .Net windows application that implements a couple of OCX components. The application runs ok on win32, but when I installed it on a Win 64(xp) machine the program craches. Also did a small test program and it is the OCXes that causes the crash. Anyone know if incldin...more >>

New Wprd.Application failing with "This command is not available because no document is open"
Posted by mdupris NO[at]SPAM hotmail.com at 6/28/2007 11:39:35 AM
I can't open a Word session in a C# session without getting an error "This command is not available because no document is open". The simplest code illustrating the problem is below: using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System...more >>

C# control needs to notify C++ application
Posted by aaron.m.johnson NO[at]SPAM gmail.com at 6/27/2007 10:09:41 PM
I'm writing a C# control that needs to be able to notify the parent application of certain events. If the application were also using the .NET platform I'd just use a delegate. Unfortunately the application is writen in unmanaged C++. Is there some way for me to send a message or execute a c...more >>

IDownloadManager
Posted by Kevin Cochran at 6/27/2007 4:44:01 PM
Greetings, I am trying to make a custom download manager in c#. The code compile, I register it with gacutil and regasm, but when I open IE and click on a link to download, I get the standard IE download dialog. Is there something I'm missing? I am new to COM, so any help would be appreciat...more >>

String members of structure not allowed?
Posted by Ray at 6/27/2007 3:52:52 PM
I have some existing vb6 code that I am moving to a .net dll for easy access from both vb6 apps as well as vb.net apps. There are some custom api calls that use structures that have strings in them. I didn't think this would be a problem but I find that if I put a string in a structure it is no ...more >>



how to pass Form handle to unmanaged code
Posted by Gregory Khra at 6/26/2007 3:22:06 PM
How can I pass a Windows Form handle to unmanaged DLL that expects HWND? Even if I have a wrapper calss between managed C# and unmanaged C++, IntPtr does not by default cast to HWND. Should I force it? Can somebody give an example? Gregory ...more >>

Helga
Posted by Helga at 6/26/2007 3:58:15 AM

Process Exit
Posted by jan.loucka NO[at]SPAM gmail.com at 6/25/2007 3:02:10 AM
Hi, Is there any way in .NET how to capture WIN API messages that belong to different application? We have a Windows Form app written in .NET 2.0 and from our application we're running another application called MapInfo using Interop. We need to be able to somehow figure out when the user exits...more >>

Urgent Help: Problem with WebBrowser Control in Asp.net
Posted by Mani at 6/23/2007 12:00:00 AM
Hi All, Greetings! Am using the WebbrowserControl in Asp.net for my project. I have imported the needed dll reference like mshtml, axshdocvw and interop etc. But while accessing some frames(DOM object) using webbrowsercontrol, I got the following Exception. Error : 1 ====== "Error HRESUL...more >>

Need help with C Header file definition to C#
Posted by Jason at 6/22/2007 6:21:25 PM
Hi, I have a c dll which I need to link to from my C# code. I just want to warn you guys I am not very well versed in C or C++ so any help would be greatly appreciated. I wanted to know if the structure I have shown should be modeled as a Struct or as a Class in C#. Also, since there are ...more >>

Unsigned DLL
Posted by Itzik at 6/21/2007 3:03:07 PM
I try to find way call unsigned dll from signed one. how can i do it ? Thanks ...more >>

CoCreateInstance returns COR_E_MEMBERACCESS
Posted by prose at 6/20/2007 7:00:21 AM
The return value from CoCreateInstance is COR_E_MEMBERACCESS. I've looked around the 'net and on MSDN and can't find any info on this. How would I approach figuring out what is causing that return value? In other words, does that error code give me some kind of clue about what to change? --...more >>

webbrowser
Posted by GS at 6/19/2007 11:33:33 PM
what is the quickest and least resource intensive way to convert a formatted html page with html tables on webbrowser control to tab delimited columns? my regex skill is poor so is my html and xml parsing. An lazy man's quick and dirty way before .net to use excel 97 automation to paste and ...more >>

release excel
Posted by GS at 6/18/2007 4:04:14 PM
I am having trouble with closing excel application completely when done with an excel application automation. I have to exit the vb.net application before the excel is closed and if I have use the excel multiple time in the application, I see multiple instance of excel in the task manager sim...more >>

Excel 2003 interop install with office 2007
Posted by at 6/18/2007 8:12:08 AM
I was asked to go back to a project that required the Office 2003 Excel interop assemblies loaded and make some changes. I had since then performed a fresh OS install with Office 2007 and of course, VS complained that it cannot find the Excel 2003 interop assembly files. I downloaded the runt...more >>

UPnP NAT using C#
Posted by Anbu at 6/18/2007 5:04:01 AM
Hi All, http://technet.microsoft.com/en-us/library/bb457046.aspx I have been developing an application which needs to establish NAT mapping on a UPnP Internet Gateway Device in C#. Application uses the UPnPNAT.dll (NATUPnP 1.0 Type Library). The getPortMappingInfo implementation is as b...more >>

how to quit excel wihtout saving
Posted by GS at 6/16/2007 3:29:25 PM
how to quit excel without saving and suppress the prompt? I am suing excel application for some intermediate work but don't want to save the result in excel ...more >>

COM Interop with C# - byte array
Posted by YIguchi at 6/15/2007 4:05:00 AM
Hi, I am novice to interop. I have a set of c++ classes. I searched the net and find that i should make COM wrapper and call that COM wrapper from C# code. I am just wondering if all of my function takes byte or byte array or byte pointer. When i will make the wrapper in COM , it w...more >>

Owned forms in Excel add-in
Posted by Tom at 6/15/2007 12:41:23 AM
Hi, I want to use forms in my Excel application-level add-in that have the main Excel window set as their owner. Could someone who knows these thins tell me, am I disposing the handle correctly? public partial class ExcelForm : Form { NativeWindow nativeWindow; p...more >>

Returning an Array of C# Structures
Posted by hpw at 6/14/2007 1:41:56 PM
Hi all, i'm trying to use COM Interop to return an array of c# structures to Native code. I tried to marshall the Array as SAFEARRAY. The structure: [StructLayout(LayoutKind.Sequential)] [ComVisible(true)] public struct teststruct{ [MarshalAs(UnmanagedType.LPStr)] public string...more >>

AccessViolationException Occurred
Posted by Mehul Gurjar at 6/14/2007 1:27:49 PM
Hello, I am trying to call an API Function (API is written in C Language). On a particular function I am getting an exception "AccessViolationException was unhandled by user... Attempted to read or write protected memory. This is often an indication that other memory is corrupt." Can ...more >>

change coclass in COM Assembly
Posted by herc at 6/14/2007 8:23:06 AM
I have a .Net 1.1 assembly that is being exposed/packaged as a COM object. Interally there is a class "Dog" that to the outside world I want them to see "Cat". Back in the world of unmanaged C++ this is easy to do, simply change the name in the idl file from Dog to Cat and change any reference...more >>

Help! - The callee is not available and disappeared Error Message
Posted by JerryWEC at 6/13/2007 2:12:38 PM
ATTN: COM Experts I have been getting this error message and have post a few times but still don't have any answers and I can't find any on the www. *** Message: The callee (server [not server application]) is not available and disappeared; all connections are invalid. The call may have e...more >>

waveOutPrepareHeader crashes with Vista x64
Posted by assaf at 6/13/2007 1:55:20 PM
Hello all. I am invoking waveOutPrepareHeader in Vista x64. I am getting the following error: "An invalid parameter was passed to a system function." Here is the code: using System; using System.Collections.Generic; using System.Text; using System.Runtime.InteropServices; using System...more >>

How to ensure Microsoft.mshtml is on deployement machines?
Posted by Dan Cooperstock at 6/13/2007 7:59:19 AM
I'm using a CodeProject project in my application that shows how to embed an editible IE control into a .NET window, and control it in various ways. (I'm using it for mail merge.) However, the code requires a reference to the Microsoft.mshtml assembly (a Primary Interpop Assembly, I believe), ...more >>

using Unsigned Thirdparty DLL
Posted by Aravind at 6/12/2007 3:12:00 AM
Hi, I have a Third party DLL which is not signed. I am trying to use that DLL in my Class Library. While time of building i got an error saying "The referenced DLL doesnot have strong name key" I used ILDASM to disassemble the dll. The output containes Sample.IL Sample.res and Sample.Res...more >>

Marshal.AllocHGlobal in 64 bit Vista
Posted by assaf at 6/11/2007 8:50:31 PM
Hello all. I see that Marshal.AllocHGlobal is always returning memory in a 32 bit memory address. Can I be assured that this will always be the case? Thanks. Assaf ...more >>

Is there not an easier way to latebind in C#?
Posted by Mark Howell at 6/11/2007 5:45:30 PM
Rather than p/Invoke, is there not an easier way to Interop to Office products in C# such that I don't have to worry about what version the user is running? In VB it's merely using late binding (Createobject, etc). I don't want to include a reference to VB in my C# program and p/Invoke (G...more >>

VB2005 not deploying properly
Posted by Tym at 6/11/2007 1:41:53 PM
I've googled until I'm blue in the face - nowhere can I find the solution to this.... Developed my first real app in vb.net 2005. works great on my PC and my laptop (which also has VB.Net 2005 installed on it) The app also installs in my friends new Dell laptop However, on my other PC a...more >>

few problems while calling NetShareAdd from C#?
Posted by giddy at 6/11/2007 2:41:39 AM
hi, This is the first time i'm calling win32 functions from C#(i did call MessageBox! though =P) and i think i've done my homework with the memory management , the call however does not succeed , it fails with an error. It fails with error code : 127 (which i cant find in LMErr.h) I prob...more >>

log4net implimentation in a DLL ..???
Posted by Jaddu at 6/11/2007 12:00:00 AM
HI All, Here is my problem: log4net works fine with my Client (Windows Application .Net 1.1) but does not log any thing when i use it in my server (Com+ DLLs). Does any one know why or how to make it work. Thanks in Advance Harish ...more >>

Type library cannot be re-imported as a CLR assembly
Posted by Alex at 6/10/2007 7:28:31 PM
Dear All, I am trying to write a C# DLL that would work with VBA and C++ applications. After registering my DLL with RegAsm (regasm MyDll.dll \t MyDll.tlb) I can use it in VBA. However I can not add a MyDll.dll or MyDll.tlb to VisualStudio 2005. If I am trying to add it in C++ environment t...more >>

'System.StackOverflowException'
Posted by Sandeep Thoppil at 6/9/2007 8:36:19 AM
Hi I am using Word 2003 interop to read and write into activeX controls that I am using inside Word document. I am accessing those controls from a VB.net application. In some machine I found the application unexpectedy getting closed. As i debugged it I found ... An unhandled exception of ty...more >>

Mangaged to Unmanaged code I2C device access violation issue
Posted by Tonofit at 6/8/2007 4:55:00 PM
I'm doing a IO Control function call to set a I2C device's frequency as the first part of a sequence of other IO calls. I'm getting an access violation in unmanged code in passing PBYTE pBufIn in the function below's signature. I've included a description of the comments for the driver funct...more >>

Excel 2007 Copy to Clipboard -- Word 2007 Paste Special
Posted by JT at 6/8/2007 3:38:06 PM
We are programatically generating Excel Charts (2007) and need to embed them into a document. The problem stems that we do not initially know how many charts will be generated, and they all differ in data points. Thus because of the way they are linked we cannot: for each DataSet in All_Data...more >>

Basics of Excel interop
Posted by Kevin at 6/8/2007 2:06:04 PM
Hello, I'm writing a C# application in VS 2005 that needs to open Excel and output charts for various reports. My plan of attack was to record a macro in Excel of the end user creating and formatting the charts the way they want, and then include the code from the macro in my C# project. I a...more >>

COM and Marshal Problem
Posted by login NO[at]SPAM derimay.com at 6/8/2007 12:33:12 PM
Hi, I am certainly not an expert to C# and COM/Marshal. I cannot manage how to handle this problem: I want to call the following COM function from a C# Programm: IDL Description: (Simplified) interface IaIf : IDispatch { ..=2E. [id(20), helpstring("")] HRESULT getSomething([in] int numRo...more >>

Load a COM component dinamically
Posted by Roger Tranchez at 6/8/2007 9:56:00 AM
Hello, One of our enterprise applications must have a reference to a tlb file that exposes methods from a COM component residing on our local network. Not all the users of that application will have to use the functionality of that COM component, thus, it will be no necessary to load alway...more >>

Interop and .NET 3
Posted by jweizman at 6/8/2007 4:05:53 AM
Hi I have an OCX i would like to use in .NET 3 with WPF. I use aximp to create the wrapper. unfortunatly, this creates a Winform 2.0 dependency. I don't want to mix .NET 2 and .NET 3 together.... What can i do ? Thanks Jonathan ...more >>

VB.NET / DLL structure passing
Posted by sam at 6/7/2007 7:45:15 PM
I have a third-party DLL (unmanaged) for which I am trying to call a function. The function requires a structure (as an argument) which utilized several variables I am unable to translate. The original C header structures contain (amongst other things that I have already translated): t...more >>

how to interop .net components
Posted by katta.naveenkumar NO[at]SPAM gmail.com at 6/7/2007 1:51:37 AM
Hi friends I am using 3rd party tool ASPPDFLib to creating pdf template ' create instance of the PDF manager Dim objPDF As IPdfManager objPDF = New PdfManager at the runtime i am geting below error COM object with CLSID {88578679-272B-40C0-B1FD-C3409381A450} is either ...more >>

Help converting C++ interface declare to c#
Posted by Jeff M at 6/6/2007 1:48:00 PM
I would greatly appreciate anyone that can help me with the proper way to declare this interface? Here is the C++ declaration: interface IASIO : public IUnknown { virtual ASIOBool init(void *sysHandle) = 0; virtual void getDriverName(char *name) = 0; virtual long getDriverVersion() =...more >>

Com Interop and Type.GetType
Posted by Mwob at 6/5/2007 6:14:56 AM
Hi, I am using the Microsoft Caching Block with the database as a backend store, and all works fine under .NET. I am trying to get the same code to work when my assembly is called via COM Interop from a VB6 client. When this happens, the caching block falls over because a call to Type.GetType...more >>

Attach to all running Excel processes
Posted by Jörgen Ahrens at 6/4/2007 4:55:35 PM
Hi I would like to attach to all running excel applications. I tried System.Runtime.InteropServices.Marshal.GetActiveObject() you get an excel application but you can not specify which one, so this doesn't work... I tried System.Runtime.InteropServices.Marshal.BindToMoniker() But all ...more >>

how to raise user events in VS 2005 (COM) sub-Winform, handle in V
Posted by triunity at 6/4/2007 2:44:04 PM
I am trying to raise a user-defined Event in a VB.NET 2005 COM Class (sub)form and have my calling VB6 form handle it. Code samples follow. In the VS 2005 code two events are coded identically - when they are RAISEd in reaction to a Framework Event they WORK, but when they are RAISEd in res...more >>

COM Interop: One interface fails query interface while another works.
Posted by Jan Obrestad at 6/4/2007 12:00:00 AM
While developing a .NET module that uses COM to communicate with the main application, I have seen this strange error. I have a class that I expose to COM (BookAndPlanFormSupport) this class implements two interfaces that are also exposed to COM (IDotNetSupportBase and IDotNetMdiSupport). ...more >>

Console vs MessageBox
Posted by Allen Maki at 6/3/2007 12:24:35 AM
/* Console::WriteLine() I am trying to use message box instead of Console::WriteLine() to upgrade my code from just using the console to using GUI. In the bottom 2 lines, #1 works, but I have hard time to make # 2 works. Can anybody give a hand here to make the information to be shown on th...more >>


DevelopmentNow Blog