Is it possible in c# to initialize an array in, for example, subindex 1?
I'm working with Office interop, and every property is an object array that starts in 1 (I assume it was originally programed in VB.NET), and you cannot modify it, you have to set the entire array for it to accept the changes.
As a workaround I am cloning the orig...
We have project PrjDb.dll in vb 6.0 that has a reference to ado 2.5. The project is built on Machine A. Now when we generate an interop for PrjDb.dll on another machine B, we end up with a new ADODB.dll with ver 2.5 in version field instead of linking it with the Primary Interop Assembly adodb.dll ( found under 'Program Files\Microsoft.N...
I need to build a managed DLL, targeted for x64, and expose it via x64 COM. I need a walk through, good article, etc...
Interop is fairly straightforward, but when you talk about x64 on both sides, I can't find anything.
...
I have a Windows Workflow application that uses classes I've written for COM automation. I'm opening Word and Excel from my classes using COM.
I'm currently implementing IDisposable in my COM helper and using Marshal.ReleaseComObject(). However, if my Workflow fails, the Dispose() method isn't being called and the Word or Excel handles ...
I've asked this question over on the MSDN forums also and haven't found a resolution:
http://forums.microsoft.com/msdn/ShowPost.aspx?PostID=3686852&SiteID=1
The basic problem here as I see it is that an interop assembly doesn't actually contain any IL that can be instrumented (except for maybe a few delegates). So, although I can p...
Using c#, VS2005, and .NET 2.0. (XP 32 bit) This is a Winforms app that gets called by a VBA addin (.xla) via Interop libraries. This app has been around for a while and works fine when the assembly is compiled and executed anywhere other than my dev machine. On dev it crashes hard (in debugger and just running the object) with "Unhandl...
BITS, the Windows background intelligent transfer service.
Looks like there are a few C# wrappers around that manage the interop to BITS, does anybody have any opinions on the best one?
...
Is there a .NET performance counter to show the rate of p/invoke calls made? I've just noticed that the application I'm debugging was making a call into native code from managed land within a tight loop. The intended implementation was for a p/invoke call to be made once and then cached. I'm wondering if I could have noticed this mist...
I'm trying to stream binary data to the standard output in .NET. However you can only write char using the Console class. I want to use it with redirection. Is there a way to do this?
...
My Google-fu is failing me on this question.
I have a coworker who has Visual Studio 2005 on his machine. I have Visual Studio 2008. He wants to open a project I wrote in C# 3.0, and we've gotten that far, but VS2005 barfs on the 3.0 code, like var.
He has the 3.0 and 3.5 frameworks installed, as well as the Visual Studio 2005 Extensio...
A VB6 application is using the Interop Forms Toolkit to work with forms written in .NET. The documentation for the toolkit advises calling a method on the toolkit to advise the toolkit when the VB6 application is shutting down.
The VB6 application uses a Sub Main procedure that loads a splash screen, then displays several modeless forms...
I have a mixed managed/unmanaged environment (Visual Studio and ReSharper) and I suspect CCW or RCW leak. Is there any way to dump all currently allocated wrappers and identify their source/target? I have WinDbg, SOS & SOSEx, so I can see total number of RCWs and CCWs with !syncblk command. I just want to see objects, so I can call !gcro...
I have a new application written in WPF that needs to support an old API that allows it to receive a message that has been posted to a hidden window. Typically another application uses FindWindow to identify the hidden window using the name of its custom window class.
1) I assume to implement a custom window class I need to use old sch...
The official J2ME implementation of Hessian seems to have serious limitations : complex objects are not supported. This limitation is not mentioned anywhere on the online documentation, but if you google "hessian j2me" you will find posts about this problem. No solutions found with google though.
Does anyone have a solution for this pro...
At the moment I use PHP for almost everything I develop for the Web but its linguistic limitations are starting to annoy me. However, as I developed some practices and maintain some PHP libraries that help me a lot, I don't feel I'd be ready to just switch to LISP throwing away all my PHP output. It could even be impossible on the server...
Hi, I need to call an external dll from c#. This is the header definition:
enum WatchMode {
WATCH_MODE_SYSTEM = 0,
WATCH_MODE_APPLICATION = 1 };
LONG ADS_API WDT_GetMode ( LONG i_hHandle, WatchMode * o_pWatchMode );
I've added the enum and the call in C#:
public enum WatchMode
{
WATCH_MODE_SYSTEM = 0,
WAT...
I have a VB6 COM component which I need to call from my .Net method. I use reflection to create an instance of the COM object and activate it in the following manner:
f_oType = Type.GetTypeFromProgID(MyProgId);
f_oInstance = Activator.CreateInstance(f_oType);
I need to use GetTypeFromProgID rather than using tlbimp to create a library...
I need to create an access (mdb) database without using the ADOX interop assembly.
How can this be done?
...
I just stumbled upon MainSoft's Grasshopper, which claims to cross-compile .Net ILM to Java bytecode. It seems to use the Mono implementation of the .Net libraries. All of the samples refer to web apps, but my requirement would be to cross-compile a .Net API (class library) to a Java API so that Java clients can use the API. Does anyone ...
I have a function in a native DLL defined as follows:
#include <string>
void SetPath(string path);
I tried to put this in Microsoft's P/Invoke Interop Assistant, but it chokes on the "string" class (which I think is from MFC?).
I have tried marshaling it as a variety of different types (C# String, char[], byte[]) but every time I eit...