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 >> python-win32
python-win32
[python-win32] Extending Vista/Windows7 with Python
by Stormy other posts by this author
Nov 5 2009 2:29AM messages near this date
Re: [python-win32] Get DN of Computer (OU Located) | Re: [python-win32] Extending Vista/Windows7 with Python
Hello.

I am trying to implement IPropertyStore in a python component, and run 
into a few problems.

HRESULT GetValue(
    REFPROPERTYKEY /key/,
    PROPVARIANT */pv/
);

The GetValue method passes a pointer in the form of an integer to python 
instead of a key.
And secondly the return value never makes it back to windows either.

I am wondering what I have to do to make this work properly, which 
changes to make and where.

Excerpt from my component being called by windows:
"""
__init__
Initialize
GetValue: <type 'long'> , 134344568
__del__
"""

IPropertyStore: 
http://msdn.microsoft.com/en-us/library/bb761474(VS.85).aspx 
<http://msdn.microsoft.com/en-us/library/bb761474%28VS.85%29.aspx> 

=============================================================

A little history.

I decided to expand my knowledge of python and windows programming alike 
by starting to construct a shell plugin for explorer on a Windows Vista 
64 system. After a while however I found that parts of pywin32 are not 
very accomodating for this task.

The first problem I ran into was that code did not get called at all 
with a 64 bit explorer, so I built pywin32 from source to try and debug 
this.

Turns out that a vital part was missing from pywin32, the make_method 
for 64 bit systems in univgw.cpp to be exact.
After a short while of trying other things I returned to this and 
compiled the mockup function only to have the compiler complain about
the function definition, va_start and so on, after adding the elipsis to 
the function arguments the mockup compiled, I proceeded to read back the 
bytes
from the compiled function, and construct a 64 bit version of the 
make_method.
It may well need checking, but it does seem to work, as windows calls my 
code, and no noticable errors occur.
Thread:
Stormy
Tim Roberts
Stormy
Stormy

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