[0.3.x] fixed : issue # 13745 ( the method module.getVersion is missed )

git-svn-id: https://pykd.svn.codeplex.com/svn@90850 9b283d60-5439-405e-af05-b73fd8c4d996
This commit is contained in:
SND\kernelnet_cp 2015-10-19 07:24:08 +00:00 committed by Mikhail I. Izmestev
parent 89006d9608
commit 9512318443
2 changed files with 10 additions and 0 deletions

View File

@ -666,6 +666,8 @@ BOOST_PYTHON_MODULE( pykd )
"Returns a flag that the module is a user-mode module" ) "Returns a flag that the module is a user-mode module" )
.def("queryVersion", ModuleAdapter::getVersionInfo, .def("queryVersion", ModuleAdapter::getVersionInfo,
"Return string from the module's version resources" ) "Return string from the module's version resources" )
.def("getVersion", ModuleAdapter::getVersion,
"Return tuple of the module's file version")
.def("getFixedFileInfo", ModuleAdapter::getFixedFileInfo, .def("getFixedFileInfo", ModuleAdapter::getFixedFileInfo,
"Return FixedFileInfo" ) "Return FixedFileInfo" )
.def("__getattr__", ModuleAdapter::getSymbolVa, .def("__getattr__", ModuleAdapter::getSymbolVa,

View File

@ -147,6 +147,14 @@ struct ModuleAdapter : public kdlib::Module
return module.getVersionInfo(value); return module.getVersionInfo(value);
} }
static python::tuple getVersion(kdlib::Module& module)
{
AutoRestorePyState pystate;
unsigned long a1, a2, a3, a4;
module.getFileVersion(a1, a2, a3, a4);
return python::make_tuple(a1, a2, a3, a4);
}
static FixedFileInfoPtr getFixedFileInfo( kdlib::Module& module ); static FixedFileInfoPtr getFixedFileInfo( kdlib::Module& module );
static std::wstring print( kdlib::Module& module ); static std::wstring print( kdlib::Module& module );