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

Filter by week: 1 2 3 4 5

PBYTE USER_INFO_3 Structure NetUserEnum
Posted by Bob at 11/30/2003 10:41:05 AM
I am going calling NetUserEnum winapi to get access to information about users on a server. I have got this working fine when it returns a USER_INFO_0 struct: [StructLayout(LayoutKind.Sequential, CharSet=CharSet.Unicode)] public struct USER_INFO_0 { public String Username; } I am...more >>


VB to C# and __ComObject-problems
Posted by news01 NO[at]SPAM online.de at 11/29/2003 2:22:29 PM
Hi, I'm working on a migration VB.NET to C#.NET. One function scans all links of a HTML-Document to other pages. All links are available with "doc.links.item(i).href" VB.NET ------------------------------------------------------------------ Private Sub EnumerateLinks(ByVal doc As mshtm...more >>

Getting QueryInterface failed exception
Posted by Kirti at 11/28/2003 10:08:01 PM
I am using sqldmo.dll to get all SQL Server names. I have added sqldmo dll to References. It's giving QueryInterface exception. I have tried the same thing in VB, there it's working fine. Can anybody help me out in solving this problem? Below I am giving the code-- Dim obj As New SQLD...more >>

IContextMenu2 Interface
Posted by Jeff Gaines at 11/28/2003 5:47:17 PM
I have written an app that shows the Explorer Context Menu when a file/folder is right clicked in a ListView. I cannot get the 'Open With' and 'Send To' menu items to work. From trawling the internet it seems to me I need to implement the IContextMenu2 interface so that I can call 'Handle...more >>

.Net Framework 1.1 toolbandband in IE on XP, problem implementing Visual Styles
Posted by jwallison at 11/27/2003 6:50:04 PM
I have implemented an IE toolband object in C#/Framework 1.1. All is well, except if I want to try to enable visual styles in the toolband. If I call Application.EnableVisualStyles()/Application.DoEvents(), I get a beautiful, visual styles-type interface displayed by my toolband... until IE ...more >>

COM object lifetime in managed code
Posted by Assaf at 11/27/2003 6:17:03 PM
hey all. i am allocating an object using Activator.CreateInstance(System.Type); I get a reference to the Com object. however, i am not sure how to close down the object that i have. do i need to call Marshal.ReleaseComObject()? will the garbage collector collect it without me calling it R...more >>

HELP! SET TRANSACTION ISOLATION LEVEL query.
Posted by Eric Porter at 11/27/2003 11:15:43 AM
Dear All, I have a VB6.COM program using a VB6.COM DLL, which in turn uses ADODB that performs various bits of SQL. I have re-written the VB6.COM DLL in C#.NET (with a VB6 shell), which uses the ADODB.Interop library supplied with .NET. The VB6.COM program above calls this C#.NET library i...more >>

Wrapper Class Over Complex Structure
Posted by yccheok NO[at]SPAM yahoo.com at 11/27/2003 3:16:20 AM
currently, i would like to enhance the features of my system, which is previously written system in c# by using several using several native DLL. however, the data structure in the DLL is rather complicated. they have several array of struct re-inside struct, struct re-inside array of struct,...more >>



tblimp not recognized as an internal or external command
Posted by Dave at 11/26/2003 10:50:47 PM
Help! When I try too run "tblimp" at the command line I get the following error: 'tblimp.exe' is not recognized as an internal or external command. Where do I go from here? Thanks, Dave...more >>

How to determine printer port ?
Posted by Lee Gillie at 11/26/2003 3:40:35 PM
Someone doing design of VB.NET decided I don't need to know the printer port any more. But I still do! It was really handy in VB6. How can I find it in VB.NET? We use print dialog to choose a printer. I want to then send RAW print to port, using WritePrinter in Win32 API. Don't know how to get...more >>

runtime hosting in Compact Framework?
Posted by Raul at 11/26/2003 12:26:50 PM
Hello, I would like to know whether it's possible to host the runtime in PocketPC, just as you do in PC. Also, are there any special issues concerning CF hosting? Thanks in advance, -- Raul Santelices A, M.Sc. Edunova S.A. | http://www.edunova.cl ...more >>

Detecting an event
Posted by Milan Todorovic at 11/26/2003 10:06:37 AM
I need to write a service (or a background app) to perform a certain set of action if no keybord input or mouse movements have been made in a given time. Now, I know that vb.net can detect the such events within the form, but I need this to be system wide, since there will be no form. Is there ...more >>

Invert Excel columns and rows
Posted by Jack Mullins at 11/26/2003 7:16:16 AM
I am populating a datagrid and allowing it to be exported as an excel spreadsheet but my internal customer needs the columns and rows inverted. Any help will be appreciated. Asp.Net, Office XP, Visual Studio.Net 200 Jack...more >>

There is no MTS context available - What does this mean?
Posted by Ken at 11/26/2003 5:08:40 AM
Hello All, I am trying to use a (.NET ready?) dll assembly written by IBM for the Websphere product. It is called amqmdnet.dll. When I try to create a new object I receive an error message which says "A first chance exception of type 'System.Runtime.InteropServices.COMException' occurre...more >>

Interop Issue with VB6.0 COM+ Proxy?
Posted by macca at 11/26/2003 3:50:42 AM
Hi, I've posted this on the WebService thread but had no luck so perhaps any interop experts can shed some light on this? All i'm trying to do is make a call into an unmanaged COM+ component via it's application proxy from a .NET ASP Web service. This works fine from a .Net Console app, b...more >>

Implementing IOleCommandTarget
Posted by Oliver Sturm at 11/25/2003 9:49:23 PM
Hey, can I implement IOleCommandTarget in a .net COM server? I had the idea to define the interface myself using the GUID it usually has, then implement it... is that the right way to go? Oliver Sturm -- omnibus ex nihilo ducendis sufficit unum Jabber sturm@amessage.de I...more >>

Calling Win32 DLL -Data Missing
Posted by Badrinath Mohan at 11/25/2003 4:35:45 PM
Hi Guys I am calling a simple win32 dll from a C# application. Say the function is GetLastErrorString(BSTR *pstr) the C#client calls it as [DllImport("..\\..\\..\\ClientDll\\Debug\\ClientDll.dll",EntryPoint="?GetLas tErrorString@@YAHPAPAG@Z")] static extern int GetLastErrorString(ref strin...more >>

MarshalAs(UnmanagedType.IDispatch) ?
Posted by Dan Noel at 11/25/2003 2:11:51 PM
I am using this attribute to convert a .NET object to call an automation routine that requires an IDispatch. I am able to call the automation function, but when I take a look at the incoming parameter in the C++ code, I see an IUnknown pointer type. I have made several attempts to force...more >>

Stack problems with IDispatch* as method parameter
Posted by Bernd Krueger at 11/25/2003 12:48:08 PM
Hi, different from the usual solutions, we want to substitute a C++ coded COM server with a c# application. This works so far. But the transmission of a IDispatch pointer causes a stack error. The method we want to substitute looks like: HRESULT SetIDispatch([in] IDispatch *ptr); Inside ...more >>

Interoperability c# dll with Delphi5
Posted by stage1 at 11/25/2003 8:31:12 AM
Hello I would use a c# dll that realize a visual control in a Delphi 5 program Can I do this How Thanks a lot ...more >>

Deleting an excel worksheet
Posted by digiovanni_me NO[at]SPAM hotmail.com at 11/25/2003 7:28:17 AM
I am having trouble deleting a worksheet using the Excel XP PIA. Here is my code: CType(excelApp.Workbooks(1).Worksheets(1), Excel.Worksheets).Delete() I have also tried: CType(excelApp.Workbooks(1).Sheets(1), Excel.Sheets).Delete() The worksheet never gets deleted. Thanks....more >>

Returning string from DLL
Posted by Hakon at 11/25/2003 2:10:08 AM
Hello, I need to call a function in a legacy, unmanaged DLL that has the following syntax: int GetVersion(char **version); The 'version' parameter needs to be a pre-allocated string of size 250 and it will be filled by the function. The function both zero-terminate the version string as...more >>

COM Interop Registration Failing in VS Build
Posted by Kevin Westhead at 11/24/2003 6:23:34 PM
I'm trying to build an assembly with a COM-visible type that derives from a COM-invisible type in another assembly. Here is a simplified overview of the hierarchy: support.dll ======= [ComVisible(false)] public abstract class Settings { public abstract void Read(SerializationInfo info); ...more >>

Memory leak in interop
Posted by Trokey at 11/24/2003 2:17:27 PM
I am making interop calls to an object in a .NET component from a C++ program and am leaking memory... the following is some sample code: //////////////////////////////////////// // .NET component (Test) //////////////////////////////////////// // interface [InterfaceType(ComInterfaceType....more >>

Custom Marshaling and Interop in C# (array of structs inside struct)
Posted by asana108 NO[at]SPAM hotmail.com at 11/24/2003 10:59:16 AM
Hi! I am trying to marshal a data structure comprising of a structure inside a structure and also an array of structures inside a structure using the default marshaler through the StructLayout machanism. However, I have not had much success and read somewhere that the best mechanism would b...more >>

How to implement an exisitng COM interface in .net
Posted by Mohan Bisht at 11/24/2003 10:02:58 AM
Hi, I have to write a component in c#, which provides a COM interface to an existing application, for which I have a .tlb file provided which contains definition for an interface which i need to implement and expose to the COM Client, (an exisiting interface to be implemented by the .net object...more >>

OLE in Windows Form
Posted by mreid NO[at]SPAM exhibitworks.com at 11/24/2003 9:44:53 AM
How can insert an OLE object in a Windows Form? If visual basic 6.0 you could use the OLE Control to a complish the same task ...more >>

ASP.NET DataGrid and Excel
Posted by Milan Todorovic at 11/24/2003 9:31:18 AM
I desperately need help. I have an ASP.NET (in VB.NET) app that displays the data within the datagrid object. I need to allow for exporting of that data to the Excel spreadsheet. I have tried using Excel (referenced) object, but for some reason I can't get it to work. I get all sorts of COM er...more >>

IPictureDisp
Posted by Joe Hershman at 11/24/2003 7:36:12 AM
hey all, i need to convert a bitmap into an IPictureDisp type. but i can't figure out how to do it. could someone point me in the right direction. thanks in advance -joe ...more >>

Same old Excel problem (?)
Posted by Rickard at 11/24/2003 2:31:13 AM
I'v been reading almost every article/post that there is about this problem, and I've made some progress in my app using Excel. But there's still one piece, at least, which I don't get. Some or both of these lines leaves Excel process in memory Dim idx As Intege For idx = 1 To ...more >>

IDisposable, using(), RAII and structs [Discussion]
Posted by codymanix at 11/24/2003 1:15:04 AM
Last night I had several thought about RAII and want to discuss a bit. Why doesn't CSharp support destructors in structs? Wouldn't that make RAII possible like in C++? When the struct goes out of scope, the dtor could be immediately be called (no GC needed). For that, you don't have to decla...more >>

Help with conversion from C++
Posted by davemc at 11/23/2003 10:53:41 PM
Can anyone shed some light on the proper syntax for this set of lines? I am completely new to C# and am finding interop to be a bit confusing. #define FEXPORT __declspec (dllexport) #define FTYPE CALLBACK FEXPORT LRESULT FTYPE DRV_DeviceGetNumOfList(SHORT far *NumOfDevices); FEXPORT LRESUL...more >>

I need some help with this code....
Posted by EMW at 11/23/2003 5:49:20 PM
Hi, Can someone please look at this code and tell me why I get an exception error on the last line: For aa = 0 To ds.Tables(0).Columns.Count - 1 dbColumn = New SQLDMO.Column dbColumn.Name = "'" & ds.Tables(0).Columns(aa).Caption & "'" 'ds is the dataset dbColumn.Datatype =...more >>

Raw copy from array of byte to array of Int16
Posted by JM at 11/23/2003 8:16:54 AM
Hi, I need to do a raw copy of a byte array to an Int16 array. For e.g., I have an byte array which has length 100, and I need to copy this to an Int16 array that has length 50. So 2 elements in the byte array gets copied to 1 element in the Int16 array. In VB6, this was easily done using ...more >>

mshtml HTMLFormElement events
Posted by Sunny at 11/23/2003 4:17:16 AM
Hi all, dev. env.: VS.Net2003/C# I have a windows form application with web browser control. I need to capture the onsubmit event of the forms in the document in order to get the values and log them. I have tried this: 1. this.current_page = this.mydoc.Document as mshtml.HTMLDocumen...more >>

Primary Interop Assemblies for Visual SourceSafe
Posted by Richard Richards at 11/22/2003 2:27:15 PM
Hello All, Just curious to know if anyone has heard if there are PIAs for VSS available? If not now, in the future? Thanks in advance! ...more >>

DllImport
Posted by Ms at 11/22/2003 8:36:11 AM
hi there, Is there a tool/way to generate the DllImport (and data structure) statement based on a dll we provide, in order to be able to call functions from a C# app? (advapi32.dll) Thanks, Maurizio. ...more >>

ExecutionEngineException
Posted by Bako Sreeram at 11/21/2003 10:50:20 PM
Hi All, There has been a problem with VS.NET while using mshtml interop assembly. It gives executionengineexception for the first time it is used. After the failure, second request onwards, it quietly handles all the HTML processing. Does anyone know of how to solve this problem? Your inputs a...more >>

MLang interop problem
Posted by joikm NO[at]SPAM hotmail.com at 11/21/2003 5:11:00 PM
I am attempting to use the MLang.dll in C#. I had to generate the TBL from the IDL in order to create the primary interop assembly. From some reason, this process made the arguements with char* into byte*. I manually changed these to IntPtr (native int). The main function I need is DetectInputCo...more >>

Win32 error codes
Posted by Mike Bresnahan at 11/21/2003 4:39:20 PM
What is the best way in .NET to convert a win32 error code to a human readable message? A couple options come to mind. 1) Hard code messages for all error codes I'm interested in. 2) Find a win32 function that performs the task and call it through P/Invoke. Concerning #2, does such a funct...more >>

.NET dlls
Posted by Dim at 11/21/2003 4:25:21 PM
Just don't ask me why i need this ;-) Is it possible to create a dll in let's say C# (.NET that is) and the use it in Visual Basic??? I ran a simple test: a small Class Library project using System.Windows.Forms and one method in the main class to display a little Messagebox indicating t...more >>

IXXSO queries and asp.net search pages
Posted by Richard K Bethell at 11/21/2003 4:24:58 PM
Hi, Are there any examples of IXXSO use through .NET? We've tried taking our old ..asp pages forward by doing a minimal migration (removing 'set' and leaving the late bound objects as are) and are finding that this just isn't working very well - and using the indexing OleDb provider hasn't r...more >>

How to call .NET dll by VB6 dll
Posted by FD at 11/21/2003 12:45:14 PM
For performance reason, I want to replace some VB6 dll by .NET C# dll, How to call .NET dll function by VB6 dll? Thanks, FD...more >>

COM And .NET Objects Calling Interop Assembly
Posted by Onno Ceelen at 11/21/2003 11:08:12 AM
Hi, I've a migration scenario where I rewrite a COM object to an .NET interop assembly (so, still callable from COM). What is the impact if I continue my step-by-step migration and have a scenario where my .NET objects start to call .NET interop assemblies? Is there an overhead included? Fo...more >>

Memory leaks and errors not caught -using amqmdnet.dll from IBM
Posted by Ken at 11/21/2003 9:07:43 AM
Good morning everyone, I am having a problem closing/disposing of objects created by using IBM's "amqmdnet.dll" . This dll was written for .NET by Neil Kolban & IBM. My problem is when I click the button it creates a IBM.WMQ.PCF.PCFMessageAgent class object. However ,IBM has not followed ...more >>

? on Marshal.ReleaseCOMObject
Posted by ezelasky NO[at]SPAM hotmail.com at 11/21/2003 9:02:22 AM
What are the side effects of using Marshal.ReleaseCOMObject to release COM objects? We have ASP .NET application that makes many calls to our middleware, five COM+ objects. Each time a new session is begun the RCWs are created once and cached for use though out the session, when the user qui...more >>

Excel 2003 and WinForm
Posted by Guy Dillen at 11/20/2003 9:16:37 PM
Is it possible to integrate Excel 2003 (Workbook/sheet) in a WinForm? What I want to achieve is dat Excel runs in a WinForm (as a control?) and not as a popup Excel Workbook/sheet. Thanks. Guy ...more >>

Thread Synchronization between unmanaged and managed code.
Posted by Ola F Sprauten at 11/20/2003 8:01:42 PM
I have an old library that I recompiled in VC70 and made a managed wrapper for in order to use it from a C# .NET app. The problem is that the old code either a wants to post messages when it recieves information on a named pipe, or signal a CEvent. I am at a loss how to solve this problem. Rewri...more >>

"Member not found" using input property on MSXML processor object
Posted by Andy Norman at 11/20/2003 5:52:39 PM
I have a strange problem. When I try to call the input property of the MSXML processor object from VBScript in an ASPX page I get the error "Member not found". The same code (with a few "set" statements added) works find in ASP. What on earth is going on ? I can't find anything in the know...more >>

Com, Variant and VT_RECORD
Posted by Pawel Janik at 11/20/2003 4:11:35 PM
Hello. In my COM method i receive data with parameter of datatype VARIANT, type VT_RECORD. How to marshal resulting object to my defined data structure (class)? As i read, .net framework fo not have marshaler for this type. -- pozdwawiam, Pawe³ Janik ...more >>


DevelopmentNow Blog