I would like to use a COM object in my application.
How can I make sure the object is registered in the machine?
The only solution I found (also on SO) was to use a try-catch block around the initialization:
try {
Foo.Bar COM_oObject = new Foo.Bar();
} catch (Exception ee) {
// Something went wrong during init of COM object
}...
Hi
I need to pass string lists to unmanaged c++ how can i do this ??
I have used IDictionary as method return type and send through com but it doesn't work How to achieve this.
i write in c# as follows
IDictionary postNames()
{
IDictionary post=Dictionary();
post.Add("Raj");
post.Add("Mahesh");
post.Add("john steek");
return...
I'm experiencing a memory leak when using WMI from Delphi 7 to query a (remote) pc. The memory leak only occurs on Windows 2003 (and Windows XP 64). Windows 2000 is fine, and so is Windows 2008. I'm wondering if anyone has experienced a similar problem.
The fact that the leak only occurs in certain versions of Windows implies that it mi...
I've written a Delphi DLL that communicates with a third party program via COM. Some users report that the third party program crashes occasionally. Others using the software in an identical fashion have never experienced a crash. When this crash occurs, the third party program appears to simply become unavailable in my DLL app.
The ...
I have to perform a large number of replacements in some documents, and the thing is, I would like to be able to automate that task. Some of the documents contain common strings, and this would be pretty useful if it could be automated. From what I read so far, COM could be one way of doing this, but I don't know if text replacement is s...
I'm writing an EXE COM Server that exposes a class that lock a system resource.
In normal execution the client release the resource (the COM executable shutsdown a couple of seconds later.
In abnormal execution, the client app crashes, leaving the com sever with an instance having a positive reference count. The COM executable runs for ~...
I can load COM DLLs that are registered on my machine like this:
Type type = Type.GetTypeFromProgID("MYCOMDLL.ClassName");
object boxed = Activator.CreateInstance(type);
I can then poke around invoking methods etc.
How can I achieve this from a DLL file that is not registered on my machine?
Something like this magicode:
Type type =...
Microsoft has promised that VB6 code will continue to work on Windows 7, but has anyone noticed any gotchas specific to running VB6 code in the Windows 7 RC?
And for that matter, any issues with COM objects and ActiveX controls outside of VB6? I remember Microsoft saying that they'll ensure THEIR controls continue to work and end it at...
For a very long time, when I have an error handler I make it report what Project, Module, and Procedure the error was thrown in. I have always accomplished this by simply storing their name via constants. I know that in a Class you get the name programmatically with TypeName(Me), but obviously that only gets me one out of three pieces o...
Hello,
I have a PHP script running on XAMPP in Windows XP that will open a .doc file and then save it as a different copy. This was working fine earlier on, but out of nowhere the error message keeps appearing.
$path = "c:/xampp/htdocs/";
com_load_typelib('Word.Application');
$word = new COM("word.application") or die("Unable to instan...
I'm interoping with some com objects in a web service using code shared with a windows app. The window apps has no problems interoping with the com objects but the web service throws this exception
'Type 'MapShots.FODDs.ilfFOD.fodDescriptions' in Assembly 'ilfFOD, Version=1.1.1.0, Culture=neutral, PublicKeyToken=null' is not marked as...
I'm currently writing about dynamic typing, and I'm giving an example of Excel interop. I've hardly done any Office interop before, and it shows. The MSDN Office Interop tutorial for C# 4 uses the _Worksheet interface, but there's also a Worksheet interface. I've no idea what the difference is.
In my absurdly simple demo app (shown belo...
I'm writing an Outlook COM addin using C++/ATL.
I'm getting a rather odd set of errors and results back from Outlook when I call _PostItem::SaveAs. This only occurs in Outlook 2002 (Outlook XP) and only when the _PostItem is an embedded item (an attachment of some other outlook item).
If the Post is an HTML type, it fails with E_INVALI...
I'm rewriting a script that uses COM to automate a windows application, and I'd like to rewrite it in Java. The thing is, the COM libraries seem a little outdated, and I don't want to waste time with code that doesn't work. Is there anything you tried and worked?
...
I am trying to use ArcFM with my ArcGIS project, and I've noticed a bug.
If my main thread is marked with the [STAThread] attribute, the program hangs on exit with the OS Loader Lock exception. When I remove that attribute the program ends just fine.
The following code hangs
[STAThread]
private static void Main()
{
MMAppInitialize m...
Hi
i have tried returning a collection of objects from c# and access them usig c++ via COM but failed.I have tried for List ArrayList and IDictionary all and failed.
i have tried
http://stackoverflow.com/questions/1032060/how-to-return-a-collection-of-strings-from-c-to-c-via-com-interop also but not succeed.
can any body Help me
...
Hi all,
I wanted to implement python com server using win32com extensions.
Then consume the server from within the .NET.
I used the following example to implement the com server and it runs without a problem but when I try to consume it using C# I got FileNotFoundException with the following message "Retrieving the COM class factory for...
I have a COM interface and need to add an accessor method to it. The returned value can actually be of one of 4 types: VARIANT_BOOL, long, BSTR or an IDispatch derived interface.
I therefore have a choice: either I return a VARIANT or I have 4 different access methods that return distinct types.
interface IValue1 {
HRESULT GetType...
Hi Guys,
I have never used log parser before..
well I am getting this error now.. i don't know the reason..
Retrieving the COM class factory for component with CLSID {8CFEBA94-3FC2-45CA-B9A5-9EDACF704F66} failed due to the following error: 80040154.
can ya help me out with this..
:)
...
Hi all,
Come across what looks at first sight like an MT-issue, but I'm trying to understand in detail the STA model used by COM+.
Effectively, I have a legacy COM+ component, written in VB6, that calls into a native (i.e., not-COM) Win32 DLL written in C++.
Having some intermittant (and impossible to reproduce in testing) problems wi...