473,695 Members | 2,313 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Pythoncom early binding puzzle

I want my Python COM object to do early binding. I have this working
for methods that return floats and dates and variants, but not for
methods that return COM objects. They are returning IDispatch objects
and not the specific COM objects that the client code is expecting.

I've got to the point that makepy reads my type library and generates
this class:

class IArena_MarketDa taServer_Curren ciesData(Dispat chBaseClass):
#This class is creatable by the name
'Arena_MarketDa taServer_Curren ciesData.189'
CLSID = IID('{E15E5C42-1B3F-4815-B434-FA9BBAB5B62E}')
coclass_clsid = IID('{FD32DD22-3A89-430E-8FB9-EDC35852721A}')

... (method definition here) ...

_prop_map_get_ = {}
_prop_map_put_ = {}

But I still seem to get an IDispatch object, whether I do late
currenciesData = win32com.client .Dispatch('Aren a_MarketDataSer ver_CurrenciesD ata') currenciesData <COMObject Arena_MarketDat aServer_Currenc iesData>

or try to force early binding:
gencache.Ensure Module('{2A4EEE BF-907A-4038-A7DA-FE299AB491B1}', 0, 1, 8)
<module 'win32com.gen_p y.2A4EEEBF (etc)' from
'(path)\2A4EEEB F...x0x1x8.py'> currenciesData = win32com.client .Dispatch('Aren a_MarketDataSer ver_CurrenciesD ata') currenciesData

<COMObject Arena_MarketDat aServer_Currenc iesData>

The second time, it should be something like
<win32com.gen_p y.Arena_MarketD ataServer 1.8(.9) Type
Library.Arena_M arketDataServer _CurrenciesData >

I've checked the GUIDs, they are ok. Any suggestions on what error
this symptom indicates?
Jul 18 '05 #1
0 1473

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

by: J Overholt | last post by:
I have a COM object I am using and I am having some problems setting a property, I get an "PropPut() failed: Member not found". The property I am setting is another COM object. Here's is the sample code: $m = new COM("comobj.obj"); $x = $m->Extent; $x->Inflate(.5,.5); $m->Extent = $x; // get error here
by: Paul | last post by:
Hi I'm trying to build a standalone COM exe server using Python 2.2 + Mark Hammond's windows extensions + Py2Exe. I've built the example linked on the Py2Exe homepage and get this error when running the exe: I:\Program Files\Python22\dist\comtest>comtest --register Traceback (most recent call last): File "<string>", line 37, in ? File "win32com\server\register.pyc", line 468, in UseCommandLine
by: Mystery Man | last post by:
We are developing a C# application that has many interfaces to the Microsoft suite (eg Word, Excel, Outlook, Powerpoint, etc). We need to support Office 97, 2000, 2002 and any future versions. Our first cut used early binding and worked fine with Office 2002. We then ran on a machine that had Office 2000 installed and it all turned to custard. There appears to be a number of options to take to support multiple versions:
by: Martin Eyles | last post by:
I have just turned on option strict in ASP/VB.net. I started by happily going through and setting up all of the Dim statements with As clauses, and making my cast explicit. However, I have now got stuck on "late binding". After reading that early binding is faster, I think that it would be best to make everything early binding, but I can't work out how. have but a sample of my database code below. Can anyone tell me how to fix it? ...
by: Roland | last post by:
Hello, I'm trying to use Sparx Systems Enterprise Architect OLE automation interface. There is no problem to get early binding interface using Microsoft Visual Basic. But using win32com makepy utility there problem is. Does anybody have an idea, what may disqualify python win32com from creating early binding interface?
by: ManningFan | last post by:
I need to use late binding in a project because it's company standard to not include references which aren't MS defaults, so I can't add the scripting runtime. I need to be able to search folders (and sub-forders) for a file name, and then copy the file to a specified directory (at the moment it's C:\TempCD but that will change later. All I have so far is the following, I believe my main issue to tackle is to figure out how to get to...
by: kogrover | last post by:
ISSUE: COM Excel Sort works with Early Binding, but not Late Binding, but py2exe only does Late Binding I have code similar to this (type from notes, so there may be a typo...) import win32com.client xl = win32com.client.Dispatch("Excel.Application") xl.Visible = False xl.ScreenUpdating = False
by: ADezii | last post by:
The process of verifying that an Object exists and that a specified Property or Method is valid is called Binding. There are two times when this verification process can take place: during compile time (Early Binding) or run time (Late Binding). When you declare an Object Variable as a specific Data Type, you are using Early Binding so the verification can take place during compile time. When you declare a Variable of the generic Object Data...
by: gcmartijn | last post by:
H! I using a script that opens a internet page in a small window (what I can control) In XP everything was working fine, but now I'm using Vista with IE7 and this is what happends now: First a small window opens at the postion x0 y0 (like I want) but then IE thinks "Hey lets open a other main window too". And that window opens the url 'http://www.google.nl'
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, weíll explore What is ONU, What Is Router, ONU & Routerís main usage, and What is the difference between ONU and Router. Letís take a closer look ! Part I. Meaning of...
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.