[Tutor] How do I use calldll and windll?

spi bleh99@hotmail.com
Wed, 28 Mar 2001 23:13:16 -0500


Here is the result that I got:

>>> dir (windll)
['__builtins__', '__doc__', '__file__', '__name__']
>>>

This is a paste from the description of calldll located at
http://www.nightmare.com/software.html

>With this module you can call any function in any DLL. This means that you
can do just about
>anything on Win32. Includes an (occasionally-resurrected) library that
gives access to lots of the
>system GUI features. I have used this to build stand-alone Windows
applications that are completely
>implemented in Python (including the Message Loop).

>Note: The calldll library has gotten quite large, and has been spun off
into a separate distribution,
>called DynWin. DynWin is now a full-blown Win32 GUI development environment

Dynwin is the distribution that windll is located in. this is a paste of how
they said I should use it

Usage:
To create a dll module object:
>>> kernel32 = windll.module ('kernel32')
>>> kernel32
<win32 module 'kernel32' (0 functions)>
To reference a function:
>>> kernel32.Beep
<callable function "Beep">
To call a function:
>>> kernel32.Beep (1000, 50)

For the life of me I cannot get this to work.. if anyone can help me out on
this
I would greatly appreciate it.

----- Original Message -----
From: "D-Man" <dsh8290@rit.edu>
To: <tutor@python.org>
Sent: Wednesday, March 28, 2001 10:44 PM
Subject: Re: [Tutor] How do I use calldll and windll?


> On Wed, Mar 28, 2001 at 07:11:03PM -0500, spi wrote:
> | I downloaded and installed calldll and dynwin and am able to import
> | successfully
> | but when I try to use an example I get this error:
> |
> | >>> import windll
> | >>> kernel32 = windll.module('kernel32')
> | Traceback (innermost last):
> |   File "<interactive input>", line 1, in ?
> | AttributeError: module
> | >>>
> |
>
> Apparently windll is a valid module (the import succeeded).  Also, it
> apparently doesn't have any attributes name "module" (the error
> message).  Try the following to see what attributes it does have :
>
> import windll
> dir( windll )
>
> Other than that, I don't think I'll be of much help.  I don't know
> what those modules are for either.
>
> -D
>
>
> _______________________________________________
> Tutor maillist  -  Tutor@python.org
> http://mail.python.org/mailman/listinfo/tutor