Hi Mark,<br><br> After much more testing here is some more to go on:<br><br>Background again:<br>- I have a VisualBasic-generated ActiveX COM object called capiCrypto.clsCrypto<br>- I call it like this <br> clsCrypto = win32com.client.Dispatch("capiCrypto.clsCrypto")<br>
clsCrypto.InStringBuffer = newCert<br> clsCrypto.CRLFileName = self.Request.FqdnCRL<br> result = clsCrypto.CheckCertBufferAgainstCRLFile()<br>- it was generated on WinXP SP2<br>- It can successfully be called from Python 2.3 win32-208 without problem<br>
- As soon as I upgrade to Python 2.7 I get this stack trace without touching the dll or its registration<br>2012/05/19 10:18:12 INFO Traceback (most recent call last):<br> File "cherrypy\_cphttptools.pyo", line 271, in run<br>
File "cherrypy\_cphttptools.pyo", line 502, in main<br> File "checkcertcrld.pyw", line 113, in crlHandler<br> File "CrlDispatch.pyo", line 121, in handle<br> File "CheckCertCrl.pyo", line 38, in execute<br>
File "<COMObject capiCrypto.clsCrypto>", line 3, in CheckCertBufferAgainstCRLFile<br>com_error: (-2147417851, 'The server threw an exception.', None, None)<br><br>Now here is some strange feedback . . .<br>
- Knowing that everything was OK with Python 2.3, I isolated the above code in its own HTTP process and py2exe'ed it thinking py2exe would preserve the whole 2.3 call environment<br>- My thought was I would call the HTTP daemon which was packaged with 2.3 and 208 from my 2.7 environment both in their own py2exe-created exe's one in 2.7 the other in 2.3<br>
- So check this, the very first call to the dll in the 2.3 exe from the 2.7 exe worked !!! Then all successive calls failed ????<br>- here is the log:<br><br>2012/05/19 08:53:28 INFO CheckCertCRL completed with TransactionStatus ===> 1763 and TransactionStatusString ==> Certificate Revocation Check failed Current time is NOT within the CRL validity period<br>
<br>2012/05/19 10:18:12 HTTP INFO 127.0.0.1 - POST /crlHandler HTTP/1.1<br>2012/05/19 10:18:12 INFO Traceback (most recent call last):<br> File "cherrypy\_cphttptools.pyo", line 271, in run<br> File "cherrypy\_cphttptools.pyo", line 502, in main<br>
File "checkcertcrld.pyw", line 113, in crlHandler<br> File "CrlDispatch.pyo", line 121, in handle<br> File "CheckCertCrl.pyo", line 38, in execute<br> File "<COMObject capiCrypto.clsCrypto>", line 3, in CheckCertBufferAgainstCRLFile<br>
com_error: (-2147417851, 'The server threw an exception.', None, None)<br><br>- Note the first call which successfully checked the revocation status of a certificate and returned a 1763 indicating a successful call to the COM dll (although the cert check failed)<br>
- Every subsequent time I called the dll it fails ???<br>- Something happened in the environment after the first call and I have no clue ???<br><br>Ed<br><br><br><div class="gmail_quote">On Mon, May 14, 2012 at 8:50 AM, Mark Hammond <span dir="ltr"><<a href="mailto:mhammond@skippinet.com.au" target="_blank">mhammond@skippinet.com.au</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">[re-adding python-win32 - please keep replies on list]<div class="im"><br>
<br>
On 14/05/2012 10:39 PM, EdShallow wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi Mark,<br>
<br>
Python 2.3 with pywin32-208 works. The error I receive reads<br>
"Object through and exception at line 3".<br>
</blockquote>
<br></div>
How do you get that error? You say "my dll throws an exception immediately upon entry" - I can't reconcile that "with the error I receive". What does Python do when calling your failing DLL? (ie, do you get a traceback? If so, please include it completely. If not, what result does Python get? I'm still very unclear on the context of your problem.<div class="im">
<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Un-registering and re-registering the dll does not help.<br>
</blockquote>
<br></div>
But that's just unregistering and re-registering your DLL right?<div class="im"><br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
The test was conducted on the same machine after uninstalling<br>
Python and re-installing numerous combinations of Python 2.4, 2.5, 2.6,<br>
2.7 with associated pywin32-208 thry pywin32-214.<br>
<br>
If I uninstall the newer Python and re-install Python 2.3 and<br>
pywin32-208 all is OK again. It is definitely environmental as opposed<br>
to the code.<br>
</blockquote>
<br></div>
Well - it's *someone's* code :) To be clear, 2.3 + pywin32 209 fails?<br>
<br>
Mark<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">
<br>
Thanks,<br>
Ed<br>
<br>
On Sun, May 13, 2012 at 9:07 PM, Mark Hammond <<a href="mailto:skippy.hammond@gmail.com" target="_blank">skippy.hammond@gmail.com</a><br></div><div class="im">
<mailto:<a href="mailto:skippy.hammond@gmail.com" target="_blank">skippy.hammond@gmail.<u></u>com</a>>> wrote:<br>
<br>
You haven't given us enough information to help. What error do you<br>
see? What is the most recent combination of Python and pywin32 that<br>
works?<br>
<br>
Mark<br>
<br>
<br>
On 12/05/2012 10:31 PM, EdShallow wrote:<br>
<br>
Hi Folks,<br>
<br>
I have an ActiveX COM dll generated by VisualBasic 6 in<br>
WinXP. I<br>
can call it and use it successfully with Python 2.3 and pywin32-208<br>
without problems.<br>
<br>
As soon as I upgrade either pywin32- or Python to anything<br>
itself<br>
to anything newer, my dll throws an exception immediately upon<br>
entry.<br>
<br>
Can anyone point me in a general direction with respect to<br>
addressing this incompatibility?<br>
<br>
Thanks,<br>
Ed<br>
<br>
--<br>
Ed's Contact Information:<br></div>
Mobile Phone: <a href="tel:613-852-6410" value="+16138526410" target="_blank">613-852-6410</a> <tel:<a href="tel:613-852-6410" value="+16138526410" target="_blank">613-852-6410</a>><br>
Gmail: <a href="mailto:ed.shallow@gmail.com" target="_blank">ed.shallow@gmail.com</a> <mailto:<a href="mailto:ed.shallow@gmail.com" target="_blank">ed.shallow@gmail.com</a>><br>
<mailto:<a href="mailto:ed.shallow@gmail.com" target="_blank">ed.shallow@gmail.com</a> <mailto:<a href="mailto:ed.shallow@gmail.com" target="_blank">ed.shallow@gmail.com</a>>><br>
VOIP Address: <a href="mailto:107529@sip.ca1.voip.ms" target="_blank">107529@sip.ca1.voip.ms</a><br>
<mailto:<a href="mailto:107529@sip.ca1.voip.ms" target="_blank">107529@sip.ca1.voip.ms</a><u></u>> <mailto:<a href="mailto:107529@sip.ca1.voip.ms" target="_blank">107529@sip.ca1.voip.ms</a><br>
<mailto:<a href="mailto:107529@sip.ca1.voip.ms" target="_blank">107529@sip.ca1.voip.ms</a><u></u>>__><br>
<br>
VOIP DID#: <a href="tel:613-458-5004" value="+16134585004" target="_blank">613-458-5004</a> <tel:<a href="tel:613-458-5004" value="+16134585004" target="_blank">613-458-5004</a>><br>
Skype ID: edward.shallow<br>
Home Phone: <a href="tel:613-482-2090" value="+16134822090" target="_blank">613-482-2090</a> <tel:<a href="tel:613-482-2090" value="+16134822090" target="_blank">613-482-2090</a>><br>
<br>
<br>
<br>
______________________________<u></u>___________________<br>
python-win32 mailing list<br>
<a href="mailto:python-win32@python.org" target="_blank">python-win32@python.org</a> <mailto:<a href="mailto:python-win32@python.org" target="_blank">python-win32@python.<u></u>org</a>><br>
<a href="http://mail.python.org/__mailman/listinfo/python-win32" target="_blank">http://mail.python.org/__<u></u>mailman/listinfo/python-win32</a><div class="im"><br>
<<a href="http://mail.python.org/mailman/listinfo/python-win32" target="_blank">http://mail.python.org/<u></u>mailman/listinfo/python-win32</a>><br>
<br>
<br>
<br>
<br>
<br>
<br>
--<br>
Ed's Contact Information:<br>
Mobile Phone: <a href="tel:613-852-6410" value="+16138526410" target="_blank">613-852-6410</a><br></div><div class="im">
Gmail: <a href="mailto:ed.shallow@gmail.com" target="_blank">ed.shallow@gmail.com</a> <mailto:<a href="mailto:ed.shallow@gmail.com" target="_blank">ed.shallow@gmail.com</a>><br>
VOIP Address: <a href="mailto:107529@sip.ca1.voip.ms" target="_blank">107529@sip.ca1.voip.ms</a> <mailto:<a href="mailto:107529@sip.ca1.voip.ms" target="_blank">107529@sip.ca1.voip.ms</a><u></u>><br>
VOIP DID#: <a href="tel:613-458-5004" value="+16134585004" target="_blank">613-458-5004</a><br>
Skype ID: edward.shallow<br>
Home Phone: <a href="tel:613-482-2090" value="+16134822090" target="_blank">613-482-2090</a><br>
<br>
</div></blockquote>
<br>
<br>
</blockquote></div><br><br clear="all"><br>-- <br>Ed's Contact Information:<br>Mobile Phone: 613-852-6410<br>Gmail: <a href="mailto:ed.shallow@gmail.com">ed.shallow@gmail.com</a><br>VOIP Address: <a href="mailto:107529@sip.ca1.voip.ms">107529@sip.ca1.voip.ms</a><br>
VOIP DID#: 613-458-5004<br>Skype ID: edward.shallow<br>Home Phone: 613-482-2090<br><br>