John, Ivan, thanks for your help. The array seems big enough - 100000 bytes, when processing a 64kb file.
SetLastError=true was very helpful - I am getting back error 87 - ERROR_INVALID_PARAMETER - so now just need to find out which paramter is invalid. On Tue, 26 Apr 2005 22:04:55 +1200, Ivan Towlson <[EMAIL PROTECTED]> wrote: >Related to John's questions, consider calling Marshal.GetLastWin32Error to >find out more about why the ReadEventLog call is failing (don't forget to >set SetLastError=true in the DllImportAttribute). > >-- >manaaki whenua | manaaki tangata | haere whakamua >http://hestia.typepad.com/flatlander | mailto:[EMAIL PROTECTED] > > >-----Original Message----- >From: Unmoderated discussion of advanced .NET topics. >[mailto:[EMAIL PROTECTED] On Behalf Of John Brett >Sent: 26 April 2005 21:36 >To: [email protected] >Subject: Re: [ADVANCED-DOTNET] System.Diagnostics.EventLog - against >archived log files? > >How big is the array you're passing in to the function? >Have you checked that its greater than the returned value of >iMinNumberOfBytesNeeded? > >=================================== >This list is hosted by DevelopMentor� http://www.develop.com > >View archives and manage your subscription(s) at http://discuss.develop.com =================================== This list is hosted by DevelopMentor� http://www.develop.com View archives and manage your subscription(s) at http://discuss.develop.com
