def Register(pyclass=DCLoad): from win32com.server.register import UseCommandLine UseCommandLine(pyclass)
def Register(pyclass=Controller, p_game=None): """ Registration code for the Visual Pinball COM interface for pyprocgame.""" pythoncom.CoInitialize() from win32com.server.register import UseCommandLine UseCommandLine(pyclass)
def Register(): from win32com.server.register import UseCommandLine return UseCommandLine(DictionaryPolicy)
class Stemmer : _reg_clsid_ = "{B306454A-CAE6-4A74-ACAD-0BB11EF256DD}" _reg_desc_ = "LangTech Stemmer Product" _reg_progid_ = "LangTech.Stemmer.Product" _public_methods_ = [ 'stemWord' ] def stemWord ( self, word ) : # extremely simple stemming: if the word ends in 's' then drop the 's' if word [ -1 ] == "s": return word [ : -1 ] else: return word if __name__ == '__main__' : UseCommandLine ( StemmerFactory ) UseCommandLine ( Stemmer ) #---------------------------------------- # # C++ #include <comdef.h> #include <initguid.h> DEFINE_GUID(CLSID_StemmerFactory, 0x602D10EB, 0x426C, 0x4D6F, 0xA4, 0xDF, 0xC0, 0x55, 0x72, 0xEB, 0x78, 0x0B); DISPID rgDispId ; OLECHAR * rgszNames [ ] = { OLESTR ( "new" ) }; DISPPARAMS DispParams;