[python-win32] RE: DLL communications

Larry Bates lbates at syscononline.com
Thu Jun 19 12:26:11 EDT 2003


Anthony,

I developed a general class for communicating with Windows
.DLLs and have used it quite extensively myself.  It is
a wrapper around Sam Rushing's calldll.  It seems to work
for me.  It is available at:

http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/146847

Looks like others have also successfully used this:

this has also been included in toolkit used
to communicate with ArcView .DLLs at:

http://www.hobu.biz/software/calldll

Hope information helps.

Regards, Larry

-----Original Message-----
From: python-win32-bounces at python.org
[mailto:python-win32-bounces at python.org]On Behalf Of
python-win32-request at python.org
Sent: Thursday, June 19, 2003 11:03 AM
To: python-win32 at python.org
Subject: Python-win32 Digest, Vol 3, Issue 11


Send Python-win32 mailing list submissions to
	python-win32 at python.org

To subscribe or unsubscribe via the World Wide Web, visit
	http://mail.python.org/mailman/listinfo/python-win32
or, via email, send a message with subject or body 'help' to
	python-win32-request at python.org

You can reach the person managing the list at
	python-win32-owner at python.org

When replying, please edit your Subject line so it is more specific
than "Re: Contents of Python-win32 digest..."


Today's Topics:

   1. WIN32 GLOBAL HOOKS (Anthony Catalfo)
   2. Dll (Anthony Catalfo)
   3. Re: Dll (Magnus Lyck?)


----------------------------------------------------------------------

Message: 1
Date: Thu, 19 Jun 2003 03:29:52 -0700 (PDT)
From: Anthony Catalfo <apc1964 at yahoo.com>
Subject: [python-win32] WIN32 GLOBAL HOOKS
To: python-win32 at python.org
Message-ID: <20030619102952.13660.qmail at web21414.mail.yahoo.com>
Content-Type: text/plain; charset=us-ascii

Can a python script use win32 global hooks ? If so
could someone post an example ?

Thanks
Anthony

__________________________________
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com


------------------------------

Message: 2
Date: Thu, 19 Jun 2003 03:33:14 -0700 (PDT)
From: Anthony Catalfo <apc1964 at yahoo.com>
Subject: [python-win32] Dll
To: python-win32 at python.org
Message-ID: <20030619103314.24994.qmail at web21405.mail.yahoo.com>
Content-Type: text/plain; charset=us-ascii

Can a Dll comunicate with a python script? ie change a
variable in the script? If so could you post code
showing how ?

Thanks
Anthony



__________________________________
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com


------------------------------

Message: 3
Date: Thu, 19 Jun 2003 13:32:58 +0200
From: Magnus Lyck? <magnus at thinkware.se>
Subject: Re: [python-win32] Dll
To: Anthony Catalfo <apc1964 at yahoo.com>, python-win32 at python.org
Message-ID: <5.2.1.1.0.20030619125916.01ff7030 at www.thinkware.se>
Content-Type: text/plain; charset="us-ascii"; format=flowed

At 03:33 2003-06-19 -0700, Anthony Catalfo wrote:
>Can a Dll comunicate with a python script? ie change a
>variable in the script?

Nothing external can really change a variable in an
independently running Python script at its own bidding.
Not in a nice way at least! :) The Python script can ask
a DLL about a value, or a DLL can run a Python script,
and thus control it.

The best way to access a DLL from Python may be to use
the ctypes library. I'm sure you can find that with google.

For a DLL to access Python code, I suppose you need
to embed the Python interpreter in the DLL. That is
described in the Python manuals. (Embedding and Extending)

I'm still a little puzzled over your formulation though.
Can you explain a little more what it is you want to do?


--
Magnus Lycka (It's really Lyck&aring;), magnus at thinkware.se
Thinkware AB, Sweden, www.thinkware.se
I code Python ~ The Agile Programming Language 



------------------------------

_______________________________________________
Python-win32 mailing list
Python-win32 at python.org
http://mail.python.org/mailman/listinfo/python-win32


End of Python-win32 Digest, Vol 3, Issue 11
*******************************************




More information about the Python-win32 mailing list