[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
|