Hello,
how to get at the function address of a WinFunctionType ctypes object ?
With ctypes 1.0, I used just myfunc._as_para meter_ and all was well.
With ctypes 1.0.1, that ships with python 2.5, WinFunctionType has no
longer an _as_parameter_ attribute
Where in the ChangeLog and the documentation is explained how to deal
with this change ?
Thanks in advance,
Gerard 2 1878 ge********@yaho o.fr schrieb:
Hello,
how to get at the function address of a WinFunctionType ctypes object ?
With ctypes 1.0, I used just myfunc._as_para meter_ and all was well.
With ctypes 1.0.1, that ships with python 2.5, WinFunctionType has no
longer an _as_parameter_ attribute
I think the easiest way is to cast to function to a void pointer and
get the value of that. Something like:
cast(function, c_void_p).value
Where in the ChangeLog and the documentation is explained how to deal
with this change ?
Hm, I considered _as_parameter_ an implementation detail ;-)
Thanks in advance,
Gerard
Thomas
Thomas Heller a écrit :
cast(function, c_void_p).value
Yes, it works. Many thanks !
Gerard This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: achrist |
last post by:
I'm aving some trouble getting callbacks from a Delphi DLL back to
python working through ctypes.
The call from python to the DLL works fine.
In the Delphi(5) code:
type
TCallbackFunc = function(x: Integer): Integer; stdcall;
|
by: zapazap |
last post by:
Dear Snake Charming Gurus,
(Was: http://mail.python.org/pipermail/python-list/2004-January/204454.html)
First, a thank you to Tim Golden, Thomas Heller, and Mark Hammond
for your earlier help with this problem. I am uncertain about what
etiquette calls for, but more on that later.
My Objective:
I am trying to control the _VMWare Desktop_ application
|
by: Thomas Heller |
last post by:
ctypes 0.9.1 released - Sept 14, 2004
=====================================
Overview
ctypes is a ffi (Foreign Function Interface) package for Python
2.3 and higher.
ctypes allows to call functions exposed from dlls/shared libraries
and has extensive facilities to create, access and manipulate
|
by: Thomas Heller |
last post by:
ctypes 0.9.2 released - Oct 28, 2004
====================================
Overview
ctypes is a ffi (Foreign Function Interface) package for Python
2.3 and higher.
ctypes allows to call functions exposed from dlls/shared libraries
and has extensive facilities to create, access and manipulate
|
by: p.lavarre |
last post by:
Subject: Python CTypes translation of (pv != NULL)
And so then the next related Faq is:
Q: How should I test for ((void *) -1)?
A:
(pv == 0xffffFFFF) works often.
| |
by: sjdevnull |
last post by:
Hey,
I'm trying to wrap GNU readline with ctypes (the Python readline
library doesn't support the callback interface), but I can't figure out
how to set values to a variable inside the library. This is Python 2.5
on Linux. Here's what I have so far--if you comment out the memmove
call (3 lines) it works as expected:
# START
#!/usr/local/bin/python2.5
|
by: Jacob Rael |
last post by:
Hello,
I was following along with this site:
http://www.brunningonline.net/simon/blog/archives/000659.html
and I got a error. It boils down to:
====================
|
by: moreati |
last post by:
Recently I discovered the re module doesn't support POSIX character
classes:
Python 2.5.2 (r252:60911, Apr 21 2008, 11:12:42)
on linux2
Type "help", "copyright", "credits" or "license" for more information.
None
So I thought I'd try out pcre through ctypes, to recreate pcredemo.c
in python. The c code is at:
|
by: Egor Zindy |
last post by:
Egor Zindy wrote:
#!/usr/bin/env python
"""
A generic chipid library based on ctypes
This module handles most of the functions in FTChipID.dll
|
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: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
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: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
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...
| | |