Vbs ошибка 0x80045006

День добрый!

При выполнении этого кода больше 3 раз 

//+------------------------------------------------------------------+
//|                                            ShellExecuteCatch.mq5 |
//|                        Copyright 2020, MetaQuotes Software Corp. |
//|                                             https://www.mql5.com |
//+------------------------------------------------------------------+
#property copyright "Copyright 2020, MetaQuotes Software Corp."
#property link      "https://www.mql5.com"
#property version   "1.00"
//+------------------------------------------------------------------+
//| Script program start function                                    |
//+------------------------------------------------------------------+
#import "shell32.dll"
   int ShellExecuteW(int hwnd,string lpOperation,string lpFile,string lpParameters,string lpDirectory,int nShowCmd);
#import
void OnStart()
  {
//---
string file2run="";
file2run = TerminalInfoString(TERMINAL_DATA_PATH)+"\MQL5\Files\1sspeechexample.vbs";
   for(int i=0;i<4;i++)
   {
      ShellExecuteW(NULL,NULL,file2run,"","",0);
  }
  }
//+------------------------------------------------------------------+

по окончанию работы MQL5 скрипта появляется окно

Сам vbs файл во вложении с измененным с .vbs на .txt расширением, иначе форум не принимает.

Скрипт отрабатывает корректно и фраза «Hello, World» произносится 4 раза, но вот это окно по окончании…

Не подскажете, как можно «отловить» это поведение, чтобы предотвратить появление всплывающего окна по окончанию скрипта?

---------------------------
Debugger Exception Notification
---------------------------
Project Project1.exe raised exception class EOleException with message 'OLE error 80045006'.
---------------------------
Break   Continue   Help   
---------------------------

i have called CoInitialize. My code is :

hr := CoInitialize(nil);

SpVoice := TSpVoice.Create(Application);
SpVoice.Connect;
SpVoice.Speak('Test text');

CoUninitialize;

and the error only happened when i select the neospeech voice.

Tim Cooper's user avatar

Tim Cooper

157k38 gold badges329 silver badges279 bronze badges

asked Dec 18, 2010 at 16:37

doomit's user avatar

2

Error 0x80045006 is SPERR_DEVICE_BUSY: Hardware device is in use by another thread or process. MSDN Says: in many older systems, audio output devices can be opened only by a single process. In versions of Windows previous to Windows XP, only a single process can open an audio input device. Therefore, SPERR_DEVICE_BUSY will return if an attempt is made to open a device that is being used by a different process or thread. In Windows XP (and higher), multiple processes can open the same audio device

david's user avatar

david

2,4161 gold badge21 silver badges33 bronze badges

answered Dec 18, 2010 at 19:43

Remko's user avatar

RemkoRemko

7,1842 gold badges30 silver badges52 bronze badges

1

I was testing self-voicing for a project I was working on. While it was enabled, I ran into an error in my script. Self-voicing began to read out the error message. I closed the program, and it continued to read aloud the error message. I fixed the error in my script and saved. Launched the game from the Ren’Py launcher. Self-voicing continued to read aloud the error message traceback. I disabled and re-enabled self-voicing with the V key and got the error message:

Windows Script Host

Script:
C:Users(...path to the Ren'Py executable)libwindows-i686say.vbs
Line: 15
Char: 1
Error: 0x80045006
Code: 80045006
Source: (null)

Closing the Ren’Py launcher and re-opening it did not stop the self-voicing, nor did opening a different project and disabling and re-enabling self-voicing. While it continued to read the error message it did not read the on-screen text at all on any other project nor the original project. Text on-screen indicated that the self-voicing was being turned on and off.

After the program finished reading out the entire traceback (which took several minutes), self-voicing now works as normal for the program again.

See more:

When I speak the voice through SpeechLib.dll it is working fine.

To Speak the voice here is the code:

voice.Voice = voice.GetVoices().Item(ddlVoices.SelectedIndex);
voice.Volume = trackBarVolume.Value;
voice.Rate = trackBarSpeed.Value;
speakingText = txtUserInput.Text;
voice.Speak(speakingText, SpeechLib.SpeechVoiceSpeakFlags.SVSFlagsAsync);

In the middle of the speaking text i have Pause the speaking like:

voice.Pause();

After that I want to stop the voice and speak the voice with different senatnce. To stop the voice I have used:

voice.Speak("", SpeechLib.SpeechVoiceSpeakFlags.SVSFPurgeBeforeSpeak);

In this scenario when I call stop method I got the below error:

Exception from HRESULT: 0x80045006

And it take lot of time to give the responce.


This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject,
20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8
+1 (416) 849-8900

by Ivan Jenic

Passionate about all elements related to Windows and combined with his innate curiosity, Ivan has delved deep into understanding this operating system, with a specialization in drivers and… read more


Updated on January 16, 2023

Reviewed by
Vlad Turiceanu

Vlad Turiceanu

Passionate about technology, Windows, and everything that has a power button, he spent most of his time developing new skills and learning more about the tech world. Coming… read more

  • It’s very important to keep your system updated so any Windows Update error has to be fixed quickly.
  • The update error 0x80245006 can have various reasons but usually, it’s caused by your antivirus.
  • This error code is prevalent on Windows 10 PCs.

Update error image Windows Update Something went wrong Windows 11

XINSTALL BY CLICKING THE DOWNLOAD FILE

Repair all errors caused by Windows Updates with Restoro:Restoro is an excellent repairing tool when some of your crucial system files get broken after an update from Windows. The tool has a repository with the initial versions of Windows system files and will replace the bad ones with working copies through a reverse algorithm. Fix system errors and remove viruses now in 3 easy steps:

  1. Download Restoro PC Repair Tool that comes with Patented Technologies (patent available here).
  2. Click Start Scan to find broken files that are causing the problems.
  3. Click Repair All to fix issues affecting your computer’s security and performance
  • Restoro has been downloaded by 0 readers this month.

Every operating system needs to be updated in order to protect you from threats, but it seems that some Windows 10 users are having problems with updating Windows 10.

Downloading updates is important if you want to keep your computer safe and receive new features for your operating system.

Since updates are so important you can see why update error 0x80245006 can cause so much trouble by preventing the download of Windows 10 updates.

Not only that your system could become vulnerable, but at the same time you might miss new features that Microsoft is developing for Windows 10. So how can you fix update error 0x80245006 on Windows 10?

How can I fix Update Error 0x80245006?

In this article

  • How can I fix Update Error 0x80245006?
  • 1. Check your proxy settings
  • 2. Use the Windows Update troubleshooter
  • 3. Check your antivirus software
  • 4. Check if the necessary services are running
  • 5. Disable certain services using Command Prompt
  • 6. Perform a Clean boot
  • 7. Remove AdFender software
  • 8. Perform SFC and DISM scans
  • 8.1 Perform a SFC scan
  • 8.2 Run a DISM scan
  • What are some variations of this error code?

1. Check your proxy settings

  1. Search for internet options and select it from the results.
  2. Click Connections tab and then click on LAN Settings.
    Code: 0x80245006 Windows Store
  3. Click Advanced.
    Windows 8.1 error 80245006
  4. Find the Do not use proxy server for addresses beginning with input field and enter the following addresses into it:
    • .windowsupdate.com;
    • .microsoft.com;
    • .windows.com;
      Server 2016 0x80245006

Save your changes. You might have to restart your computer before the changes are applied.

2. Use the Windows Update troubleshooter

Many users experienced error 0x80245006 while trying to download Windows Updates. This problem can prevent you from downloading any new updates and leave your computer vulnerable.

However, you might be able to fix the problem by using the Windows Update troubleshooter.

This is a small tool created by Microsoft that can scan your PC and fix many update-related issues. The tool is simple to use and in order to use it, you just have to download and run it on your PC.

You can download Windows Update Troubleshooter from Microsoft’s website for free.

After running the troubleshooter, check if the problem with Windows Update still persists.

3. Check your antivirus software

Using antivirus software is rather important, but sometimes this software can interfere with Windows 10 and cause the 0x80245006 error to appear.

To fix the problem, you need to open your antivirus application and try disabling certain features in and see if that solves the problem.

It’s possible that your antivirus firewall is blocking Windows Update by accident, so try disabling it and check if that solves the issue.

If you can’t fix the problem, you can also try disabling your antivirus temporarily. In some cases, the only way to fix the problem is to remove your antivirus.

Keep in mind that removing your antivirus can leave your system vulnerable, so if your antivirus is the problem, we advise you to switch to a different antivirus solution.

There are many great antivirus applications on the market that do not interfere with your system but also provide cloud-enabled security, as well as ransomware and anti-threat protection.

4. Check if the necessary services are running

  1. Press Windows Key + R and enter services.msc. Now press Enter or click OK.
    Windows Update fail 0x80245006
  2. Locate Background Intelligent Transfer Service and check its status. If the service status isn’t set to Running, right click on it and choose Start from the menu.
    Code: 0x80245006 Windows Store
  3. Repeat the previous step for Windows Update and Workstation services. After doing that, close the Services window.

5. Disable certain services using Command Prompt

  1. Search for cmd and click on Run as administrator to start Command Prompt.
  2. Enter the following commands:

net stop wuauserv

net stop cryptSvc

net stop bits

Some PC issues are hard to tackle, especially when it comes to corrupted repositories or missing Windows files. If you are having troubles fixing an error, your system may be partially broken.
We recommend installing Restoro, a tool that will scan your machine and identify what the fault is.
Click here to download and start repairing.

net stop msiserver

ren C:WindowsSoftwareDistribution SoftwareDistribution.old

ren C:WindowsSystem32catroot2 catroot2.old

net start wuauserv

net start cryptSvc

net start bits

net start msiserver

pause

After all the commands are executed, close Command Prompt and restart your PC. Once the PC restarts, check if the problem is resolved. Several users reported that this solution fixed the problem for them so be sure to try it out.

6. Perform a Clean boot

  1. Press Windows Key + R, enter msconfig and press Enter or click OK.
    Windows Update fail 0x80245006
  2. Go to the Services tab and check Hide all Microsoft services. Now click on Disable all.
    Code: 0x80245006 Windows Store
  3. Navigate to the Startup tab and click on Open Task Manager.
    Windows 8.1 error 80245006
  4. Right-click the first item on the list and choose Disable from the menu. Repeat this step for all startup applications on the list.
    Server 2016 0x80245006
  5. Close Task Manager and go back to the System Configuration window. Click on Apply and OK to save changes and restart your PC.
    Windows Update fail 0x80245006

One your PC restarts, check if the problem still appears. If not, it means that one of startup applications or services was interfering with Windows Update.

To find the problematic application, you need to enable services one by one or in groups in order to find the problematic application. Keep in mind that you need to restart your PC to apply changes after enabling a group of applications or services.

Once you find the problematic application or service, make sure that you disable it, delete it or update it in order to permanently solve the problem.

If Clean boot doesn’t help, you should consider removing any recently installed applications and check if that solves the problem.

7. Remove AdFender software

AdFender is a system-wide adblocking software that allows you to use Microsoft Edge without ads. Although this tool sounds great, it has been discovered by users that this tool has one major flaw.

According to users, AdFender will block Windows updates, so you won’t be able to update your Windows 10.

As you can see, AdFender is the cause of 0x80245006 update error and the only solution is to remove AdFender if you have it installed.

There are several methods for removing an application, but the most effective is to use specialized uninstaller software. These tools will completely remove any application and leftover from your computer. If you don’t use AdFender, you should check out our next solution.

8. Perform SFC and DISM scans

8.1 Perform a SFC scan

  1. Open Command Prompt as shown in solution number 6.
  2. Enter sfc /scannow and press Enter to run the command.
    Server 2016 0x80245006
  3. This process can take up to 15 minutes, so don’t interrupt it.
  4. Once the scan is finished, check if the problem still appears.

8.2 Run a DISM scan

  1. Start Command Prompt as administrator.
  2. Now enter the following command and press Enter: DISM /Online /Cleanup-Image /RestoreHealthWindows 8.1 error 80245006
    1. The scan can take about 20 minutes or more, so be sure not to interrupt it.

Once the DISM scan has finished, check if the problem is resolved. If the issue still persists, or if you were unable to run an SFC scan before, be sure to repeat the SFC scan once again and check if that solves the problem.

What are some variations of this error code?

Error 0x80245006 can appear in various circumstances, and speaking of this error, these are some of the most common problems that users reported:

  • Windows Update fail 0x80245006 – Occurs while trying to use Windows Update. Try running the Windows Update Troubleshooter or check your proxy settings.
  • Code: 0x80245006 Windows Store – If you encounter this error, make sure that your antivirus isn’t interfering with your network connection. Also, try disabling startup applications on your PC.
  • Windows 8.1 error 80245006 – This error can appear on any version of Windows and both Windows 10 and Windows 8.1 users reported it. However, the solutions are almost the same for both versions.
  • Server 2016 0x80245006 – This problem can also appear in Windows Server 2016, and if you encounter it, you should be able to fix it using one of our solutions.

We hope that our guide helped you fix the Windows Update error 0x80245006 on your PC. Let us know which solution worked best.

newsletter icon

Понравилась статья? Поделить с друзьями:
  • Vbox код ошибки e fail 0x80004005
  • Vbe7 dll office 2016 ошибка
  • Vba эксель ошибка 1004
  • Vba убрать сообщение об ошибке
  • Vba сообщение при ошибке