ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> ctypes-users
ctypes-users
Re: [ctypes-users] Re: LoadLibrary
by Andre Burgaud other posts by this author
Mar 2 2006 8:04PM messages near this date
[ctypes-users] Re: LoadLibrary | Re: [ctypes-users] Re: LoadLibrary
Hi Thomas, all,

I was using LoadLibrary with CTypes 0.9.6 to access HtmlHelp available in
hhctrl.ocx.

 With CTypes 0.9.6, the code was:
 <CODE> 
hhctrl = windll.LoadLibraryA("hhctrl.ocx")
hhctrl.HtmlHelpA(handle, topic, HH_DISPLAY_TOPIC, None)
</CODE> 

To accommodate the new version (0.9.9.3) and absence of LoadLibrary, I
wrote:
<CODE> 
hhctrl = windll.kernel32.LoadLibraryA("hhctrl.ocx")
htmlhelp_fnc_addr = windll.kernel32.GetProcAddress(hhctrl, 'HtmlHelpA')
...
hwnd = call_function(htmlhelp_fnc_addr, (handle, topic, HH_DISPLAY_TOPIC,
None))
</CODE> 

Would there be a better approach?

To answer your question, I'd be interested to be able to call a method
"load_library" from the library loaders. I'm not especially seeking
backwards compatibility as the project is still pre 1.x.

Thank you for your outstanding work!

Andre
http://www.burgaud.com/


On 2/23/06, Thomas Heller <theller@[...].net>  wrote:

>  Thomas Heller wrote:
>  > Michele Petrazzo wrote:
>  >> Thomas Heller wrote:
>  >>> ctypes 0.9.9.3 released - Feb 15, 2006
>  >>> ======================================
>  >>>
>  >>
>  >> Hello Thomas,
>  >> I see that into the new version, you have brake the compatibility with
>  >> the LoadLibrary for windll and cdll. Why don't make a simple internal
>  >> and transparent link through LoadLibrary and find methods?
>  >> I have to change all my softwares! :(
>  >
>  > Removing the LoadLibrary method on the dll loaders probably was
>  > not a good idea.  Beside Michele complaining about it someone submitted
>  > a bug report that LoadLibrary does not work any longer:
>  >
>  >
>  https://sourceforge.net/tracker/?func=detail&atid=532154&aid=1435103&group_id=71702
>  >
>  >
>  > The problem is that now cdll or windll will try to load a library named
>  > 'LoadLibrary'.
>  > Maybe it would be a good idea to add a method to the library loaders
>  named
>  > 'load_library' and add an alias 'LoadLibrary' for backwards
>  compatibility.
> 
> 
>  No opinions on this issue?
> 
>  Thomas
> 
> 
> 
>  -------------------------------------------------------
>  This SF.Net email is sponsored by xPML, a groundbreaking scripting
>  language
>  that extends applications into web and mobile media. Attend the live
>  webcast
>  and join the prime developer group breaking into this new coding
>  territory!
>  http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
>  _______________________________________________
>  ctypes-users mailing list
>  ctypes-users@[...].net
>  https://lists.sourceforge.net/lists/listinfo/ctypes-users
> 
Attachments:
unknown1
unknown2

Thread:
Thomas Heller
Mike C. Fletcher
Thomas Heller
Michele Petrazzo
Thomas Heller
Thomas Heller
Andre Burgaud
Michele Petrazzo
Shane Holloway
Thomas Heller
Mark McMahon
Thomas Heller

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved