ChrisL Posted July 22, 2008 Share Posted July 22, 2008 There seems to be an issue with writing to the NT4 event log. In Securuty.au3 there is a function Func _Security__SidToStringSid($pSID) Local $tPtr, $tBuffer, $sSID, $aResult If Not _Security__IsValidSid($pSID) Then Return SetError(-1, 0, "") $tPtr = DllStructCreate("ptr Buffer") $aResult = DllCall("AdvAPI32.dll", "int", "ConvertSidToStringSid", "ptr", $pSID, "ptr", DllStructGetPtr($tPtr)) If $aResult[0] = 0 Then Return SetError(-2, 0, "") $tBuffer = DllStructCreate("char Text[256]", DllStructGetData($tPtr, "Buffer")) $sSID = DllStructGetData($tBuffer, "Text") _WinAPI_LocalFree(DllStructGetData($tPtr, "Buffer")) Return $sSID EndFunc ;==>_Security__SidToStringSid But ConvertSidToStringSid does't exist in the NT4 AdvAPI32.dll So if I specify NULL as the username for the event it generates an event but when you try and read it Event Viewer says "The system can not find the file specified" Any ideas [u]Scripts[/u]Minimize gui to systray _ Fail safe source recoveryMsgbox UDF _ _procwatch() Stop your app from being closedLicensed/Trial software system _ Buffering Hotkeys_SQL.au3 ADODB.Connection _ Search 2d Arrays_SplashTextWithGraphicOn() _ Adjust Screen GammaTransparent Controls _ Eventlogs without the crap_GuiCtrlCreateFlash() _ Simple Interscript communication[u]Websites[/u]Curious Campers VW Hightops Lambert Plant Hire Link to comment Share on other sites More sharing options...
ChrisL Posted July 22, 2008 Author Share Posted July 22, 2008 Nevermind I sussed it.. first you specify NULL as a username when using _Event__Report() and also you have to use a valid message file DLL otherwise EventVwr gives the error I specified earlier. If I setup a message source using the EventVwr dll stuff in my signature it works fine. I'd been scratching my head on this for ages and I think posting here was the inspiration I needed! [u]Scripts[/u]Minimize gui to systray _ Fail safe source recoveryMsgbox UDF _ _procwatch() Stop your app from being closedLicensed/Trial software system _ Buffering Hotkeys_SQL.au3 ADODB.Connection _ Search 2d Arrays_SplashTextWithGraphicOn() _ Adjust Screen GammaTransparent Controls _ Eventlogs without the crap_GuiCtrlCreateFlash() _ Simple Interscript communication[u]Websites[/u]Curious Campers VW Hightops Lambert Plant Hire Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now