5#include <QtBluetooth/private/qtbluetoothglobal_p.h>
6#include <QtCore/private/qfunctions_winrt_p.h>
7#include <QtCore/QLoggingCategory>
11#include <winrt/windows.foundation.metadata.h>
12#include <windows.storage.streams.h>
15using namespace Microsoft::WRL::Wrappers;
16using namespace winrt::Windows::Foundation::Metadata;
31 RETURN_IF_FAILED(
"Could not cast buffer",
return QByteArray())
33 hr = byteAccess->Buffer(
reinterpret_cast<byte **
>(&
data));
34 RETURN_IF_FAILED(
"Could not obtain buffer data",
return QByteArray())
37 RETURN_IF_FAILED(
"Could not obtain buffer size",
return QByteArray())
40 return valueString.
toUtf8();
52 qCWarning(QT_BT_WINDOWS) <<
"Main thread COM init tried from another thread";
57 qCWarning(QT_BT_WINDOWS) <<
"Multiple COM inits by same object";
62 if (!SUCCEEDED(CoInitializeEx(NULL, COINIT_APARTMENTTHREADED))) {
63 qCWarning(QT_BT_WINDOWS) <<
"Unexpected COM initialization result";
74 qCWarning(QT_BT_WINDOWS) <<
"Main thread COM uninit tried from another thread";
79 qCWarning(QT_BT_WINDOWS) <<
"COM uninitialization without initialization";
static QCoreApplication * instance() noexcept
Returns a pointer to the application's QCoreApplication (or QGuiApplication/QApplication) instance.
\macro QT_RESTRICTED_CAST_FROM_ASCII
static QString fromUtf16(const char16_t *, qsizetype size=-1)
QString left(qsizetype n) const
Returns a substring that contains the n leftmost characters of the string.
QByteArray toUtf8() const &
static QThread * currentThread()
void qErrnoWarning(const char *msg,...)
Combined button and popup list for selecting options.
static QSet< void * > successfulInits
QT_BEGIN_NAMESPACE QByteArray byteArrayFromBuffer(const ComPtr< NativeBuffer > &buffer, bool isWCharString)
void mainThreadCoInit(void *caller)
void mainThreadCoUninit(void *caller)
ABI::Windows::Storage::Streams::IBuffer NativeBuffer
#define qCWarning(category,...)
#define Q_DECLARE_LOGGING_CATEGORY(name)
GLenum GLuint GLintptr GLsizeiptr size
[1]
GLint GLsizei GLsizei GLenum GLenum GLsizei void * data