473,394 Members | 1,715 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

COM connection point

Hello:

I am building a COM client, with the ability to be called back by events.
The events can arrive independently from the server. The client method is
called at the right time, so that is working. However, one parameter is
itself a COM object, and I am having trouble with accessing the properties
of the parameter object.

Here is the output of what I have currently.

---------- Python execute ----------
event! <PyIDispatch at 0x7fb134 with obj at 0x403404>
event! <PyIDispatch at 0x7fbbf4 with obj at 0x403404>
event! <PyIDispatch at 0x7a6d24 with obj at 0x403404>

etc. Obj is supposed to be my intended parameter. However, when I try to
access its property, I get the following:

---------- Python execute ----------
pythoncom error: Python error invoking COM method.

Traceback (most recent call last):
File "C:\PYTHON23\Lib\site-packages\win32com\server\policy.py", line 283,
in _Invoke_
return self._invoke_(dispid, lcid, wFlags, args)
File "C:\PYTHON23\Lib\site-packages\win32com\server\policy.py", line 288,
in _invoke_
return S_OK, -1, self._invokeex_(dispid, lcid, wFlags, args, None, None)
File "C:\PYTHON23\Lib\site-packages\win32com\server\policy.py", line 581,
in _invokeex_
return func(*args)
File "E:\otsl\testprojects_folder\pythoncom\pyclihh2.py ", line 26, in
OnMyEvent
print "event!", obj, obj.AProp
exceptions.AttributeError: 'PyIDispatch' object has no attribute 'AProp'

"QueryInterface" with the target IID gives the following:

exceptions.TypeError: There is no interface object registered that supports
this IID

"CastTo" gives this error:

exceptions.ValueError: This object can not be cast

Thanks a lot,
-OY


Jul 18 '05 #1
0 975

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

Similar topics

3
by: Stephanie | last post by:
I have a problem that I am trying to solve. We have a huge product with a whole lot of ASP and VB code. VB code is all ActiveX dlls which are used by ASP app. When I attempt to add features or fix...
6
by: Mike L. | last post by:
Hi, Pls, beware that I'm new to this :) I've developed several web appl, either with ASP or ASP.NET. All using SQL server as the back end. In my development environment, I have a single...
35
by: Eric Sabine | last post by:
In my Finally block, I was using cn.close (where cn is an ADO.NET connection object, SQLConnection to be exact) and then I came across the following in some microsoft code. If Not cn Is Nothing...
6
by: jonefer | last post by:
I have two versions of a 'Downtime Application that will run in the event that the mainframe goes down 1) SQL Server ASP.NET app (accessed outside the mainframe network) 2) MS Access Version of...
7
by: Mrinal Kamboj | last post by:
Hi , I am using OracleConnection object from Oracle ODP.net provider and following is the behaviour which i am finding bit strange : To start with my argument is based on followings facts : ...
3
by: Fariba | last post by:
Hello All, I have an asp.net application hosting in IIS 6.0 which talks to a database in another DMZ (with firwall installed in between). I know that I can enrypt and decrypt my connection...
14
by: martin1 | last post by:
All, I want to check wether db connection/open or not, if not it will post db connection error to user in message box The code is like: Dim objConnection As New SqlConnection _...
8
by: mark_aok | last post by:
Hi all, I have a split database. Both the forms, and the tables are stored on a shared network drive (this is Access 2003). The users use the forms, and the tables on the network drive, there...
5
by: This | last post by:
I have a pretty basic emailing script that sends a relatively small number (150) of html emails. The emails are compiled, personalised from a mysql db subscribers list, and sent using mail() -...
9
by: =?Utf-8?B?VCBNY0RvbmFsZA==?= | last post by:
I'm having some issues with a dll I've created to return an ADOConnection back to an ASP script. I successfully open my object: mytest = Server.CreateObject("mydll.database") I then attempt to...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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...
0
Oralloy
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,...
0
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...
0
tracyyun
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...

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.