com

How can I call System.Runtime.InteropServices.Marshal.ReleaseComObject from within an Excel 2007 VBA module

六月ゝ 毕业季﹏ 提交于 2019-12-13 19:11:27
问题 I want to call System.Runtime.InteropServices.Marshal.ReleaseComObject(obj) on some 3rd party COM objects that I've instantiated in my VBA code, from my workbook close event, something like the following: Public Sub disconnect(obj As Variant) Dim refs As Long refs = 0 If Not obj Is Nothing Then Do refs = System.Runtime.InteropServices.Marshal.ReleaseComObject(obj) Loop While (refs > 0) End If End Sub However, I get a compile error: invalid qualifier with the System highlighted with the above

Win32com codes not working on IIS

浪子不回头ぞ 提交于 2019-12-13 18:57:40
问题 I am trying to deploy a Python app on IIS webserver whenever there is a code that uses win32com objects is encoutered, it throws error, but the code is working fine on Python built-in webserver Here is the code: xlapp = win32com.client.Dispatch(r"Excel.Application") and here is the error: xlapp undefined, global win32com = <module 'win32com' from 'C:\Python27\lib\site-packages\win32com\__init__.pyc'>, win32com.client = <module 'win32com.client' from 'C:\Python27\lib\site-packages\win32com

DirectWrite RegisterFontFileLoader :create a font file loader and register it in Delphi without access violation

為{幸葍}努か 提交于 2019-12-13 18:40:07
问题 I am trying to register a DirectWrite (Windows 7, Windows 8) API based font file loader, and recreate in Delphi, the CustomFont demo from the Windows 7 SDK that shows how to use DirectWrite APIs with a custom font collection. This allows DirectWrite to use fonts you loaded yourself from inside your application resources that are not globally registered in the Windows font system. I am stuck with an access violation. A minimal sample is below. First a doubt I have about the Delphi Direct2D

VB: get compiled DLL's calling application info; COM security

蹲街弑〆低调 提交于 2019-12-13 18:20:03
问题 Through COM, one can potentially gain absolute control over a target system. For example: using javascript's ActiveXObject object in IE, one can create certain objects which were designed to have direct access or interaction with system properties and files. One would think common sense dictates users disable ActiveX features in IE immediately after installing the browser to ensure their system is protected while surfing the net, or at least paying close attention to which websites they

Python COM server throws 'module' object has no attribute 'VARIANT'

主宰稳场 提交于 2019-12-13 17:54:57
问题 Here is a COM server implemented in Python: from win32com.server.exception import COMException import pythoncom import sys import os from string import Template import logging import logging.config class Connector: _reg_clsctx_ = pythoncom.CLSCTX_LOCAL_SERVER _reg_clsid_ = "{0CE25AEB-1AFA-4DA7-97BD-F93CDBFB376C}" _reg_desc_ = "Python Test COM Server" _reg_progid_ = "Compy.Connect" _public_methods_ = ['Process', 'Status'] _public_attrs_ = [] _readonly_attrs_ = [] def Process(self, what): pass

Python 64 bit DLL COM Server Registration Problem on 64 bit Windows 7

五迷三道 提交于 2019-12-13 17:44:44
问题 I am trying to create a simple COM server using Python 2.7 on 64 bit Windows 7, but I can't get the DLL registered successfully. I am able to do this successfully using Python 2.6 on 32 bit Windows XP. I am also able to register my class directly from Python. This is my module, heikki.py, based on the pywin32 COM tutorial: class Heikki: _reg_clsid_ = '{F4C7D945-BF6B-4BF8-BCBB-EA021FCCE623}' _reg_desc_ = "Heikki" _reg_progid_ = "Heikki.TestServer" _public_methods_ = ['Hello'] def __init__(self

How to correctly install Workflow Agents in Kofax?

爷,独闯天下 提交于 2019-12-13 17:21:28
问题 I'm working with Kofax Capture Workflow Agents. I have installed some WFAs before, but they didn't run on first try and I'm not really sure what I've done to get them working. Currently, I follow these steps to install my WFA: Compile my Source-Files to one DLL Remove Workflow Agent from Batch Classes Uninstall Workflow Agent over Tools > Workflow Agents Copy over to my Test-Environment Install Workflow Agent over Tools > Workflow Agents Add Workflow Agents to Batch Classes Publish Batches

what's the difference between an activex control and an activex object?

99封情书 提交于 2019-12-13 17:09:23
问题 "ActiveX controls — small program building blocks — can serve to create distributed applications that work over the Internet through web browsers. Examples include customized applications for gathering data, viewing certain kinds of files, and displaying animation." (wikipedia) is an Object an instance of a Control? 回答1: The MS terminology is unclear, especially since ActiveX is more a marketing term than a technical one. Often, "ActiveX" can be replaced with "COM" to give a more technically

usage differences between _variant_t, COleVariant, CComVariant, and VARIANT and using SAFEARRAY variations

旧巷老猫 提交于 2019-12-13 17:08:34
问题 I am investigating several Visual Studio 2015 C++ project types which use ADO to access an SQL Server database. The simple example performs a select against a table, reads in the rows, updates each row, and updates the table. The MFC version works fine. The Windows console version is where I am having a problem updating the rows in the recordset. The update() method of the recordset is throwing a COM exception with the error text of: L"Item cannot be found in the collection corresponding to

Only partial access to a COM Type Library through Python

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-13 16:28:53
问题 I am attempting to write some scripts to employ a COM type library that came with an application to control it externally. However, I am stuck in my use of the Python libraries for COM (pythoncom and win32com): Using a COM Browser, I am able to navigate to find the GUID for the Type Library I am interested in using. Using pythoncom, I am able to easily navigate this type library to see what objects are available available. >>> import win32com.client >>> import pythoncom >>> type_lib_iid = '