svn commit: samba r16029 - in branches/SOC/bnh: .
brad at samba.org
brad at samba.org
Sat Jun 3 18:54:31 GMT 2006
Author: brad
Date: 2006-06-03 18:54:31 +0000 (Sat, 03 Jun 2006)
New Revision: 16029
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=16029
Log:
VBScript doesn't have access to extended ADSI or WMI error messages.
To work around this, I added error reporting to the other scripts such that they return the error number and its hex value.
These updates will be committed shortly.
If you take the last 4 hex digits of the error code, and convert them to base 10, you can cross reference that value against windows platform sdk header files to determine the extended error.
This script does the simple conversion.
Added:
branches/SOC/bnh/hextodec.vbs
Changeset:
Added: branches/SOC/bnh/hextodec.vbs
===================================================================
--- branches/SOC/bnh/hextodec.vbs 2006-06-03 11:57:20 UTC (rev 16028)
+++ branches/SOC/bnh/hextodec.vbs 2006-06-03 18:54:31 UTC (rev 16029)
@@ -0,0 +1,11 @@
+' A VBScript to convert a 4 digit hex value into a base 10 dec value.
+
+if wscript.arguments.count <> 1 then
+ wscript.stdout.writeline "Usage: cscript hextodec.vbs <hex value>"
+ wscript.quit
+end if
+
+hex_in = "&H" & wscript.arguments.item(0)
+dec_out = CLng(hex_in)
+
+wscript.stdout.writeline dec_out
More information about the samba-cvs
mailing list