[spambayes-dev] Re: Problem with 1.0a9 Windows installer?
Thomas Heller
theller at python.net
Wed Feb 18 13:04:10 EST 2004
"Tony Meyer" <tameyer at ihug.co.nz> writes:
> [Kenny]
>> OK, I've taken a look and it appears that registering
>> the addin using the outlook_addin_register executable
>> during install does two things differently than
>> registering the addin DLL directly with regsvr32:
>> * outlook_addin_register sets the DLL path in InprocServer32
>> to "pythoncom23.dll", while regsvr32 sets it to
>> "<installation_path>\bin\outlook_addin.dll"
>
> Did you ever figure out what was causing this? I have an Excel plug-in that
> uses the same registration trickery as the Outlook plug-in's addin.py (guess
> where the code came from <wink>), and I ran into this problem today; i.e.
> pythoncom23.dll was the DLL path, rather than my excel_addin.dll. Weirdly,
> it was working before this, and I can't think of what code I changed that
> could effect this.
>
> In any case (and to bring it back to spambayes <wink>), I put a
> "pythoncom.frozen = True" line in after the "sys.frozendllhandle = ..." line
> (at the end of addin.py), and that fixed it. I presume that would fix it
> for you, too. I'm not sure why pythoncom.frozen wasn't already True,
> though, since it was running in a binary (py2exe 0.5.0, win32 200). Maybe
> Mark knows :)
I wasn't aware of the hackery Mark does at the end of the script - use a
frozen exe, pretend it is a frozen dll, to trick win32com.server.register
into registering it as dll server.
>From what I have found in the code, setting pythoncom.frozen = True
seems to be safe. It would be interesting to know the values of
sys.frozen and pythoncom.frozen (if any) before.
I wanted to make a bugfix release of py2exe - although this fixes
different bugs (I assume). If there's a problem with COM registration I
would like to wait until this is resolved.
Thomas
More information about the spambayes-dev
mailing list