Groups | Blog | Home


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
all groups > dotnet interop > march 2004

Filter by week: 1 2 3 4 5

CreateInstance(t) when t is interface (for Mattias)
Posted by Lars Olsson at 3/31/2004 5:54:53 PM
I'm trying to use the IGroupPolicyObject interface suggested by Mattias S. : http://www.dotnet247.com/247reference/msgs/39/197771.aspx I'm wrapping this interface in another class sort of like this: namespace MyNamespace { class WrappedIGroupPolicyObjectClass { ...more >>


P/Invoke & CallBack functions
Posted by Maxim Kazitov at 3/31/2004 3:54:06 PM
Hi, In my project I call some C functions from C# code, and some times I should use callback functions. Usually all works fine. But in some cases I have following problem : Error Message: Run Time Check Failure #0 The value of ESP was not properly saved across a function call. This is usu...more >>

Object Reference not set to an instance... Marshal.Copy problem
Posted by Robin Tucker at 3/31/2004 2:40:42 PM
(apologies in advance for cross post) Hi there, I have the following method which uses COM IPersistStorage to "save" a COM object into an ILockBytes in order for me to be able to fetch the data() bytes and put them into a database. I am using similar methods to create COM objects after rea...more >>

.Net COM component registration without restarting IIS?
Posted by bitseek NO[at]SPAM hotmail.com at 3/31/2004 2:13:04 PM
Hello, I have built a .NET C# COM component for use in classic ASP applications. When I deploy this COM the only way that I have been successful is to restart IIS after registering in global cache. With my VB6 COM components I was able to register the COM in MTS without restarting IIS. The me...more >>

NEWBIE: use COM Interop or P/Invoke?
Posted by Dan Schullman at 3/31/2004 1:02:08 PM
I'm trying to utilize some COM code (the WM Format SDK to be precise) from a ..NET application and could use some help/pointers on how to interoperate with it. FYI, I'm relatively new to Windows programming and am not familiar with many of the technologies I find in the docs (e.g., OLE, ATL, M...more >>

xTAThreadAttribute and P/Invoke interop
Posted by Dan Schullman at 3/31/2004 12:19:22 PM
I'm creating a C# application that uses P/Invoke to call into an unmanaged C++ DLL that in turn interacts with COM objects. Will the use of a xTAThreadAttribute declaration in the C# application have any impact on the COM threading model eventually used by the C++ DLL? And if not, how can I cont...more >>

CoCreateInstance error using LocalSystem user--Win2K vs. XP
Posted by Michael Foertsch at 3/31/2004 9:36:18 AM
I am using Interop between COM and C#. I am calling CoCreateInstance to get a COM object. The code is executing inside a service, running as the LocalSystem user This code executes correctly on XP and Windows Server 2003; i.e. the COM object is instantiated and can be used. However, running the...more >>

80004003 Invalid Pointer when exposing .net assembly to COM
Posted by Richard Murillo at 3/31/2004 9:21:11 AM
I am attempting to setup an API that will bridge managed code into an older legacy system. When I follow the directions in MSKB 817248 on exposing a .NET Assembly for COM Interop (or have VS.Net 2003 do it for me) it successfully registers the assembly in COM, however, i cannot create an instance of...more >>



Exception from HRESULT: 0x8004E005
Posted by Lars-Erik Aabech at 3/31/2004 9:17:04 AM
Hi! I've read a few posts allready about this problem, but all of them are inconclusive. I'd really like to know exactly why, and what we should do about it. The context is a .net webform calling a static method on a class which is in turn calling a VB COM+ component which is also used in A...more >>

Problem with COM interop inside a C# webservice
Posted by marco NO[at]SPAM marcoganz.com at 3/31/2004 2:52:24 AM
Hello! DESCRIPTION =========== I've registered a COM DLL containing several coclasses: coclass PlainVanillaObj { [default] interface IPlainVanillaObj; }; [ uuid(AA2715F9-6EF6-40D3-9CFF-04069358221D), helpstring("PathTableObj Class") ] coclass PathTableObj { [default] interfac...more >>

out and OutAttribute
Posted by Andreas HÃ¥kansson at 3/30/2004 11:13:21 PM
Hello, I have recently started looking into using interop to use Win32 Interfaces such as IShellLink and IDiskQuotaControl etc and I was wondering if there are any differences between making a parameter in a method out parameter or [Out()]parameter Are the two the same ...more >>

Windows Service using Excel Interop is flaky
Posted by fly1322 NO[at]SPAM email.com at 3/30/2004 8:41:33 PM
Hi, We have a Windows Service developed using C# that is setup to automatically generate Excel reports and copy them to multiple shares based on certain daily criteria. The development env is .NET Framework 1.1, Office XP plus Office SP PIA, VS.NET 2003 on Win XP Professional. We created a ...more >>

String Truncation problem when marshalling LPTSTR string to a managed string
Posted by sandeep at 3/30/2004 5:31:07 PM
Hi I am marshalling a LPTSTR string to a managed string and I get just 30531 characters, rest all is truncated To be more specific, I have writen code to call "GetOpenFileName" from Comdlg32.dll using P/Invoke, so I could create CustomOpenFileDlg which can read any number of files(limited by the...more >>

type mismatch - string array from c# returned to vbscript client
Posted by Brian Newtz at 3/30/2004 12:21:40 PM
Hello! I have a c# component which implements the following interface: public interface IFiles { string[] GetFiles(string path, string filter); bool FileExists(string path); } I have it registered for COM and in the GAC so that I can use it from a classic asp client (vb...more >>

OLE in RichTextBox, IStorage Interop
Posted by Paul Perry at 3/30/2004 8:41:05 AM
Hello I've been assigned the task of supporting the "Insert Object" command in our C# WinForms application, which allows the user to choose an OLE obejct to insert in a RichTextBox which is the main editor in our form I have found how to access the OleUIInsertObject() Win32 API to display the di...more >>

how to pass delegate to win32 dll?
Posted by Franz at 3/30/2004 3:09:11 AM
Suppose I have a delegate in C#. class FooForm { public delegate void MyFuncDelegate(int iX, int iY); MyFuncDelegate _myFunc; [DllImport("Bar.dll")] public extern static void SetMyFunc(MyFuncDelegate myFunc); public static void MyFunc(int iX, int iY) { System.D...more >>

Using VB6 objects from .NET
Posted by PaulR at 3/30/2004 12:51:11 AM
Hi I have some old VB6 code and I need to automate some testing from .NET by using the VB6 objects and interrogating the results. The VB6 object basically just does some work and returns an XML string which I need to validate An asp page using the VB6 object would be something like.. set myOb...more >>

Print Windows Control from IE
Posted by Mattias at 3/29/2004 10:21:08 PM
I am hosting an .NET Window Control in an HTML page. It works fine until I try to print the page. When printing the page the Windows Control does not get printed. Is there a way to make the .NET Windows Control to get printed or do I have to go back to using ActiveX controls? Any ideas or comments...more >>

ADOX problems
Posted by anonymous NO[at]SPAM discussions.microsoft.com at 3/29/2004 3:05:29 PM
When a set a reference to the ADOX library, I can use the objects for database structure manipulation, but I get new errors in other parts of my application, for example, using the Date() function results in error messages. Is ADOX confusing the definitions of other libraries? ...more >>

COM target does not implement IDispatch
Posted by r_adhakrishna NO[at]SPAM yahoo.com at 3/29/2004 2:07:24 PM
Hi could anybody can plz explain me why would I get this error mentioned below when I am trying to access COM+ proxy from my C# component. COM target does not implement IDispatch thanx in advance. --RK...more >>

Need help making a .NET Managed Wrapper for (unmanaged) C++ .lib (Getright SDK)?
Posted by Mello at 3/29/2004 12:14:42 PM
Hello all I just purchased the getright SDK a few nights ago to integrate into a downloader app I'm developing for a company. The SDK comes with a sample C++ app (just source) and a .lib file. The application won't compile in VS.NET 2002 (the documentation says it wants MSVC++ 5 or 6) -- it h...more >>

Interop and Word 2003?
Posted by Rodzilla at 3/29/2004 12:14:11 PM
I am trying to do some modifications to a Word document using VS/VB 2003. I have Office 2003 installed, and I have the PIA's for Windows XP installed. I included a reference to Micrsoft Word 11.0 library, which is an Interop.Word.Dll, and the Microsoft.Office.Core 11.0 dll from the GAC gets ...more >>

Calling COM interop from ASP page
Posted by Sanjay Kedare at 3/29/2004 6:22:43 AM
Hi, I am getting following error when I call COM interop from ASP page. Error Type: mscorlib (0x80070002) File or assembly name ajcj2njd.dll, or one of its dependencies, was not found. /dom/dom.asp, line 4 If I set the application protection to low in IIS, it works. I tried giving ...more >>

from COM to Interop -- using advise()
Posted by VR NO[at]SPAM MSDN.COM at 3/27/2004 3:21:07 PM
Hi I have an NT service, which keeps track of clients that connect to it and subsribe for events, which are fired using connection points. NT service stores event cookies, passed to it when a client makes a standard advise() call. I wrote my original client using ATL classes, data sink. I explici...more >>

System Menu modifications
Posted by MD Websunlimited at 3/27/2004 7:12:42 AM
Hi all, I need to convert a VB6 program that appends menu items to the control = menu (SystemMenu). I was wonder if the framework has intrinsic = functionality for this or must I continue to use win32 calls? Thanks, Mike...more >>

apsnet_wp.exe non-default identity vs. System.Web.Mail.SmtpMail
Posted by Andrei Suvorov at 3/27/2004 2:36:30 AM
Hello, Can anyone suggest how to handle th following problem: 1. I've changed userName and password attributes in <processModel> in machine.config to make aspnet_wp.exe run under my local account. 2. But now the following code in my .aspx fails with exception: using System.Web.Mail; Sm...more >>

Extending the Active Directory Schema
Posted by jain_brajesh NO[at]SPAM indiatimes.com at 3/27/2004 2:16:41 AM
Hi All, i want to extend the schema of Users in AD and want to add some custom attributes through c# application. Unfortunately after a lot of searching also i am not able to find the proper things. If somebody is having c# code snippts then please provide it. My requirement is to extend th...more >>

Web browser hosting: problems with xml files
Posted by Gabriele Zannoni at 3/26/2004 7:35:04 PM
Hi, I've hosted a web browser control in my c# application having no problems. I've implemented and associated to the active document a IDocHostUIHandler implementation. With html documents there's no problem: the external property of the jscript window object contains an instance of the de...more >>

sending pointers of C#.NET methods to native dll
Posted by news.microsoft.com at 3/26/2004 6:51:28 PM
Hi, I need to send the pointer of a C# method to a native user32.dll method. How can I do that? To be specific - the method is SetWindowLong of user32.dll which in VB6 is being is being called as follows - glOldWindowProc = SetWindowLong(glWindowHandle, GWL_WNDPROC, AddressOf WndMessage) ...more >>

Late binding?
Posted by Bill at 3/26/2004 3:46:57 PM
Is there a way to late bind to a win32 api call. I want to call a WIN32 API function from C# but if the dll does not exists or the security settings forbid it or its running on another OS, I want it to gracefully recover. Is this as simple as putting a try catch around the method call? Or if ...more >>

Get the Adress of an managed Object
Posted by Michael.Ring NO[at]SPAM mapandguide.com at 3/26/2004 11:45:10 AM
I'm writing a managed wrapper for some unmanaged C++ Code. It is important that the unmanged Objects have some references to its managed wrapper. How can I store the address of an managed Object* in an Integer Value. I tried it this way: Object* obj = new Object(); GCHandle h = GCHandle::A...more >>

Urgent : Pb when marshalling a 2 dimension array of char !!!
Posted by Cecile at 3/26/2004 9:44:51 AM
Hello, I have this following C structure : typedef struct aps_trc_ { s_aps_compte_ compte ; char opers[APS_SIZE_CODES] ; s_aps_montant_ amount ; char instspecs[4][79] ; e_aps_tdsstate_ flagetati ; char ...more >>

overloaded methods and exported tlb method names?
Posted by Dave at 3/26/2004 9:34:28 AM
Hello, I've looked, and can't find the solution. I'm hoping someone here could help. I've got a .NET component that I'm accessing from both .NET clients and unmanged C++ clients (via COM interop). The component has several overloaded methods (for example "void write(int, string)", "void w...more >>

ComboBox
Posted by Thomas Bock at 3/26/2004 6:35:13 AM
Hi NG How can I get the Window-Handle of the EditBox in a ComboBox? Thomas Bock ...more >>

NTFS change Journal
Posted by leeatkinsonlincs NO[at]SPAM hotmail.com at 3/26/2004 3:28:04 AM
Hi - are there any examples of reading the NTFS change journal from dotnet? I have been trying to use the FileSystemWatcher, but unfortunately, it doesn't seem to notice files being moved - just the deletion of them :( Many thanks Lee...more >>

Passing arrays from an ATL COM object into .NET
Posted by Ganesh at 3/25/2004 8:31:12 PM
I'm trying to pass a 1D array from a COM object built using VC++ 6.0, into a .NET web-service in C#, using COM interop. However, only the first element in the array is returned The IDL definition for the COM method is shown below [id(11), helpstring("method GetArray")] HRESULT GetArray([in, ou...more >>

PWSTR* being passed into unmanaged dll through C#
Posted by Jason Schneekloth at 3/25/2004 7:41:08 PM
Sorry for the double post here, but I've got a clearer explanation of the problem Here is my problem. I'm trying to make a call into an unmanaged dll through C#. Here is the prototype of the unmanaged function: void MyFunc(PCWSTR a, PCWSTR b, PWSTR* c); Here is how I am currently making the ca...more >>

calling IDispatch interface from C#
Posted by Ed Katebi at 3/25/2004 4:30:36 PM
Hello, I have and ATL COM dll that implements a bunch of com classes that are related as parent/child. For example in VB code it looks like this: Task.Name = "Task" Task.Timing.nRepeatRate = 0 Task.Timing.nRepeatStandardDeviation = 0 Task.Timing.nNumRepeats = 0 "Timing" is a "get prope...more >>

Automation object wants a safe array of DWORDS?
Posted by Robin Tucker at 3/25/2004 4:04:32 PM
My automation object (COM) wants a safe array of DWORDS passed into it, but VB.NET tells me what I'm passing in is invalid. I assumed all basic arrays in .NET were implicitly System.Array's and that the marshaller would automatically convert it to the required SAFEARRAY. This appears not to be ...more >>

Interact with Outlook 2002/2003?
Posted by M O J O at 3/25/2004 10:42:37 AM
Hi' (using vb.net) I need to interact with Outlook. In the "New Message" form, I want to add a textbox where I can type in a customer name, have some vb.net code search for the Customer ID, save the message in my sql database and then send it. Is this possible to "interact"/addon to ...more >>

QueryInterface, IOleContainer::EnumObjects, ...
Posted by Invalid at 3/25/2004 9:27:56 AM
The following C++ snippet, taken from Q196340, outlines how to go about accessing the WebBrowser object model of subframes. I'd like to take advantage of this in a C# based Windows.Forms drill down app, but I have no idea how to mimick such an approach given an instance of AxSHDocVw.AxWebBrowse...more >>

Automate MS Word Mail-merge
Posted by Ty at 3/25/2004 1:01:08 AM
Does anyone know how to Automate MS Word Mail-merge with C#. I found an article on msdn about this but it doesn't seem to work ...more >>

How to transform a big mfc app stepwise to c#
Posted by Manfred Derenbach at 3/24/2004 4:05:42 PM
I want to transform a big MFC aplication to C#. In Visual Studio, in addition to the existing MFC application project, I created a C# Class Library project as a container for redefined Classes that should be used instead of some of the old C++ classes. Now the problem is that, as long as there...more >>

passing int's, bstr's from ATL7 DLL to C#...
Posted by Daniel Bass at 3/24/2004 11:44:20 AM
Hi, I'm trying to create a simple ATL 7.0 object that passes back reference parameters. IDL: ----- parameter "[in] INT nValue" works great... paramter "[out, retval] INT * nValue" doesn't work in this context code snippet ------------- STDMETHODIMP CIbmCLibWrappe...more >>

TlbExp and inherited interfaces lost
Posted by loismaui NO[at]SPAM yahoo.com at 3/24/2004 11:08:27 AM
I have a C# app which I have two interfaces defined. One interface is inherited from the other interface. When I use the TlbExp, both interfaces inherit from IDispatch rather than just one of them. Here is an example: This is the entry in my C# file: public interface ILoisInterface : ILoi...more >>

RCW Problem in Word Add-in
Posted by dgiese NO[at]SPAM gmx.net at 3/24/2004 6:10:29 AM
First off, if this would be more appropriately posted in another group please let me know. I thought I would post here since this issue has to do with COM. I am developing a Word add-in that searches a document for a list of words and processes the locations of the hits as a list of Word.Rang...more >>

Custom Exceptions in COM+
Posted by el_sid at 3/24/2004 2:36:06 AM
We are using a custom exception for our error handling in COM+. We have implemented the serialization new constructor and the GetObjectData() function so that serialization can occur with our class (and seems to work). However when our custom exception is thrown by our COM+ component it always see...more >>

Marshalling Question
Posted by Jeff B. at 3/23/2004 2:04:27 PM
Hello, I'm trying to retrieve a string value from an API call that returns an array of null terminated strings. Each string (i.e. line) is terminated by a single null character and the entire string is terminated by two null characters. Typically, I use the StringBuilder type to return strin...more >>

RTC Client
Posted by nouffer at 3/22/2004 11:51:06 PM
Hi I am trying to implement a SIP client on RTC 1.2 with c when I try to create a profile it gives cast erro please help me to create a profile and register the presence on the serve ...more >>

Help with Windows Media Encoder in C#
Posted by Riley Phelps at 3/22/2004 11:21:06 PM
I am trying to create a .wmv using the Media Encoder SDK (v9) in C#. I am having problems wit source groups that have graphic (.bmp, .gif and .jpg) files. According to the "Using a File as a Source page in the documentation "C:\WMSDK\WMEncSDK9\wmencsdk.chm", plug-ins for .bmp and .jpg are includ...more >>


DevelopmentNow Blog