In .NET perspective:
What is a Memory Leak?
How to understand whether your application leaks? What are the effects?
How to prevent a memory leak?
If your application has memory leak, does it go away when the process exits or killed? Or do memory leaks in your application affects other processes on the system even after process completi...
I saved my VB-Express code as .dll and registered it with regasm and made a .tlb file.
But when I try to run a function from it in an Excel-modul I get: Run-time error ‘453’: Can’t find DLL entry point RegisterServiceProcess in kernel32
What step did I miss?
...
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...
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'm using the Excel interop in C# (ApplicationClass) and have placed the following code in my finally clause:
while (System.Runtime.InteropServices.Marshal.ReleaseComObject(excelSheet) != 0) { }
excelSheet = null;
GC.Collect();
GC.WaitForPendingFinalizers();
Although, this kind of works the Excel.exe process is still in the background...
I am writing a compiler in F# and I want to be able to access the unmanaged metadata COM interfaces in the .net runtime. Before anybody mentions it, Reflection.Emit is not suitable for my purposes, nor do I want to use any other method than the metadata COM interfaces.
I've imported mscoree.tlb but it doesn't seem to include the interfa...
Is there any way of obtaining a list of registered COM interfaces on a windows machine, with GUIDs?
Before anybody thinks this isn't related to programming, I need this data in order to reference a COM interface in F# (or C#) for interfaces that tlbimp isn't exposing.
...
I'm writing an Excel Addin using COM Interop from .net. I have a command that pops up a dialog, and from the dialog I do some work like collecting data from the used range of several sheets. The problem is that if a cell is in edit mode, some of the calls that I need to make will throw exceptions. I would like a way of determining before...
What interop signature would you use for the following COM method? I am interested particularly in the final two parameters, and whether to try to use MarshalAs with a SizeParamIndex or not.
HRESULT GetOutputSetting(
DWORD dwOutputNum,
LPCWSTR pszName,
WMT_ATTR_DATATYPE* pType,
BYTE* pValue,
WORD* pcbLength
);
Doc...
Here's the core problem: I have a .NET application that is using COM interop in a separate AppDomain. The COM stuff seems to be loading assemblies back into the default domain, rather than the AppDomain from which the COM stuff is being called.
What I want to know is: is this expected behaviour, or am I doing something wrong to cause th...
I'm trying to use a .NET assembly from VB6 via interop without placing it in the GAC and without using the /codebase argument for regasm.exe.
From what I understand, when I run regasm.exe on a .NET class library, it creates a registry entry for each class in the class library telling the COM clients they should load mscoree.dll that ser...
Hi,
I am developing a jsp application. I am forced to load a COM object. Can such a thing can be done? if yes, how??
Many thanks,
Ofer
...
The message defined in the title of this post, along with the HResult 0x8007007A occasionally occurs while creating an instance of a Windows Workflow Foundation Runtime.
The error text is pretty self explanitory, and using Reflector over the Workflow Foundation assemblies I have narrowed down the problem to one of the following calls in...
Hi,
I'm about to start writing a .Net component which will be called from a VB COM+ service (the new component is a DLL which calls out to a webservice and returns based on the response). I'm not sure how to handle error conditions that might occur in the .Net code in the calling VB.
The two types of errors I'm worried about are:
exc...
After moving a project from .NET 1.1 to .NET 2.0, MsBuild emits lots of warnings for some COM objects.
Sample code for test (actual code doesn't matter, just used to create the warnings):
using System;
using System.DirectoryServices;
using ActiveDs;
namespace Test
{
public class Class1
{
public static void Main(string[]...
I am attempting to return a collection of departments from a .NET assembly to be consumed by ASP via COM Interop. Using .NET I would just return a generic collection, e.g. List<Department>, but it seems that generics don't work well with COM Interop. So, what are my options?
I would like to both iterate over the list and be able to acce...
This is a C# console application. I have a function that does something like this:
static void foo()
{
Application powerpointApp;
Presentation presentation = null;
powerpointApp = new Microsoft.Office.Interop.PowerPoint.ApplicationClass();
}
That's all it does. When it is called there is a fifteen second delay be...
If I put a DateTime value into an Excel cell using Range.set_value through .Net COM Interop, and then retrieve the value of that same cell using Range.get_value, the Millisecond part of the value is not returned, though everything else is correct.
Is this a bug?
What is the workaround? I'm guessing that using the Value2 property instea...
I am attempting to write a component in C# to be consumed by classic ASP that allows me to access the indexer of the component (aka default property).
For example:
C# component:
public class MyCollection {
public string this[string key] {
get { /* return the value associated with key */ }
}
public void Add(string k...