ripdad Posted November 19, 2010 Share Posted November 19, 2010 (edited) expandcollapse popup#include-once ; ; File: MCI_ShowError.au3 ; ; - Shows MCI Error Codes and Strings ; - Released: Nov-18-2010, by ripdad ; - Based on information obtained from MSDN ; Global Const $MCIERR_BASE = 256 Global Const $MCIERR_INVALID_DEVICE_ID = 257 Global Const $MCIERR_UNRECOGNIZED_KEYWORD = 259 Global Const $MCIERR_UNRECOGNIZED_COMMAND = 261 Global Const $MCIERR_HARDWARE = 262 Global Const $MCIERR_INVALID_DEVICE_NAME = 263 Global Const $MCIERR_OUT_OF_MEMORY = 264 Global Const $MCIERR_DEVICE_OPEN = 265 Global Const $MCIERR_CANNOT_LOAD_DRIVER = 266 Global Const $MCIERR_MISSING_COMMAND_STRING = 267 Global Const $MCIERR_PARAM_OVERFLOW = 268 Global Const $MCIERR_MISSING_STRING_ARGUMENT = 269 Global Const $MCIERR_BAD_INTEGER = 270 Global Const $MCIERR_PARSER_INTERNAL = 271 Global Const $MCIERR_DRIVER_INTERNAL = 272 Global Const $MCIERR_MISSING_PARAMETER = 273 Global Const $MCIERR_UNSUPPORTED_FUNCTION = 274 Global Const $MCIERR_FILE_NOT_FOUND = 275 Global Const $MCIERR_DEVICE_NOT_READY = 276 Global Const $MCIERR_INTERNAL = 277 Global Const $MCIERR_DRIVER = 278 Global Const $MCIERR_CANNOT_USE_ALL = 279 Global Const $MCIERR_MULTIPLE = 280 Global Const $MCIERR_EXTENSION_NOT_FOUND = 281 Global Const $MCIERR_OUTOFRANGE = 282 Global Const $MCIERR_FLAGS_NOT_COMPATIBLE = 283 Global Const $MCIERR_FILE_NOT_SAVED = 286 Global Const $MCIERR_DEVICE_TYPE_REQUIRED = 287 Global Const $MCIERR_DEVICE_LOCKED = 288 Global Const $MCIERR_DUPLICATE_ALIAS = 289 Global Const $MCIERR_BAD_CONSTANT = 290 Global Const $MCIERR_MUST_USE_SHAREABLE = 291 Global Const $MCIERR_MISSING_DEVICE_NAME = 292 Global Const $MCIERR_BAD_TIME_FORMAT = 293 Global Const $MCIERR_NO_CLOSING_QUOTE = 294 Global Const $MCIERR_DUPLICATE_FLAGS = 295 Global Const $MCIERR_INVALID_FILE = 296 Global Const $MCIERR_NULL_PARAMETER_BLOCK = 297 Global Const $MCIERR_UNNAMED_RESOURCE = 298 Global Const $MCIERR_NEW_REQUIRES_ALIAS = 299 Global Const $MCIERR_NOTIFY_ON_AUTO_OPEN = 300 Global Const $MCIERR_NO_ELEMENT_ALLOWED = 301 Global Const $MCIERR_NONAPPLICABLE_FUNCTION = 302 Global Const $MCIERR_ILLEGAL_FOR_AUTO_OPEN = 303 Global Const $MCIERR_FILENAME_REQUIRED = 304 Global Const $MCIERR_EXTRA_CHARACTERS = 305 Global Const $MCIERR_DEVICE_NOT_INSTALLED = 306 Global Const $MCIERR_GET_CD = 307 Global Const $MCIERR_SET_CD = 308 Global Const $MCIERR_SET_DRIVE = 309 Global Const $MCIERR_DEVICE_LENGTH = 310 Global Const $MCIERR_DEVICE_ORD_LENGTH = 311 Global Const $MCIERR_NO_INTEGER = 312 Global Const $MCIERR_WAVE_OUTPUTSINUSE = 320 Global Const $MCIERR_WAVE_SETOUTPUTINUSE = 321 Global Const $MCIERR_WAVE_INPUTSINUSE = 322 Global Const $MCIERR_WAVE_SETINPUTINUSE = 323 Global Const $MCIERR_WAVE_OUTPUTUNSPECIFIED = 324 Global Const $MCIERR_WAVE_INPUTUNSPECIFIED = 325 Global Const $MCIERR_WAVE_OUTPUTSUNSUITABLE = 326 Global Const $MCIERR_WAVE_SETOUTPUTUNSUITABLE = 327 Global Const $MCIERR_WAVE_INPUTSUNSUITABLE = 328 Global Const $MCIERR_WAVE_SETINPUTUNSUITABLE = 329 Global Const $MCIERR_SEQ_DIV_INCOMPATIBLE = 336 Global Const $MCIERR_SEQ_PORT_INUSE = 337 Global Const $MCIERR_SEQ_PORT_NONEXISTENT = 338 Global Const $MCIERR_SEQ_PORT_MAPNODEVICE = 339 Global Const $MCIERR_SEQ_PORT_MISCERROR = 340 Global Const $MCIERR_SEQ_TIMER = 341 Global Const $MCIERR_SEQ_PORTUNSPECIFIED = 342 Global Const $MCIERR_SEQ_NOMIDIPRESENT = 343 Global Const $MCIERR_NO_WINDOW = 346 Global Const $MCIERR_CREATEWINDOW = 347 Global Const $MCIERR_FILE_READ = 348 Global Const $MCIERR_FILE_WRITE = 349 Global Const $MCIERR_AVI_OLDAVIFORMAT = 356 Global Const $MCIERR_AVI_NOTINTERLEAVED = 357 Global Const $MCIERR_AVI_NODISPDIB = 358 Global Const $MCIERR_AVI_CANTPLAYFULLSCREEN = 359 Global Const $MCIERR_AVI_TOOBIGFORVGA = 360 Global Const $MCIERR_AVI_NOCOMPRESSOR = 361 Global Const $MCIERR_AVI_DISPLAYERROR = 362 Global Const $MCIERR_AVI_AUDIOERROR = 363 Global Const $MCIERR_AVI_BADPALETTE = 364 Global Const $MCIERR_CUSTOM_DRIVER_BASE = 512 ; ; #FUNCTION# ====================================================================================== ; Name...........: mciShowError ; Description ...: Displays via MsgBox the MCI Error Number and Associated Error String ; Syntax.........: mciShowError($number) ; ; Usage Example: ; ; #include "MCI_ShowError.au3" ; ; Local $errmsg = DllCall("winmm.dll", "dword", "mciSendStringW", etc, etc ... ) ; If @error Then Return -1 ; If $errmsg[0] <> 0 Then ; mciShowError($errmsg[0]) ; Return -2 ; EndIf ; ; Parameters ....: ; Return values .: Success: Displays MCI Error Message ; Author ........: ripdad ; Modified.......: ; Remarks .......: For obtaining MCI error messages ; Related .......: ; Link ..........: MSDN ; Example .......: Yes ; ================================================================================================= Func mciShowError($errStr) Local $mciErrorMsg = '' Switch $errStr Case $MCIERR_INVALID_DEVICE_ID $mciErrorMsg = "MCIERR_INVALID_DEVICE_ID" & @CRLF & "Use the ID given to the device when the device was opened." Case $MCIERR_UNRECOGNIZED_KEYWORD $mciErrorMsg = "MCIERR_UNRECOGNIZED_KEYWORD" & @CRLF & "An unknown command parameter was specified." Case $MCIERR_UNRECOGNIZED_COMMAND $mciErrorMsg = "MCIERR_UNRECOGNIZED_COMMAND" & @CRLF & "The driver cannot recognize the specified command." Case $MCIERR_HARDWARE $mciErrorMsg = "MCIERR_HARDWARE" & @CRLF & "The specified device exhibits a problem. Check that the device is working correctly or contact the device manufacturer." Case $MCIERR_INVALID_DEVICE_NAME $mciErrorMsg = "MCIERR_INVALID_DEVICE_NAME" & @CRLF & "The specified device is not open nor recognized by MCI." Case $MCIERR_OUT_OF_MEMORY $mciErrorMsg = "MCIERR_OUT_OF_MEMORY" & @CRLF & "Your system does not have enough memory for this task. Quit one or more applications to increase the available memory, then, try to perform the task again." Case $MCIERR_DEVICE_OPEN $mciErrorMsg = "MCIERR_DEVICE_OPEN" & @CRLF & "The device name is already used as an alias by this application. Use a unique alias." Case $MCIERR_CANNOT_LOAD_DRIVER $mciErrorMsg = "MCIERR_CANNOT_LOAD_DRIVER" & @CRLF & "The specified device driver will not load properly." Case $MCIERR_MISSING_COMMAND_STRING $mciErrorMsg = "MCIERR_MISSING_COMMAND_STRING" & @CRLF & "No command was specified." Case $MCIERR_PARAM_OVERFLOW $mciErrorMsg = "MCIERR_PARAM_OVERFLOW" & @CRLF & "The output string was not long enough." Case $MCIERR_MISSING_STRING_ARGUMENT $mciErrorMsg = "MCIERR_MISSING_STRING_ARGUMENT" & @CRLF & "A string value was missing from the command." Case $MCIERR_BAD_INTEGER $mciErrorMsg = "MCIERR_BAD_INTEGER" & @CRLF & "An integer in the command was invalid or missing." Case $MCIERR_PARSER_INTERNAL $mciErrorMsg = "MCIERR_PARSER_INTERNAL" & @CRLF & "An internal parser error occurred." Case $MCIERR_DRIVER_INTERNAL $mciErrorMsg = "MCIERR_DRIVER_INTERNAL" & @CRLF & "The device driver exhibits a problem. Check with the device manufacturer about obtaining a new driver." Case $MCIERR_MISSING_PARAMETER $mciErrorMsg = "MCIERR_MISSING_PARAMETER" & @CRLF & "The specified command requires a parameter, which you must supply." Case $MCIERR_UNSUPPORTED_FUNCTION $mciErrorMsg = "MCIERR_UNSUPPORTED_FUNCTION" & @CRLF & "The MCI device driver the system is using does not support the specified command." Case $MCIERR_FILE_NOT_FOUND $mciErrorMsg = "MCIERR_FILE_NOT_FOUND" & @CRLF & "The requested file was not found. Check that the path and filename are correct." Case $MCIERR_DEVICE_NOT_READY $mciErrorMsg = "MCIERR_DEVICE_NOT_READY" & @CRLF & "The device driver is not ready." Case $MCIERR_INTERNAL $mciErrorMsg = "MCIERR_INTERNAL" & @CRLF & "A problem occurred in initializing MCI. Try restarting the Windows operating system." Case $MCIERR_DRIVER $mciErrorMsg = "MCIERR_DRIVER" & @CRLF & "The device driver exhibits a problem. Check with the device manufacturer about obtaining a new driver." Case $MCIERR_CANNOT_USE_ALL $mciErrorMsg = "MCIERR_CANNOT_USE_ALL" & @CRLF & "The device name" & ' "all" ' & "is not allowed for this command." Case $MCIERR_MULTIPLE $mciErrorMsg = "MCIERR_MULTIPLE" & @CRLF & "Errors occurred in more than one device. Specify each command and device separately to identify the devices causing the errors." Case $MCIERR_EXTENSION_NOT_FOUND $mciErrorMsg = "MCIERR_EXTENSION_NOT_FOUND" & @CRLF & "The specified extension has no device type associated with it. Specify a device type." Case $MCIERR_OUTOFRANGE $mciErrorMsg = "MCIERR_OUTOFRANGE" & @CRLF & "The specified parameter value is out of range for the specified MCI command." Case $MCIERR_FLAGS_NOT_COMPATIBLE $mciErrorMsg = "MCIERR_FLAGS_NOT_COMPATIBLE" & @CRLF & "The specified parameters cannot be used together." Case $MCIERR_FILE_NOT_SAVED $mciErrorMsg = "MCIERR_FILE_NOT_SAVED" & @CRLF & "The file was not saved. Make sure your system has sufficient disk space or has an intact network connection." Case $MCIERR_DEVICE_TYPE_REQUIRED $mciErrorMsg = "MCIERR_DEVICE_TYPE_REQUIRED" & @CRLF & "The specified device cannot be found on the system. Check that the device is installed and the device name is spelled correctly." Case $MCIERR_DEVICE_LOCKED $mciErrorMsg = "MCIERR_DEVICE_LOCKED" & @CRLF & "The device is now being closed. Wait a few seconds, then try again." Case $MCIERR_DUPLICATE_ALIAS $mciErrorMsg = "MCIERR_DUPLICATE_ALIAS" & @CRLF & "The specified alias is already used in this application. Use a unique alias." Case $MCIERR_BAD_CONSTANT $mciErrorMsg = "MCIERR_BAD_CONSTANT" & @CRLF & "The value specified for a parameter is unknown." Case $MCIERR_MUST_USE_SHAREABLE $mciErrorMsg = "MCIERR_MUST_USE_SHAREABLE" & @CRLF & "The device driver is already in use. You must specify the" & ' "shareable" ' & "parameter with each open command to share the device." Case $MCIERR_MISSING_DEVICE_NAME $mciErrorMsg = "MCIERR_MISSING_DEVICE_NAME" & @CRLF & "No device name was specified." Case $MCIERR_BAD_TIME_FORMAT $mciErrorMsg = "MCIERR_BAD_TIME_FORMAT" & @CRLF & "The specified value for the time format is invalid." Case $MCIERR_NO_CLOSING_QUOTE $mciErrorMsg = "MCIERR_NO_CLOSING_QUOTE" & @CRLF & "A closing quotation mark is missing." Case $MCIERR_DUPLICATE_FLAGS $mciErrorMsg = "MCIERR_DUPLICATE_FLAGS" & @CRLF & "A flag or value was specified twice." Case $MCIERR_INVALID_FILE $mciErrorMsg = "MCIERR_INVALID_FILE" & @CRLF & "The specified file cannot be played on the specified MCI device. The file may be corrupt or may use an incorrect file format." Case $MCIERR_NULL_PARAMETER_BLOCK $mciErrorMsg = "MCIERR_NULL_PARAMETER_BLOCK" & @CRLF & "A null parameter block (structure) was passed to MCI." Case $MCIERR_UNNAMED_RESOURCE $mciErrorMsg = "MCIERR_UNNAMED_RESOURCE" & @CRLF & "You cannot store an unnamed file. Specify a filename." Case $MCIERR_NEW_REQUIRES_ALIAS $mciErrorMsg = "MCIERR_NEW_REQUIRES_ALIAS" & @CRLF & "An alias must be used with the" & ' "new" ' & "device name." Case $MCIERR_NOTIFY_ON_AUTO_OPEN $mciErrorMsg = "MCIERR_NOTIFY_ON_AUTO_OPEN" & @CRLF & "The" & ' "notify" ' & "flag is illegal with auto-open." Case $MCIERR_NO_ELEMENT_ALLOWED $mciErrorMsg = "MCIERR_NO_ELEMENT_ALLOWED" & @CRLF & "The specified device does not use a filename." Case $MCIERR_NONAPPLICABLE_FUNCTION $mciErrorMsg = "MCIERR_NONAPPLICABLE_FUNCTION" & @CRLF & "The specified MCI command sequence cannot be performed in the given order. Correct the command sequence; then, try again." Case $MCIERR_ILLEGAL_FOR_AUTO_OPEN $mciErrorMsg = "MCIERR_ILLEGAL_FOR_AUTO_OPEN" & @CRLF & "MCI will not perform the specified command on an automatically opened device. Wait until the device is closed, then try to perform the command." Case $MCIERR_FILENAME_REQUIRED $mciErrorMsg = "MCIERR_FILENAME_REQUIRED" & @CRLF & "The filename is invalid. Make sure the filename is no longer than eight characters, followed by a period and an extension." Case $MCIERR_EXTRA_CHARACTERS $mciErrorMsg = "MCIERR_EXTRA_CHARACTERS" & @CRLF & "You must enclose a string with quotation marks; characters following the closing quotation mark are not valid." Case $MCIERR_DEVICE_NOT_INSTALLED $mciErrorMsg = "MCIERR_DEVICE_NOT_INSTALLED" & @CRLF & "The specified device is not installed on the system. Use the Drivers option from the Control Panel to install the device." Case $MCIERR_GET_CD $mciErrorMsg = "MCIERR_GET_CD" & @CRLF & "The requested file OR MCI device was not found. Try changing directories or restarting your system." Case $MCIERR_SET_CD $mciErrorMsg = "MCIERR_SET_CD" & @CRLF & "The specified file or MCI device is inaccessible because the application cannot change directories." Case $MCIERR_SET_DRIVE $mciErrorMsg = "MCIERR_SET_DRIVE" & @CRLF & "The specified file or MCI device is inaccessible because the application cannot change drives." Case $MCIERR_DEVICE_LENGTH $mciErrorMsg = "MCIERR_DEVICE_LENGTH" & @CRLF & "The device or driver name is too long. Specify a device or driver name that is less than 79 characters." Case $MCIERR_DEVICE_ORD_LENGTH $mciErrorMsg = "MCIERR_DEVICE_ORD_LENGTH" & @CRLF & "The device or driver name is too long. Specify a device or driver name that is less than 79 characters." Case $MCIERR_NO_INTEGER $mciErrorMsg = "MCIERR_NO_INTEGER" & @CRLF & "The parameter for this MCI command must be an integer value." Case $MCIERR_WAVE_OUTPUTSINUSE $mciErrorMsg = "MCIERR_WAVE_OUTPUTSINUSE" & @CRLF & "All waveform devices that can play files in the current format are in use. Wait until one of these devices is free; then, try again." Case $MCIERR_WAVE_SETOUTPUTINUSE $mciErrorMsg = "MCIERR_WAVE_SETOUTPUTINUSE" & @CRLF & "The current waveform device is in use. Wait until the device is free; then, try again to set the device for playback." Case $MCIERR_WAVE_INPUTSINUSE $mciErrorMsg = "MCIERR_WAVE_INPUTSINUSE" & @CRLF & "All waveform devices that can record files in the current format are in use. Wait until one of these devices is free; then, try again." Case $MCIERR_WAVE_SETINPUTINUSE $mciErrorMsg = "MCIERR_WAVE_SETINPUTINUSE" & @CRLF & "The current waveform device is in use. Wait until the device is free; then, try again to set the device for recording." Case $MCIERR_WAVE_OUTPUTUNSPECIFIED $mciErrorMsg = "MCIERR_WAVE_OUTPUTUNSPECIFIED" & @CRLF & "You can specify any compatible waveform playback device." Case $MCIERR_WAVE_INPUTUNSPECIFIED $mciErrorMsg = "MCIERR_WAVE_INPUTUNSPECIFIED" & @CRLF & "You can specify any compatible waveform recording device." Case $MCIERR_WAVE_OUTPUTSUNSUITABLE $mciErrorMsg = "MCIERR_WAVE_OUTPUTSUNSUITABLE" & @CRLF & "No installed waveform device can play files in the current format. Use the Drivers option from the Control Panel to install a suitable waveform device." Case $MCIERR_WAVE_SETOUTPUTUNSUITABLE $mciErrorMsg = "MCIERR_WAVE_SETOUTPUTUNSUITABLE" & @CRLF & "The device you are using to playback a waveform cannot recognize the data format." Case $MCIERR_WAVE_INPUTSUNSUITABLE $mciErrorMsg = "MCIERR_WAVE_INPUTSUNSUITABLE" & @CRLF & "No installed waveform device can record files in the current format. Use the Drivers option from the Control Panel to install a suitable waveform recording device." Case $MCIERR_WAVE_SETINPUTUNSUITABLE $mciErrorMsg = "MCIERR_WAVE_SETINPUTUNSUITABLE" & @CRLF & "The device you are using to record a waveform cannot recognize the data format." Case $MCIERR_SEQ_DIV_INCOMPATIBLE $mciErrorMsg = "MCIERR_SEQ_DIV_INCOMPATIBLE" & @CRLF & "The time formats of the" & ' "song pointer" ' & "and SMPTE are singular. You can't use them together." Case $MCIERR_SEQ_PORT_INUSE $mciErrorMsg = "MCIERR_SEQ_PORT_INUSE" & @CRLF & "The specified MIDI port is already in use. Wait until it is free; then, try again." Case $MCIERR_SEQ_PORT_NONEXISTENT $mciErrorMsg = "MCIERR_SEQ_PORT_NONEXISTENT" & @CRLF & "The specified MIDI device is not installed on the system. Use the Drivers option from the Control Panel to install a MIDI device." Case $MCIERR_SEQ_PORT_MAPNODEVICE $mciErrorMsg = "MCIERR_SEQ_PORT_MAPNODEVICE" & @CRLF & "The current MIDI Mapper setup refers to a MIDI device that is not installed on the system. Use the MIDI Mapper from the Control Panel to edit the setup." Case $MCIERR_SEQ_PORT_MISCERROR $mciErrorMsg = "MCIERR_SEQ_PORT_MISCERROR" & @CRLF & "An error occurred with specified port." Case $MCIERR_SEQ_TIMER $mciErrorMsg = "MCIERR_SEQ_TIMER" & @CRLF & "All multimedia timers are being used by other applications. Quit one of these applications; then, try again." Case $MCIERR_SEQ_PORTUNSPECIFIED $mciErrorMsg = "MCIERR_SEQ_PORTUNSPECIFIED" & @CRLF & "The system does not have a current MIDI port specified." Case $MCIERR_SEQ_NOMIDIPRESENT $mciErrorMsg = "MCIERR_SEQ_NOMIDIPRESENT" & @CRLF & "This system has no installed MIDI devices. Use the Drivers option from the Control Panel to install a MIDI driver." Case $MCIERR_NO_WINDOW $mciErrorMsg = "MCIERR_NO_WINDOW" & @CRLF & "There is no display window." Case $MCIERR_CREATEWINDOW $mciErrorMsg = "MCIERR_CREATEWINDOW" & @CRLF & "Could not create or use window." Case $MCIERR_FILE_READ $mciErrorMsg = "MCIERR_FILE_READ" & @CRLF & "A read from the file failed. Make sure the file is present on your system or that your system has an intact network connection." Case $MCIERR_FILE_WRITE $mciErrorMsg = "MCIERR_FILE_WRITE" & @CRLF & "A write to the file failed. Make sure your system has sufficient disk space or has an intact network connection." Case $MCIERR_AVI_OLDAVIFORMAT $mciErrorMsg = "MCIERR_AVI_OLDAVIFORMAT" & @CRLF & "This AVI file is of an obsolete format." Case $MCIERR_AVI_NOTINTERLEAVED $mciErrorMsg = "MCIERR_AVI_NOTINTERLEAVED" & @CRLF & "This AVI file is not interleaved." Case $MCIERR_AVI_NODISPDIB $mciErrorMsg = "MCIERR_AVI_NODISPDIB" & @CRLF & "256 color VGA mode not available." Case $MCIERR_AVI_CANTPLAYFULLSCREEN $mciErrorMsg = "MCIERR_AVI_CANTPLAYFULLSCREEN" & @CRLF & "This AVI file cannot be played in full screen mode." Case $MCIERR_AVI_TOOBIGFORVGA $mciErrorMsg = "MCIERR_AVI_TOOBIGFORVGA" & @CRLF & "This AVI file is too big to be played in the selected VGA mode." Case $MCIERR_AVI_NOCOMPRESSOR $mciErrorMsg = "MCIERR_AVI_NOCOMPRESSOR" & @CRLF & "Can't locate installable compressor needed to play this file." Case $MCIERR_AVI_DISPLAYERROR $mciErrorMsg = "MCIERR_AVI_DISPLAYERROR" & @CRLF & "Unknown error while attempting to display video." Case $MCIERR_AVI_AUDIOERROR $mciErrorMsg = "MCIERR_AVI_AUDIOERROR" & @CRLF & "Unknown error while attempting to play audio." Case $MCIERR_AVI_BADPALETTE $mciErrorMsg = "MCIERR_AVI_BADPALETTE" & @CRLF & "Unable to switch to new palette." Case Else $mciErrorMsg = "Unknown Error" EndSwitch MsgBox(8208, "MCI Error: " & $errStr, $mciErrorMsg) EndFunc ;MCI_ShowError.au3 Edited December 7, 2010 by ripdad "The mediocre teacher tells. The Good teacher explains. The superior teacher demonstrates. The great teacher inspires." -William Arthur Ward Link to comment Share on other sites More sharing options...
Ascend4nt Posted November 19, 2010 Share Posted November 19, 2010 Just curious, why not just use 'mciGetErrorString'? My contributions: Performance Counters in Windows - Measure CPU, Disk, Network etc Performance | Network Interface Info, Statistics, and Traffic | CPU Multi-Processor Usage w/o Performance Counters | Disk and Device Read/Write Statistics | Atom Table Functions | Process, Thread, & DLL Functions UDFs |Â Process CPU Usage Trackers | PE File Overlay Extraction | A3X Script Extract | File + Process Imports/Exports Information | Windows Desktop Dimmer Shade | Spotlight + Focus GUI - Highlight and Dim for Eyestrain Relief | CrossHairs (FullScreen) |Â Rubber-Band Boxes using GUI's (_GUIBox) | GUI Fun! | IE Embedded Control Versioning (use IE9+ and HTML5 in a GUI) | Magnifier (Vista+) Functions UDF | _DLLStructDisplay (Debug!) | _EnumChildWindows (controls etc) | _FileFindEx | _ClipGetHTML | _ClipPutHTML + ClipPutHyperlink | _FileGetShortcutEx | _FilePropertiesDialog | I/O Port Functions | File(s) Drag & Drop | _RunWithReducedPrivileges | _ShellExecuteWithReducedPrivileges | _WinAPI_GetSystemInfo | dotNETGetVersions | Drive(s) Power Status | _WinGetDesktopHandle | _StringParseParameters | Screensaver, Sleep, Desktop Lock Disable | Full-Screen Crash Recovery Wrappers/Modifications of others' contributions: _DOSWildcardsToPCRegEx (original code: RobSaunder's) | WinGetAltTabWinList (original: Authenticity) UDF's added support/programming to: _ExplorerWinGetSelectedItems | MIDIEx UDF (original code: eynstyne) (All personal code/wrappers centrally located at Ascend4nt's AutoIT Code) Link to comment Share on other sites More sharing options...
ripdad Posted November 19, 2010 Author Share Posted November 19, 2010 I've done that. It only shows one generic message. At least it did on my system. Quote: "There is a problem with the device driver. The driver has closed. Cannot access error." "The mediocre teacher tells. The Good teacher explains. The superior teacher demonstrates. The great teacher inspires." -William Arthur Ward Link to comment Share on other sites More sharing options...
Ascend4nt Posted November 19, 2010 Share Posted November 19, 2010 Did you mask off the lower word of the return value before sending it to that API function? ( BitAnd($iErr,0xFFFF) ) My contributions: Performance Counters in Windows - Measure CPU, Disk, Network etc Performance | Network Interface Info, Statistics, and Traffic | CPU Multi-Processor Usage w/o Performance Counters | Disk and Device Read/Write Statistics | Atom Table Functions | Process, Thread, & DLL Functions UDFs |Â Process CPU Usage Trackers | PE File Overlay Extraction | A3X Script Extract | File + Process Imports/Exports Information | Windows Desktop Dimmer Shade | Spotlight + Focus GUI - Highlight and Dim for Eyestrain Relief | CrossHairs (FullScreen) |Â Rubber-Band Boxes using GUI's (_GUIBox) | GUI Fun! | IE Embedded Control Versioning (use IE9+ and HTML5 in a GUI) | Magnifier (Vista+) Functions UDF | _DLLStructDisplay (Debug!) | _EnumChildWindows (controls etc) | _FileFindEx | _ClipGetHTML | _ClipPutHTML + ClipPutHyperlink | _FileGetShortcutEx | _FilePropertiesDialog | I/O Port Functions | File(s) Drag & Drop | _RunWithReducedPrivileges | _ShellExecuteWithReducedPrivileges | _WinAPI_GetSystemInfo | dotNETGetVersions | Drive(s) Power Status | _WinGetDesktopHandle | _StringParseParameters | Screensaver, Sleep, Desktop Lock Disable | Full-Screen Crash Recovery Wrappers/Modifications of others' contributions: _DOSWildcardsToPCRegEx (original code: RobSaunder's) | WinGetAltTabWinList (original: Authenticity) UDF's added support/programming to: _ExplorerWinGetSelectedItems | MIDIEx UDF (original code: eynstyne) (All personal code/wrappers centrally located at Ascend4nt's AutoIT Code) Link to comment Share on other sites More sharing options...
engjcowi Posted November 19, 2010 Share Posted November 19, 2010 (edited) Hi does anyone have a way to test this. And can 1 statement be added so it covers the whole of your script or does it need to be done everytime i run an exe? Edited November 19, 2010 by engjcowi Drunken Frat-Boy Monkey Garbage Link to comment Share on other sites More sharing options...
ripdad Posted November 19, 2010 Author Share Posted November 19, 2010 (edited) Ascend4nt,I'm aware that MciSendCommand returns a hi/lo-word -- but, so far, i haven't seen that in MciSendString.I might be missing something maybe?- Edit1 - Duh. Never mind, I got it. Simple eh?For $i = 290 To 310 mciShowError($i) Next Func mciShowError($nErr) Local $eMsg = DllCall("winmm.dll", "long", "mciGetErrorStringA", "int", $nErr, "str", "", "int", 180) MsgBox(8208, "Error", "MCI Error: " & $nErr & @CRLF & $eMsg[2]) EndFunc Edited November 20, 2010 by ripdad "The mediocre teacher tells. The Good teacher explains. The superior teacher demonstrates. The great teacher inspires." -William Arthur Ward Link to comment Share on other sites More sharing options...
ripdad Posted November 19, 2010 Author Share Posted November 19, 2010 engjcowi, I'm not sure what you're asking. Want to rephrase your question? The script was just for getting winmm.dll error codes. Now it's just a reference. <grin> "The mediocre teacher tells. The Good teacher explains. The superior teacher demonstrates. The great teacher inspires." -William Arthur Ward Link to comment Share on other sites More sharing options...
engjcowi Posted November 19, 2010 Share Posted November 19, 2010 ah sorry i thought id was for all processes. my bad Drunken Frat-Boy Monkey Garbage 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