Windows error 0x80010106, -2147417850

Detailed Error Information

RPC_E_CHANGED_MODE[1]

MessageCannot change thread mode after it is set.
Declared inwinerror.h

HRESULT analysis[2]

FlagsSeverityFailure
Reserved (R)false
OriginMicrosoft
NTSTATUSfalse
Reserved (X)false
FacilityCode1 (0x001)
NameFACILITY_RPC[2][1]
DescriptionThe source of the error code is an RPC subsystem.[2][1]
Error Code262 (0x0106)

Questions

16votes
1answer

"Swing-Shell" java.lang.InternalError: Could not initialize COM: HRESULT=0x80010106

I have a Java 9 app that I'm trying to package for the Windows Store. The strange thing is that it works as expected when I run the exe-launcher directly, but I get the following strange error when I run the launcher via the APPX package: Exception in thread "Swing-Shell" [...] read more
windows-store
java-9
desktop-bridge
9votes
3answers

COM library Initialization failed with code 0x80010106 in C#

I was trying to push data manually to NT using c# but i was getting an error as: "Failed to initialize COM library(0x80010106)." I have already added the reference 'Ninjatrader.Client.dll' I am posting my code as below: using System; using System.Runtime.InteropServices; using System.Threading; using System.Diagnostics; namespace read_file { public static [...] read more
c#
7votes
2answers

QCoreApplication QApplication with WMI

I found some WMI C++ Application Examples in MSDN website. I have tried the code form the below link http://msdn.microsoft.com/en-us/library/aa390423%28v=VS.85%29.aspx when I copied and run the application as win32 console application it worked well. the same code I put into the Qt application , When I use QApplication anApplication ( [...] read more
c++
qt
wmi
6votes
2answers

WindowsContext: OleInitialize() failed: "COM error 0x80010106 RPC_E_CHANGED_MODE (Unknown error 0x0ffffffff80010106)"

I'm programming in python 3.4.4 (32 bits), in windows 8. I'm running an app with PyQt5, the app was working well, but since i installed pywinauto 0.6.4 to set the focus on other app with: other_app = pywinauto.Application().connect(process=int(code)) other_app.top_window().set_focus() if i run My_app = QApplication(sys.argv), in console appears the next [...] read more
python
pyqt5
pywinauto
4votes
0answers

COM related Exception 0x80010106 (Cannot change thread mode after it is set) when calling CurrentApp:LicenseInformation->IsActive

When I run the Windows Phone 8 project it crashes on this line: CurrentApp::LicenseInformation->IsActive; The error message is Microsoft C++ exception: Platform::COMException ^ at memory location 0x00ABE848. HRESULT:0x80010106 (Cannot change thread mode after it is set). The error code is detailed here http://support.microsoft.com/kb/824480 but I don't understand what I can [...] read more
c++
exception
com
windows-runtime
windows-phone-8
2votes
1answer

How do I use WebView2 in a console application

string text = "return 'test';"; var webView = new Microsoft.Web.WebView2.WinForms.WebView2(); webView.EnsureCoreWebView2Async(null).RunSynchronously(); var srun = webView.CoreWebView2.ExecuteScriptAsync(text); When I run the above code EnsureCoreWebView2Async is getting this exception > "Cannot change thread mode after it is set. (Exception from HRESULT: > 0x80010106 (RPC_E_CHANGED_MODE))" i What do I need to do to run [...] read more
c#
webview2
2votes
1answer

C# Microsoft InformationProtection decryption error when invoking AzureInformationProtection powershell commands

I'm in the process of developing a C# tool that automates PowerShell calls to the AzureInformationProtection client. The code in the main function is as follows: if (Path.GetExtension(f) != ".msg") { VerboseOutput("Info", "operations:file:scanning:file is not an email"); // grab file public properties and retrieve file owner string FileOwner = RetrieveFileOwner(f); [...] read more
c#
powershell
runtime-error
azure-information-protection
2votes
1answer

How to get the main thread of a console app to be MTA?

With Delphi, how can I create a (Windows) console application that has a main thread that is initialized as COINIT_MULTITHREADED? If I call CoInitializeEx(nil, COINIT_MULTITHREADED) in the very first statement, I get a HRESULT 0x80010106 (Cannot change thread mode after it is set), so obviously some previously running code already [...] read more
delphi
com
apartments
apartment-state
1vote
1answer

Parallel using of WebView2 in async Task

I have simple default Windows desktop form Form1 with one button btn_Go as a test. I want to run multiple parallel WebView2 instances and process html code from rendered page. To run WebView2 in parallel I use SemaphoreSlim (set to parallel 2). Another SemaphoreSlim is used for wait until WebView2 [...] read more
c#
multithreading
parallel-processing
semaphore
webview2
1vote
1answer

python-vlc doesn't play audio/video from .py file

I want to make mediaplayer, I choosed python-vlc library, but I don't know why I can't play audio/video from .py file. If I tried make it with cmd and Python Shell all working: >>> import vlc >>> my_player = vlc.MediaPlayer("d:/Music/song.flac") >>> my_player.play() 0 I write same in .py file: import [...] read more
python-3.x
libvlc
python-vlc
1vote
1answer

Python QT Application with vlc does not show fullscreen

I am working on an application where several vlc streams (rtsp) are shown and by double-clicking one of them, the stream should be displayed fullscreen. The application is python 3.7 using pyqt5 and vlc-qt. Code as follows: import sys import vlc from PyQt5.QtCore import * from PyQt5.QtWidgets import * from [...] read more
python-3.x
qt
pyqt
fullscreen
vlc-qt
1vote
1answer

RequestProductPurchaseAsync throws “Cannot change thread mode after it is set”

I'm using monogame as a framework for games and I'm trying to implement a in-app-purchase-functionality in an UWP-App which throws an exception when I'm calling RequestProductPurchaseAsync. It states: > Cannot change thread mode after it is set. (Exception from HRESULT: 0x80010106 > (RPC_E_CHANGED_MODE)) at > Windows.ApplicationModel.Store.CurrentAppSimulator.RequestProductPurchaseAsync(String > productId) at Crocs_World__Xbox_Edition_.App.d__7.MoveNext() [...] read more
c#
uwp
monogame
1vote
1answer

Coinitialize ex is failing inside a WMI call in a JNI program stub

Environment: I have a JNI program which is made of the following pieces 1. C++ : Here I make use of WMI to return the running process details. The program is similar to the example in http://msdn.microsoft.com/en-us/library/aa390423(v=vs.85).aspx I have encompassed the entire code in the example with a JNI wrapper [...] read more
java-native-interface
wmi
0votes
2answers

How to play different sound consecutively and asynchronously in python?

To be specific, I need to play sound in a while loop which is fast to execute. And the audio needs to be played separately. I've tried various functions/libraries: playsound, winsound, vlc. But none of them meet my demand. Either the sounds are overlapped, or I need to wait for [...] read more
python
audio
playsound
winsound
0votes
1answer

Running video in Python using VLC and PyQt doesn't start

I'm trying to get a video to play in a frame in PyQt through VLC, I followed a similar question on here to get the sample code to use: class VideoPlayer(QMainWindow): def __init__(self, parent, inputPath): super(VideoPlayer, self).__init__(parent) self.setWindowTitle("Media Player") # creating a basic vlc instance self.instance = vlc.Instance() self.mediaplayer = [...] read more
python
pyqt
vlc
0votes
0answers

FileSystemWatcher-Event and Calls to Com-Objects in .net Core

I have code like this in an .net core C#-Library. It tries to monitor a directory and process files either becuase the user Refreshes or the file changes public class WatchedFolder private FileSystemWatcher _fileWatcher; public WatchedFolder(){ _fileWatcher = new FileSystemWatcher(@"C:\Myfolder", "*.txt") { NotifyFilter = NotifyFilters.LastWrite, }; _fileWatcher.Changed += OnFilewatcherChangedFile; } [...] read more
multithreading
.net-core
com
filesystemwatcher
0votes
1answer

Vlc won't work with framelesswindow and transparent/translucent background in PyQt5

i am making a window which plays video with vlc. Here is my code from PyQt5 import QtWidgets,QtCore,QtGui import vlc class Player(QtWidgets.QMainWindow): def __init__(self): super().__init__() self.resize(600,400) self.mainframe=QtWidgets.QFrame(self) self.setCentralWidget(self.mainframe) self.mainframe.setStyleSheet("background:grey;border-radius:15px;") self.videoframe=QtWidgets.QFrame(self.mainframe) self.videoframe.setGeometry(10,10,580,380) self.videoframe.setStyleSheet("background:#333333") ''' If i want to set transparent background and frameless window,video wont display only audio plays ''' # [...] read more
python
python-3.x
pyqt5
vlc
libvlc
0votes
1answer

Vlc list of ouput devices

import vlc Instance = vlc.Instance(['--no-xlib']) player = Instance.media_player_new() output_devices = [] mods = player.audio_output_device_enum() if mods: mod = mods while mod: mod = mod.contents output_devices.append(mod.device) mod = mod.next print(output_devices) When i run the code in ubuntu 20.04, i get: [b'surround21', b'surround40', b'surround41', b'surround50', b'surround51', b'surround71', b'null', b'samplerate', b'speexrate', b'jack', b'oss', [...] read more
python
vlc
0votes
0answers

Python vlc warning infrormation

# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'untitled.ui' # # Created by: PyQt5 UI code generator 5.15.0 # # WARNING: Any manual changes made to this file will be lost when pyuic5 is # run again. Do not edit this file unless you know [...] read more
python
pyqt5
vlc
0votes
1answer

My DLL using COM objects with COINIT_MULTITHREADED is no more working on Python 3.7

I'm using a C++ DLL with python which makes use of COM objects. I'm loading it with cdll.LoadLibray. My application was working fine with python 2.7. Now that I'm moving to Python 3.7 my C++ DLL fails when I call: CoInitializeEx(NULL,COINIT_MULTITHREADED) with error 0x80010106: Cannot change thread mode after it [...] read more
python
python-3.x
com
dynamic-dll-import

Comments

Leave a comment

(plain text only)

Sources

  1. winerror.h from Windows SDK 10.0.14393.0
  2. https://msdn.microsoft.com/en-us/library/cc231198.aspx

User contributions licensed under CC BY-SA 3.0