0
голосов
3ответов
936 просмотров

How to marshall COM object on the server side in visual c++?

I have a out-of-process COM server with an ATL Simple Object which creates another thread. The new thread will need to make calls to ATL Simple object. Since ATL Simple Object and new thread are created different apartments, ATL Simple Object needs to be marshalled in the new thread, otherwise e...

1
голосов
1ответов
393 просмотров

VB6 GUI not working in multithreaded COM environment

I have a VB6 COM client that makes calls to an inprocess STA ATL/COM server. One of the Server methods, X, can take a while to finish so I need to be able to cancel it. What I tried was to run the method code in a new thread and include another method, Y, that does a timed WaitForSinleObject. So ...

-1
голосов
1ответов
247 просмотров

C# console application with COM introp support

I want to create COM server which should be lanunched as a process using C#. I tried console application with COM interop support, client can able to create COM object of my server and call COM objects's method. But my server not launched as process (like out process server), also my server appli...

1
голосов
2ответов
1831 просмотров

Create Outlook task with Java

I have a requirement to have a new task appear in a user's task list in Outlook. The catch is that the source of the task will be generated in a Java environment. Does anyone know how I can create an Outlook task using Java? Thanks.

1
голосов
2ответов
1391 просмотров

Handling a SAFEARRAY returned from C# server

I need to return an array of structure (classes) from a C# library to an unmanaged C++ client. This is the function in the C# library: [ComVisible(true)] [Serializable] public sealed class RetrieverProxy : IRetrieverProxy { public IMyRecord[] RetrieveMyRecords(long[] ids) { IList...

2
голосов
4ответов
245 просмотров

What is the need of registering a COM component?

I am a .NET developer new to COM. I'd like to know what is the need of registering a COM component? What happens during registration.

1
голосов
1ответов
2993 просмотров

How to marshal .NET string to variant for COM call

I'm using a third-party COM library from C#. There are get/set methods that take a parameter of type VARIANT (type VT_BSTR). In the .NET wrapper, these parameters appear as type object, i.e. object getValue(); void setValue( object val ); The getValue method works ok, I perform a simple cast ...

3
голосов
2ответов
1532 просмотров

Absolute COM Confusion - C# interop with early-binding

I've been battling with VStudio, Google and various other tools and websites all day and found no solution - HELP!! I have two COM interfaces (pure COM, no ATL): IMyClassFactory and IMyClass with corresponding implementations I want to use them from C# BUT without registering the COM server wi...

2
голосов
1ответов
1157 просмотров

VB.NET COM Server implementing Excel UDF not callable with optional Excel.Range

Versions Excel 2007 (12.0.6425.1000) SP2, Visual Studio 2008 with VB.NET, Windows Vista The windup I have an Excel UDF written in VB.NET that has this signature: Public Function NonExcelName(ByVal A As Integer, _ ByRef B As Range, ByRef C As Range, _ ...

0
голосов
2ответов
990 просмотров

How should I go about moving Component Services to a new server?

We're moving our test server onto a new box, and I need to migrate all of our components that are in Component Services to the new box. We have all of the COM dll files located in sub folders in a COM directory on the server, and we want to copy that entire directory and register all the applicat...

0
голосов
1ответов
169 просмотров

Com error when trying to auto close browser sometimes

I try to close my browser in C# using the following code: private void KillIE() { ShellWindows winShells = new ShellWindowsClass(); foreach (InternetExplorer Browser in winShells ) { Browser.Quit(); } } Sometimes its works but today it doesn'...

16
голосов
1ответов
4171 просмотров

Creating your own HRESULT?

I already have a project that uses a lot of COM, and HRESULTS. Anyways I was wondering if it's possible to define your own HRESULT, AND be able to use the FormatMessage() for our own HRESULT? I dug around and can't find anything. Any ideas? EDIT Basically I want to define a set of my own HRESU...

1
голосов
1ответов
512 просмотров

Why is the .TLB not being re-compiled by MIDL?

In my main project directory, there is a .TLB file. It has old information in it, and it is compiled into the binary -- which I can tell from looking at the compiled binary in a hex editor. What's weird is that I updated my .IDL in the main VC++ directory and that's compiled into a .TLB in the p...

2
голосов
1ответов
1314 просмотров

Winforms: One COM object needs an STAThread, the other needs an MTAThread. How can I use them?

I'm trying to build a Winforms application with two COM components. However, one of the components only works when using [MTAThread] and the other only works with [STAThread]. What would the recommended solution be?

0
голосов
2ответов
153 просмотров

Close Python when Parent is closed

I have a Python program (PP) that loads another Program(AP) via COM, gets its window handle and sets it to be the PP parent. This works pretty well except that I can't control that AP still has their [X] button available in the top left corner. Since this is a pretty obvious place for the user ...

0
голосов
2ответов
420 просмотров

IDXGIObject::GetParent and Release

The IDXGIObject has a function to obtain a pointer to its parent GetParent. Unfortunately, the docs don't say whether I have to call Release() on the returned interface or not -- calling or not calling it works fine in both debug/release (that is, no crash), but I wonder whether I should release ...

1
голосов
1ответов
954 просмотров

How to Execute/ShellExecuteEx/InvokeCommand ITEMIDLIST pointing to Shell objects?

I'm building a kind of dock, and I struggle at finding how to save things like "Run", "Search", "Help", "Printers" and reopen them after that. I tried this : CComPtr<IShellFolder> pDF; SHGetDesktopFolder(&pDF); LPITEMIDLIST pidlPrintersAndFaxes=0; hr=pDF->ParseDisplayName(0, 0, L"...

3
голосов
1ответов
1254 просмотров

COM registration error in Visual Studio 2008 setup project

I'd like to register Outlook Redemption as an isolated COM component using a Visual Studio 2008 setup project. After adding Redemption.dll to my setup project, if I choose either vsdrfCOMRelativePath or vsdrfCOM options in Properties> Register, I get the following error. Exception EAccessV...

2
голосов
1ответов
1018 просмотров

Does PowerShell STA mode eliminate SharePoint memory leak issue?

Some background: SharePoint+PowerShell is (Usually) a Perfect Match by Zach Rosenfield [MSFT] SharePoint+PowerShell Leak Workarounds by me SO: Could you explain STA and MTA? In short, standard SharePoint guidance is that COM-backed objects like SPSite and SPWeb should not be used by differ...

0
голосов
3ответов
937 просмотров

How to effectively timeout a COM method call from C# code

I have had to set a fixed time out for a particular COM method call from a service that we have (which is written in C#). Not having used the System.Threading namespace for anything other than Thread.Sleep, I have had a play and have come up with a working prototype: bool _comCallSuccessful = fa...

3
голосов
4ответов
7372 просмотров

How do I convert a stdole.StdPicture to a different Type?

To receive the bounty, please provide an answer with working code. Thanks. I have a stdole.StdPicture Object of the Type vbPicTypeIcon. I need to convert it to Type vbPicTypeBitmap. Due to project contraints, I need to be able to do this using Win32 or VBA. I am trying to load a file's icon to a...

11
голосов
1ответов
10476 просмотров

How to get COM Server for Excel written in VB.NET installed and registered in Automation Servers list?

Versions Excel 2007, Windows Vista, VB.NET, Visual Studio 2008 with .NET 3.5 sp2, MSI setup package. What I am trying to do I have an Excel UDF that is written in VB.NET. It is exposed as a COM Server because you cannot create Excel UDFs in .NET languages directly. Installation is a real pain ...

0
голосов
2ответов
201 просмотров

Object files do not contain symbols that should be there

This is the specific error I am getting: libFoo.so: undefined reference to `IID_IFOOBAR' collect2: ld returned 1 exit status make: *** [/home/F.exe] Error 1 when I try to check the symbols in my object file A.o nm A.obj | grep IID_ I get no symbols listed in my object file of the 'IID_IFOOB...

6
голосов
2ответов
2101 просмотров

Spying on COM Objects

I've set myself a new task which involves "spying" on COM objects. Even if you don't do COM, you're probably familiar with API hooking techniques where you can hook onto an imported function and execute your own code before calling the original. API hooking is somewhat complex but it quickly get...

1
голосов
1ответов
1640 просмотров

WinHTTP IWinHttpRequest iface - cookie handling - how to get cookies from response?

I'm using WinHTTP IWinHttpRequest object. I do POST to a https domain specyfying a request body with credentials. The site is expected to return cookies in HTTP response. The code works in Wininet - but I don't know how in WinHTTP to get cookies from the HTTP response? Can anybody help? Dominik

0
голосов
1ответов
367 просмотров

Isolation-mode (regfree) COM references defined twice (build error MSB3180)

I have several C# projects in one solution which reference some isolation-mode (regfree) COM DLLs. Some projects reference the same DLL, and when I build, I get error [MSB3180][1]: COM component 'SomeDll.dll' is defined in both 'Native.SomeProject.manifest' and 'Native.SomeOtherProject.manifest'"...

0
голосов
1ответов
44 просмотров

Using SQL Server Designers from .NET

This is a duplicate question, but the other one didn't get any answers, so I'll have another go. I have SQL Server 2008 Client Tools installed, and would like to use SQL Server's query designer(s) in my application, for working with queries, views, SPs and functions. I'm pretty sure Access ADP d...

0
голосов
3ответов
1059 просмотров

how can i get get the MACaddress of all the NICs on my PC using WMI

HI all, I am trying to modify the code provided by MS try to access the the Network Adapter Configuration I am getting null pointer exception in it when i try to access the Mac Address or IPAddress property im using VC++ 2005. check for the // exception here: vtProp is returned as NULL line w...

0
голосов
1ответов
313 просмотров

How To Prepare An ActiveX Control For Delivery Over The Web

So i have the misfortune of embedding this proprietary ActiveX control we created into a web page so that it downloads the code from our server and installs as necessary. Our ActiveX requires a host of other files which need to be installed along with the activex control itself. It should als...

4
голосов
3ответов
10068 просмотров

difference between server.createObject and createobject in asp classic

according to http://msdn.microsoft.com/en-us/library/ms524620.aspx you should use server.createObject If you are already familiar with VBScript or JScript, note that you do not use the scripting language's function for creating a new object instance (CreateObject in VBScript or New in JScri...