Re: [python-win32] win32evtlog - Event Log parsing issue

2012-05-03 Thread Roger Upole
Mark is right, the handles are not interchangable between the older event log functions and the newer Evt* functions. You can still use the older APIs on Vista and later, though. OpenEventLog returns a handle compatible with ReadEventLog. To use the newer functions, try EvtQuery->EvtNext->EvtRend

Re: [python-win32] win32evtlog - Event Log parsing issue

2012-05-03 Thread Tim Keeler
Thanks for the reply, Mark! I took a look and didn't see the EvtGetLogInfo() implemented anywhere in the source. Hopefully Roger will be able to figure out what's going on here. -Tim On Thu, May 3, 2012 at 4:35 PM, Mark Hammond wrote: > I'm afraid I'm not familiar with that API, but the crash i

Re: [python-win32] win32evtlog - Event Log parsing issue

2012-05-03 Thread Mark Hammond
I'm afraid I'm not familiar with that API, but the crash is because EvtOpenLog is returning a handle with a value of 1 and ReadEventLog is crashing with that handle. A quick google doesn't find anyone trying to use ReadEventLog with a handle returned by EvtOpenLog but instead uses EvtGetLogInf

Re: [python-win32] Accessing methods from python-based COM DLL generated using py2exe

2012-05-03 Thread Tim Roberts
Ellis, Alexis -FS wrote: > > > > am trying to generate a DLL from a python script that can be accessed > from a variety other programming platforms. > > I am generating the python-based COM DLL using a distutils setup > script that is called using py2exe. > > The DLL is successfully generated a

[python-win32] win32evtlog - Event Log parsing issue

2012-05-03 Thread Tim Keeler
Hello, I'm having a problem with win32evtlog and reading events from an event log channel on Windows Server 2008 R2. I'm using the following code and get the following error (python.exe APPCRASH no exceptions): #!/usr/bin/python # Windows Event Log Viewer import win32evtlog # requires pywin32 pr

[python-win32] Accessing methods from python-based COM DLL generated using py2exe

2012-05-03 Thread Ellis, Alexis -FS
Hi All, I am trying to generate a DLL from a python script that can be accessed from a variety other programming platforms. I am generating the python-based COM DLL using a distutils setup script that is called using py2exe. The DLL is successfully generated and I can register it using regsv