[python-win32] What does pythoncom interface look like?
Tim Roberts
timr at probo.com
Mon Jan 9 14:14:17 EST 2017
Kurt Eilander wrote:
> I'm trying to create a win32com server that implements a standard
> interface (IExtractImage)
>
> I've added the iid to _com_interfaces_ and the method names to
> _public_methods_, but now I'm at a complete loss how to implement them.
>
> For instance, given the method,
> HRESULT IExtractImage::GetLocation(
> [out] LPWSTR pszPathBuffer,
> [in] DWORD cchMax,
> [out] DWORD *pdwPriority,
> [in] const SIZE *prgSize,
> [in] DWORD dwRecClrDepth,
> [in, out] DWORD *pdwFlags
> );
>
> How in the world is that supposed to look as a python method??
>
> (Or is there some c++ or other glue I'd need to write to define that?)
You have four input parameters and three output parameters. You will
have something like:
def GetLocation( cchMax, prgSize, dwRecClrDepth, dwFlags ):
# ...
return (S_OK, path, priority, dwFlags)
Much experimentation will be required.
--
Tim Roberts, timr at probo.com
Providenza & Boekelheide, Inc.
More information about the python-win32
mailing list