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

Filter by week: 1 2 3 4 5

How to convert char* to Byte[] in Managed C++
Posted by aca02djr NO[at]SPAM sheffield.ac.uk at 8/31/2005 5:02:34 PM
I have a managed C++ function which returns a managed byte array - and i need the contents of said array to be the same as the contents of a char* array (which represents image data). How can I convert this unmanaged char* to a managed Byte[]? ...more >>


calling dcom from web service
Posted by edsuslen NO[at]SPAM yahoo.com at 8/30/2005 12:54:23 PM
I am trying to call DCOM from web service. Having "COM target does not implement IDispatch." error. Tried code from within web service, separate class, enveloped it in a separate .net dll calling dcom ( the same dll worked like a champ called from windows form ). Any help would be appreciated...more >>

User does not have the permissions required...
Posted by shawn clarke at 8/30/2005 10:08:36 AM
Sorry for the x-post but it was suggested I post here as it is believed = that this is a COM interop problem. Here is some background information... We have an application built in Access 2003 that interfaces to MS Small = Business Accounting (SBA) through a type library. The type library wa...more >>

IE hosted winform control
Posted by TerryRey at 8/30/2005 12:00:00 AM
I posted the following a few weeks ago on another forum and have had no response, so am trying again here. -------------------------------------------------- I've got a Windows Form control that is using Twain to scan documents and which works fine in a windows application using a couple of di...more >>

.NET events do not execute on primary thread
Posted by George at 8/29/2005 5:01:43 PM
My .NET application handles events from an out-of-proc COM server. These events do not execute on the app's primary thread, however. Is this a consequence of COM Interop or can this be controlled? (The .NET app is configured to run in a STA.) In a VB6 program, the events are executed on the ...more >>

Terminal Services using InterOp: TsUserEx and IADsUser
Posted by ssg31415926 at 8/29/2005 12:01:08 PM
I originally posted this in microsoft.public.adsi.general half an hour or so but realised that I should probably have posted it here: I need to configure Terminal Services settings in a C# program I'm working on. System.DirectoryServices doesn't seem to allow this. I've found a reference to ...more >>

C# GC effect on runtime
Posted by Tal Shachar at 8/29/2005 11:23:43 AM
Hi All, I would like to get your inputs for the following issue: I have an application written in C++, and now I'm going to add another module to it, which I'm going to write in C#, and wrap it as a COM. The new module is going to interact with the existing application during runtime (call th...more >>

IEnumUnknown realization in .NET
Posted by dumchikov NO[at]SPAM gmail.com at 8/29/2005 9:10:38 AM
Hi, I need to realize IEnumUnknown interface in .NET. So I described IEnumUnknown in .NET as: [ComImport] [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] [Guid("00000100-0000-0000-C000-000000000046")] public interface IEnumUnknown { void Next(UInt32 requestedNumber, [MarshalAs...more >>



"Command Failed" error - Word interop
Posted by Laura Villa at 8/29/2005 7:12:03 AM
Hello everyone, I'm trying to do some office automation via interop in an asp.net application. An generic "Command Failed" error occurred while opening the document: Word.ApplicationClass oWordApp = new Word.ApplicationClass(); object fileName = strFileName; object readOnly = false; o...more >>

[Structured Storage] IEnumSTATSTG.Next(..) fails to return STATSTG
Posted by luke at 8/29/2005 6:19:37 AM
Hi, I'm developing a .NET wrapper to access COM compound files. I've imported all needed COM interfaces including IStorage and IEnumSTATSG and I can successfully open a storage file using StgOpenStorage. The problem is, when I try to enumerate the streams ans substorages inside: IEnumSTATSTG.N...more >>

COM interop fails with Parameter Incorrect error in ColdFusion
Posted by bosxfan2005 at 8/28/2005 8:21:01 AM
Hello, I developed a class in VB.Net that provides encryption/decryption methods. It is to be used as a COM object from a ColdFusion program. I compiled the class with the "Register for COM Interop" set and registered the DLL on the ColdFusion server using RegAsm.exe. When the class' encr...more >>

VS2005 (beta) C# Win App: Call to CoInitializeSecurity fails with 0x80010119 (RPC_E_ TOO_LATE)
Posted by Scott Smith at 8/28/2005 5:11:50 AM
C# code that compiled and ran successfully in VS 2003 is compiling but failing in VS 2005: [MTAThread] static void Main(string[] args) { CoInitializeSecurity(IntPtr.Zero, -1, IntPtr.Zero, IntPtr.Zero, (uint)RpcAuthnLevel.PktPrivacy, (uint)RpcImpLevel.Impersonate, ...more >>

How to Hide Generics from Type Library Exporter
Posted by Tom Z. at 8/26/2005 6:26:02 PM
Hi All, I'm trying to make an assembly in C# to use as a COM server. I'm building as normal and ruinning regasm at the end. Everything is generally working, except that I'm having a problem hiding some generic implementation base classes from the type library exporter. Here is a code sam...more >>

passing a struct to unmanaged function
Posted by nygiantswin2005 NO[at]SPAM hotmail.com at 8/26/2005 11:06:50 AM
I would like to know how do I pass a pointer to a struct from managed code to unmanaged code. For example if I create structure like this in managed code. StructLayout( LayoutKind.Sequential, CharSet=3DCharSet.Ansi ) ] public struct MYSTRUCT { [ MarshalAs( UnmanagedType.LPStr ) ] ...more >>

Using Msgraph directly in VB.NET application
Posted by Doudou at 8/26/2005 1:10:44 AM
Hello, First I'm french, so my english isn't very good. I try to find explanation or example to use MsGraph object directly in VB.NET application (in a windows form for example). Is it possible ? Or is it necessary to use Office application (like Excel) to use MsGraph object ? Thanks for...more >>

Setting an icon and caption for a panel in VB.Net?
Posted by Joergen Bech NO[at]SPAM at 8/26/2005 12:00:00 AM
Trying to make a panel appear as a form with caption, icon, minimize, maximize, and close buttons (for replicating a WinForms designer). Trouble is, I would like to replace the icon and caption using properties after the control has been created. I believe the solution involves the WM_SET...more >>

another pInvoke problem (IIS5 vs IIS6)
Posted by casey chesnut at 8/25/2005 3:35:49 PM
i'm pInvoking a component from a web service. on my test computer with IIS5, i have the component in the \bin directory, and the call works. when i deploy to W2K3 server with IIS6, then it cannot find the component in the \bin dir. so far i've only got it to work by putting the component in t...more >>

diff results with SuppressUnmanagedCodeSecurity
Posted by casey chesnut at 8/25/2005 3:06:23 PM
i have a pInvoke signature that looks like the following '<SuppressUnmanagedCodeSecurity(), DllImport("CStyleDLL")> _ <DllImport("CStyleDLL")> _ Friend Shared Function ExportedMethod(ByVal strDouble As String) As Double End Function the problem is i get diff results depending on if i use th...more >>

passing structure to unmanged function
Posted by nygiantswin2005 NO[at]SPAM hotmail.com at 8/25/2005 12:47:23 PM
I am tring to write simple console application in C# to test the APIs functions made available by the dymo sdk. The dymo sdk provides a dll library that can be used to call functions that will print labels on the DYMO LabelWriter printer. Here is my C# code. Please let what am I doing wrong. T...more >>

How to do QueryInterface using C# late binding?
Posted by Neo The One at 8/25/2005 9:16:03 AM
I am experimenting late binding using C#. It's quite awkward doing COM this way, but I think it's fun. I am trying to catch DocumentComplete event of DWebBrowserEvents2 in the following code: public void DocumentComplete(object pDisp, ref object URL) { try { object doc = pDisp.G...more >>

Passing C# delegates to C++ functions expecting a function pointer
Posted by John Eyles at 8/25/2005 5:51:31 AM
Hi. I am writing a C# interface to a C++ / C driver for a hardware card and I am having the following issue when trying to set up a callback function. When the card generates an event that causes the driver to invoke the callback, Visual Studio (or the application if running the straight ex...more >>

Excel Automation Range Background color
Posted by Olan at 8/24/2005 2:37:23 PM
Hi, I would like to set the cell background color (and font color later) for a range of cells in excel using a c# application. First I set the BackColor of a textbox on a windows form to the color I would like to apply to the Excel cell/range. the color in this case is RGB(255,128,128) o...more >>

String Array from Pointer?
Posted by Rob Mayo at 8/24/2005 9:59:06 AM
I was able to successfully send a string array to an API function. My question is how do I get it out again? I have an IntPtr received from another function which should be a pointer to the same array that was passed in to the first. -- Any help is appreciated. Thanks in advance. WALDO...more >>

DTS interop question.
Posted by Wade at 8/22/2005 2:27:23 PM
Hi all, I've created a .NET app that executes a DTS package. Everything works great if I pass the appropriate parameters to the application; if I purposely pass an incorrect parameter (such as a bad database server name) it seems that the Execute call on the package goes off into lala-land...more >>

Marshal callback containing unsigned char * in signature
Posted by Brandon at 8/22/2005 1:00:03 PM
Hello all, I'm running into a brick wall here. I have a C dll I'm trying to use from my C# code. I've read a lot on this and can't figure out what is going wrong. This dll is working from a C program, so I feel it must be something I've done wrong in the C# client. The main roadblock is on cr...more >>

USB with VB.Net
Posted by Exardious NO[at]SPAM gmail.com at 8/22/2005 4:47:14 AM
I have to make a program in VB.Net to flash the ROMs of different phones. The first step in the task, is to make a little application that listens to the USB ports, if any device is being connected, and give me a message. But i can't seem to find any way to do that. I've come to realise that t...more >>

c# usercontrol in web page inside axWebBrowser in windows form
Posted by tosch at 8/19/2005 1:46:08 PM
We are hosting the axWebBrowser in a windows form. A web page is loaded that contains a .net user control. If we have set the UIHandler, the browser control hangs on dispose. The last call in the stack is this : system.windows.forms.dll!System.Windows.Forms.Control.ActiveXImpl.SetClientSit...more >>

Extend / Mirror desktop on Multiple Monitors in C#
Posted by mphacker at 8/17/2005 7:18:18 PM
I am looking for the best way to switch Windows video modes. Here is what I am trying to accomplish: I have an app that need to initially display the same content on 2 monitors hooked to a Windows XP box (mirror of the primary display). At a point in time the application needs to switch the ...more >>

Passing interface as method argument
Posted by Danil Shebounin at 8/17/2005 3:52:04 PM
Hello! I have two com interfaces: IAttrList and IOdsUtil. IOdsUtil have function IOdsUtil::GetDefaultFolder([in,out] IAttrList **atl) Both interfaces are imported into .NET producing classes CAttrList and COdsUtil Is it a right way to pass one of interfaces as an argument to method of ...more >>

PInvoke - Please Help!!!!
Posted by Luis Fajardo at 8/17/2005 11:09:09 AM
Hello, I'm trying to invoke the following API's using PInvoke from a C# class, as follows: C++ API (.h) // converts an string to unicode void toUnicode(PJSTR dest, PCZSTR src); // converts unicode to string void fromUnicode(char *dest, PCJSTR src); where.... typedef const JCHAR * PCJS...more >>

Exposing .NET events to VBScript / Outlook forms.
Posted by strawjackal NO[at]SPAM gmail.com at 8/17/2005 9:46:31 AM
I have a .NET component I am trying to expose to COM - specifically code running in an Outlook form. This component has an event that I want to catch from my VBScript. I've tried defining a COM event interface with an event that matches my control's event signature. When I instantiate the cont...more >>

BITS 2.0
Posted by William Straitt at 8/17/2005 9:05:13 AM
Is there a BackgroundCopyManager.dll created for BITS 2.0 and where could I get it? Thanks, Bill...more >>

Marshalling...problem
Posted by kiran at 8/17/2005 12:00:00 AM
I got the fallowoing exception when i try to marshal the c++ structure to C# structure. " System.Runtime.InteropServices.SafeArrayTypeMismatchException: Mismatch has occurred between the runtime type of the array and the sub type recorded in the metadata." C++ structure -----...more >>

Problem when workaround word application
Posted by SasiKumar at 8/17/2005 12:00:00 AM
Hi, I have a problem in workaround the word application. When i doing something like inserting text,inserting values into table in a word application,which is openend through vb.net.simulateneousely when we open word application manually,document will open using existing instance(which is we ...more >>

DCOM Remoting
Posted by Joe Shoop at 8/16/2005 10:43:02 PM
I have a COM component on a remote machine. I think, it should be possible to access it using a .NET client and late binding as follows: Type type = Type.GetTypeFromProgId("ACOMobject.Test", "MachineName"); Object objTest = Activator.CreateInstance(type); objTest.foo(); But for some reason...more >>

Office Add-in ... installing on non-dev machine.
Posted by Glass Half Full at 8/16/2005 11:19:59 AM
Are there instructions or special gotta's about creating an Office Addin installable on a PC other than the dev machine. I have an Addin that works find on the dev machine I can run the Setup project to install and uninstall the addin on the dev machine and all works fine. When I move this t...more >>

Question regarding .NET Reflection in VS.NET (revised)
Posted by Ralph Mücke at 8/16/2005 7:43:02 AM
I have defined an attribute class to describe each property of an interface. Afterwards, I declare a class implementing this interface. 'Attribute Class Declaration <AttributeUsage(AttributeTargets.Property)> _ Public Class IPSPropertyAttribute Inherits Attribute ... End Class ...more >>

SetEnvironmentVariable in Debug and Release configuration
Posted by denis.greatest NO[at]SPAM gmail.com at 8/16/2005 1:48:40 AM
Hello folks, I was trying to set some environment variable for a process I create. (The variables are my own, not system). I use SetEnvironmentVaraible() from C# code. In Debug configuration this works fine, but in Release configuration the action fails. The return value is TRUE, and no Ex...more >>

memory leak with com interop
Posted by dmalhotr2001 NO[at]SPAM yahoo.com at 8/15/2005 6:13:05 PM
Hi, I am trying to find out where there is a memory leak in our application. I have created a test harness in C# to test this. I'm basically hitting the object (written in c++) really hard by looping through it Here is the code in c#: ################################### for (int i = 0;...more >>

Please help write wrapper to C function
Posted by v.fedoroff NO[at]SPAM gmail.com at 8/15/2005 7:45:30 AM
Hello everyone, I have in the native DLL next method defined in header file: VOID _Case(HCASER hCaser,LPSTR pIn,LPSTR pOut); I tried wrote C# wrapper like: [DllImport(@"SlDll32.dll", EntryPoint="_Case", CharSet=CharSet.Ansi, ExactSpelling = true, CallingConventi...more >>

Marshalling a struct with strings from unmanaged C++ to C#
Posted by John Eyles at 8/15/2005 7:41:02 AM
I am attempting to write a C# wrapper to an unmanaged C++ hardware driver and I am running into difficulty returning strings inside a struct. The C++ function takes a pointer to a struct which it fills with data. The function returns ok but the managed code fails with an null reference excepti...more >>

CLSIDs on VB6 DLL
Posted by m00nm0nkey at 8/15/2005 7:23:03 AM
I have a VB.Net Console Application which references an ActiveX DLL I have written in VB6. The problem seems to be that, when I register the ActiveX DLL, it doesn't seem to necessarily put the DLL in the registry in the same place as it was on my development machine. The error states: COM ...more >>

Marshal Structure Containing Array of Enums
Posted by Tyler at 8/15/2005 12:00:00 AM
I am attempting to write an application that will interface with a legacy API written in C. In one instance, the legacy API is invoking a call-back and providing a structure that contains an array of enums. The problem is that I cannot get the marshaller to convert the structure without an e...more >>

Variant size in WIN32 and WIN64 ?
Posted by Roberto at 8/14/2005 12:11:02 AM
Hello, I must use an array of variants to pass to a COM method. So i create an IntPtr and i use GetNativeVariantForObject() which works well for the first variant because i created a very large buffer. I do not know the size of a Variant, so i can't copy the others variant. What is the ...more >>

Interop assmblies on different computers
Posted by Bernd at 8/14/2005 12:00:00 AM
Hi, I am developing COM addins for Word and Excel. To work with these office applications my project has references to the corresponding COM objects (Microsoft Word 11.0 Object Library, for instance). Recently I started using a second computer for development. After having copied my proj...more >>

Member Variable Values Are Reset After Transaction Completes.
Posted by Mike Malter at 8/13/2005 6:48:25 PM
Here is the overview: I have a presentation layer (it can be an web page or a windows form), a Business Layer where business rules are enforced and a Data Layer which knows about the physical data store. The business layer does not know anything about the physical data store, and all it wa...more >>

fixing (pinning) class struct
Posted by antoine at 8/12/2005 7:25:16 PM
Hello, so I have an unmanaged dll c++ , which need a persistent pointer to a struct defined outside the dll , the dll keeps this pointer all along the life of the application. I use the c++ dll in a managed c# application where I initailize the struct, and where I pin its memory to pre...more >>

Crossing Managed/Unmanaged Boundary
Posted by Brian R. at 8/12/2005 8:35:14 AM
As I understand, there are ways to 'hook' into the CLR to aid in resolving assembly locations and other features. In a similar vain, is there a way to 'hook' into the CLR to be involved in Exceptions/Errors being returned to the unmanaged world from a .NET component being used through the...more >>

Array to pointer
Posted by Marco Filippini at 8/11/2005 11:49:03 PM
Hi, I'm developing an Managed C++ class library on top of a C++ static library. The managed C++ library will be used as a wrapper by others C# apps. How can I convert a managed array of bytes (Byte xxx[]) to an UCHAR* pointer inside the managed C++ class? Thank u in advance, Marco ...more >>

Write PDF Report ?
Posted by WJ at 8/11/2005 10:05:25 PM
I am planning to use PDF as a final report so that users can save what they have entered in the asp.aspx form to their own hard disk. Is there a component or control that will handle this ? I donot wish to use Crystal Report nor SQL Report. All I need is: when the use presses the "Print" bu...more >>


DevelopmentNow Blog