Re: ctypes.windll.kernel32.GetProcAddress returns address of 0
Thomas Heller <[email protected]> Mon, 16 Jun 2014 09:17:29 +0200
| Newsgroups | gmane.comp.python.ctypes |
|---|---|
| Message-ID | <[email protected]> |
Am 14.06.2014 14:41, schrieb Jason Marshall: > Hello ctypes-users, > > I am a novice at ctypes and C. I am trying to get the addresses of some > methods in ddraw.dll (obsolete, I know) so that I may use them with > pygame. When I run the script below to get the methods' addresses, > ctypes.windll.kernel32.GetProcAddress gives me addresses of 0. Can you > see something that I'm doing wrong? The Microsoft documentation is misleading; GetMonitorFrequeny and GetScanLine are not *functions* exposed by the directdraw library. Instead they are methods exposed of the IDirectDraw COM object. You cannot access this stuff with stock ctypes. If you are able to find a typelibary for directdraw then maybe you can do it with comtypes. Thomas ------------------------------------------------------------------------------ HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions Find What Matters Most in Your Big Data with HPCC Systems Open Source. Fast. Scalable. Simple. Ideal for Dirty Data. Leverages Graph Analysis for Fast Processing & Easy Data Exploration http://p.sf.net/sfu/hpccsystems