Here is a concrete example:
I create a IWeBrowser2 interface by calling wb.CoCreateInstance(CLSID_InternetExplorer, 0, CLSCTX_SERVER);. This gives me a marshaled interface from my process into whichever of the running iexplore.exe processes happens to contain this browser tab in my thread A.
Now I use the IGlobalInterfaceTable to get a...
I am attempting to debug a problem with a ctypes wrapper of a windows DLL and have noticed differences when I run tests via an interactive shell (python or ipython) and when I run the scripts non-interactively.
I was wondering if there is any explanation for the differences I am seeing here?
Specifically, when I interactively run a sim...
I am generating a CSV file which I then open in Excel via OLE Automation. Because of the format of the data, Excel shows many "Inconsistent Formula" warnings (a green icon in corner of each cell). I can turn this off application-wide via automation, using:
objExcel.ErrorCheckingOptions.InconsistentFormula = false
But doing so updates...
I'm working on an Excel add-in and I'm using the Excel COM interface to do automate some testing. So I'll do something like (all through calls to the Excel COM interface):
Create a new Excel instance
Load my XLL add-in
Create a workbook
Set some worksheet formulae
Check that I get the expected results
Now I want to test that my add-...
I am getting this stacktrace:
System.Runtime.InteropServices.COMException (0x800A13E9): Word ðú÷ì ááòéä.
at Microsoft.Office.Interop.Word.Documents.Add(Object& Template, Object& NewTemplate, Object& DocumentType, Object& Visible)
at Crm.DocumentGeneration.Printing.DocumentsPrinter.MergeDocuments(ApplicationClass& wordApp, IEnume...
I have a native C++ ATL in-proc COM server. A separate test program
calls CoInitialize(),
calls CoCreateInstance(), then
calls Release() on the pointer,
then calls CoUnitialize() and exits.
If I run the test program under Visual C++ debugger the debug CRT reports a single memory leak and each time the allocation number is the same.
...
Hi All,
Exising .net 2 app migrated to .net 4 and moved to an IIS7 Windows 2008 R2 server.
We used to be able to run some code on the web page to export some stuff to excel.
Now, when we do... we get the following error:
The machine-default permission settings do not grant Local Activation permission for the COM Server application wi...
The following code sample worked just fine in Excel 2007, but when I installed Excel 2010 (32bit) it would leave the excel.exe process open unless I added the GC.Collect(). My simple question is am I doing something wrong? It looks like to me like I am releasing everything I use.
public override void Update()
{
StatusBo...
I was convinced that there is no way to find COM dependencies of an ActiveX but to my surprise OLEVIEW shows some comments Like:
// TLib : // TLib : OLE Automation : {00020430-0000-0000-C000-000000000046}
importlib("stdole2.tlb");
// TLib : Visual Basic runtime objects and procedures : {EA544A21-C82D-11D1-A3E4-00A0C90AEA82}
...
I am trying to access open IE instance from my desktop application.
Code is
IHTMLDocument2 *pDoc;
LRESULT lr;
HRESULT hr;
if ( SendMessageTimeout( hwndChild, uMsg, 0L, 0L, SMTO_ABORTIFHUNG, 1000, (DWORD_PTR *) &lr ) )
{
hr = ObjectFromLresult( lr, IID_IHTMLDocument2, 0, (void**)&pDoc );
if ( SUCCEEDED( hr ) )
{
IWebBrowser2 *...
I am contemplating building an out of browser Silverlight application. One of the reasons it has to be OOB is because I need to access an old school ActiveX/COM object and that is only allowed OOB.
I am having trouble finding any examples on how to actually integrate a COM object into a Silverlight app. The Add References dialog does...
I have an add-in for MS Word. One of my users, who is on Word 2007, reports that the add-in is not being loaded. When she checks the COM add-ins list, it says "Load Behavior" is "Unloaded; Load at Startup" (value of 2 in LoadBehavior registry entry).
Yet when she checks the add-in's registry entry, LoadBehavior is set to 3 (Loaded; Load...
Hi Folks,
I have a COM Outlook addin which implements a ribbon button in Outlook 2010. It's been working just fine for quite some time. Until someone tried to load the addin in the Korean version of Outlook. The ribbon buttons show up but do not do anything when clicked. In the debugger, I see the error message below whenever I click on...
I am using the default DllSurrogate to enable automation of a 32bit COM object in 64bit. This works perfectly in Windows7 64 bit and Windows Server 2008 R2. However; regular flavor Windows Server 2008 (pre R2) completely ignores the DllSurrogate entry in the registry. I've researched this for days and found documentation that classic ...
I'm working on a web page to add/remove IP Addresses to the IIS IPGranted List for a website.
I'm finding I can connect and accurately return a list of all of the Allowed IP Addresses from IIS.
However, if I try to edit it, on CommitChanges() I'm finding that the com object is returning a HRESULT:0x800700B7 (Meaning it can't create a f...
Hello,
I need to develop some classes that should be callable from VB6 with Managed C++ (C++/CLI).
I've developed first a sample in C# and I can use the assembly through COM without problems
just using the setting "Register for COM interop" and "Make assembly COM visible" (and using the attribute [ClassInterface(ClassInterfaceType.Aut...
I am writing an external Python/comtypes script (in PythonWin) that needs to get a reference to the current ArcGIS 10.0 ArcMap session (through the ArcObjects COM). Because the script is outside the application boundary, I am getting the application reference through the AppROT (running object table). The first code snippet below is the...
Are the available Java-COM bridges like j-Integra, com4j and Jacob and others suitable to be used in a J2EE container? Which one is the most appropriate for that use? I need to evaluate the risk of JVM crashes, native memory leak and unmanaged thread creation (since it's not recommended in a J2EE container that uses thread pools) for the...
I have a Silverlight app that needs low-level socket support. It's an Out-of-Browser Trusted app, so it has more network permissions. But, I noticed that that Silverlight only supports limited TCP sockets, even with elevated permissions. The method "SetSocketOption" has been removed too. I didn't think that was too big of deal as I knew ...
Greetings!
I've got a registered ActiveX component which I'm referencing in a C# project. However, I'd like to know the original path to the actual component being run. This is not the execution path per se. Is there something saner than searching the registry by hand?
The component is registered with a simple /regserver command, if th...