3,804 questions with C++-related tags

Sort by: Updated
1 answer

How to assign a letter to a vhdx disk without getting it listed?

One way I know to assign a letter to a vhdx disk is using the winapi AddAcessPath but to it work, first i need to attach the disk. Even attaching the disk with the flag ATTACH_VIRTUAL_DISK_FLAG_NO_DRIVE_LETTER, when it receives a letter it shows a shell…

C++
C++
A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
3,804 questions
asked 2024-12-21T01:06:36.7066667+00:00
Laila 20 Reputation points
edited an answer 2024-12-22T15:09:42.2133333+00:00
RLWA32 46,191 Reputation points
1 answer

How do I use Header Units with the Windows Desktop Application default template and resolve conflicts with headers?

I am trying to use Header Units in a Desktop Application, but am getting problems with headers, and the .ifc file. Problems with gdi, and DirectX header includes : C:\Program Files (x86)\Windows Kits\10\Include\10.0.22000.0\um\GdiplusEnums.h(27,13):…

Windows
Windows
A family of Microsoft operating systems that run across personal computers, tablets, laptops, phones, internet of things devices, self-contained mixed reality headsets, large collaboration screens, and other devices.
5,647 questions
Windows API - Win32
Windows API - Win32
A core set of Windows application programming interfaces (APIs) for desktop and server applications. Previously known as Win32 API.
2,699 questions
C++
C++
A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
3,804 questions
asked 2024-12-13T23:41:21.97+00:00
CDev-8220 220 Reputation points
commented 2024-12-22T14:41:30.74+00:00
Darran Rowe 1,221 Reputation points
1 answer

How to completly remove a virtual disk created?

I'm experiencing the same problem seen on this question, i have a lot of vhdx disk listed that seens that are not being properly "removed", even after detaching and deleting them. There's no answer on the mentioned question as the OP…

C++
C++
A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
3,804 questions
asked 2024-12-21T21:48:14.33+00:00
Laila 20 Reputation points
answered 2024-12-22T10:52:03.19+00:00
RLWA32 46,191 Reputation points
1 answer

How do I filter GPUs by type in DXGI (integrated vs dedicated device)?

Hello! I have written an extension for the Elgato Stream Deck using C++ and Microsoft DXGI (available here) that queries the utilization of the user's GPU and displays it on the Stream Deck. I need to be able to filter out integrated GPUs and only…

Windows API - Win32
Windows API - Win32
A core set of Windows application programming interfaces (APIs) for desktop and server applications. Previously known as Win32 API.
2,699 questions
C++
C++
A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
3,804 questions
asked 2024-12-21T04:19:39.06+00:00
Noah Thompson 0 Reputation points
edited a comment 2024-12-22T09:37:55.2+00:00
Castorix31 86,396 Reputation points
1 answer

How can I create a Gaussian blur with a printer render target using Direct2D?

I am using Direct2D to generate diagrams. I want to create a glow-effect around diagram boxes, using Gaussian blur. In order to do this, I paint a rectangle to an off-screen render target, blur it, and then get the off-screen render target's bitmap and…

Windows API - Win32
Windows API - Win32
A core set of Windows application programming interfaces (APIs) for desktop and server applications. Previously known as Win32 API.
2,699 questions
C++
C++
A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
3,804 questions
asked 2024-12-16T17:04:06.37+00:00
simonx 126 Reputation points
commented 2024-12-21T23:10:52.6533333+00:00
Castorix31 86,396 Reputation points
1 answer One of the answers was accepted by the question author.

Basic <thread> library functions not working!

I was trying to create a code with threads, but it won't let me do that kind of thing. The this_thread and thread global is non-accessible for creating new threads and ::sleep_for functions. I am pretty new to vs code so please help me. This is also not…

C++
C++
A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
3,804 questions
asked 2024-12-20T21:23:31.37+00:00
The Codeler 40 Reputation points
commented 2024-12-21T01:00:03.03+00:00
Darran Rowe 1,221 Reputation points
1 answer

Issue while Writing\Updating .ini files using RegSetValueEx\WritePrivateProfileString

I’m encountering an issue while updating an INI file. Initially, I attempted to write the value to the registry and then update the INI file using the RegSetValueEx() WinAPI. Although the function executes without returning any errors, the value is not…

Windows API - Win32
Windows API - Win32
A core set of Windows application programming interfaces (APIs) for desktop and server applications. Previously known as Win32 API.
2,699 questions
C++
C++
A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
3,804 questions
asked 2024-12-17T05:51:39.31+00:00
Sreekanth N Kartha 0 Reputation points
commented 2024-12-20T17:44:10.75+00:00
RLWA32 46,191 Reputation points
1 answer One of the answers was accepted by the question author.

cin sometimes compiling and never working.

I'm trying to figure out how to use vs code, but stupid thing is mad at me. When I put in this code: #include <iostream> using namespace std; int main() { cout << "Hello world!"; int x; cin >> x; cout…

C++
C++
A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
3,804 questions
asked 2024-12-20T04:51:05.96+00:00
The Codeler 40 Reputation points
accepted 2024-12-20T17:03:34.42+00:00
The Codeler 40 Reputation points
2 answers

How to avoid minimize on show desktop or peek desktop from an application.

Hi, I am trying to create a desktop widget like application which need to be visible on desktop at all times. To hide it from taskbar and alt + tab menu I am using WS_EX_TOOLWINDOW window style. The problem is the application is minimized when using Peek…

Windows API - Win32
Windows API - Win32
A core set of Windows application programming interfaces (APIs) for desktop and server applications. Previously known as Win32 API.
2,699 questions
C++
C++
A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
3,804 questions
asked 2024-12-06T18:42:36.9766667+00:00
Bhushan Kolhe 0 Reputation points
commented 2024-12-20T09:04:26.61+00:00
RLWA32 46,191 Reputation points
0 answers

Information not available, no symbols loaded for AppxPackaging.dll

Hi guys, I want to validate AppxBlockMap.xml through AppxSignature.p7x. I used IAppxFactory::CreateValidatedBlockMapReader method (appxpackaging.h) to validate the blockmap. When I debuged my code, the result seems good. But I noticed there are…

Windows API - Win32
Windows API - Win32
A core set of Windows application programming interfaces (APIs) for desktop and server applications. Previously known as Win32 API.
2,699 questions
C++
C++
A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
3,804 questions
asked 2024-12-09T04:11:02.1666667+00:00
Tran Thi Hieu Ngan 0 Reputation points
commented 2024-12-20T02:40:45.4033333+00:00
Roy Li - MSFT 33,491 Reputation points Microsoft Vendor
1 answer

What is the reason for a behavior change observed in a C program in VS2019 (compared to VS2017)?

Given is the following well defined C90/C99 program test.c (please assume C, not C++!) : #include <stdio.h> void* p1; void* p2; int i[2][2]={{1,2},{3,4}}; int main(void) { p1 = (void*)&i[0]; p2 = (void*)&*(int(*)[2])p1; …

Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
5,304 questions
C++
C++
A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
3,804 questions
asked 2024-12-06T20:16:08.1366667+00:00
schroeder 0 Reputation points
commented 2024-12-19T11:10:08.7266667+00:00
Darran Rowe 1,221 Reputation points
1 answer

can anyone help with downloading microsoft visual c++ 2022 x86 minimum runtime 14.38.33130???

[4CAC:6540][2024-12-14T01:46:53]i001: Burn v3.14.1.8722, Windows v10.0 (Build 22631: Service Pack 0), path: C:\Users\ricar\AppData\Local\Temp{494CE8F4-7595-494D-BF0D-28EB85731EF4}.cr\VC_redist.x86 (4).exe [4CAC:6540][2024-12-14T01:46:53]i009: Command…

Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
5,304 questions
C++
C++
A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
3,804 questions
asked 2024-12-14T09:55:27.9+00:00
Ricardo Quizonmendoza 0 Reputation points
commented 2024-12-19T04:26:06.57+00:00
Anna Xiu-MSFT 30,291 Reputation points Microsoft Vendor
1 answer

Dialog box before launching of application in winui3 c++/winrt

I am working in winui3 c++/winrt and I need to show a dialog box just before the launch of my application The dialog box will say OK and Cancel on click of OK we launch the application and on cancel we exit. I tried a few approaches but it is giving…

Windows App SDK
Windows App SDK
A set of Microsoft open-source libraries, frameworks, components, and tools to be used in apps to access Windows platform functionality on many versions of Windows. Previously known as Project Reunion.
804 questions
C++
C++
A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
3,804 questions
XAML
XAML
A language based on Extensible Markup Language (XML) that enables developers to specify a hierarchy of objects with a set of properties and logic.
824 questions
asked 2024-12-18T06:27:05.37+00:00
Vivek Rao 20 Reputation points
commented 2024-12-19T03:39:58.98+00:00
Junjie Zhu - MSFT 19,741 Reputation points Microsoft Vendor
1 answer One of the answers was accepted by the question author.

PROJECT WONT RETARGET SDK VERSION AND CANT DETECT SDK

I HAVE TRIED EVERYTHING TO FIX THIS ISSUE, I AM UNABLE TO BUILD C++ PROJECTS EVERYTIME I GET THE SAME ERROR : "The Windows SDK version 10.0.20348.0 was not found. Install the required version of Windows SDK or change the SDK version in the project…

Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
5,304 questions
C++
C++
A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
3,804 questions
Visual Studio Setup
Visual Studio Setup
Visual Studio: A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.Setup: The procedures involved in preparing a software program or application to operate within a computer or mobile device.
1,068 questions
asked 2024-12-18T05:36:36.5833333+00:00
gavin 20 Reputation points
commented 2024-12-18T09:30:33.1133333+00:00
gavin 20 Reputation points
0 answers

user32.dll!UserCallWinProcCheckWow()

My MFC embed WPF, and sometimes I want to show a WPF dialog, it will crash. I find below difference, and want to know when execute the two functions. there is not parameter in the crashed call stack: user32.dll!UserCallWinProcCheckWow() there are…

Windows API - Win32
Windows API - Win32
A core set of Windows application programming interfaces (APIs) for desktop and server applications. Previously known as Win32 API.
2,699 questions
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
11,146 questions
C++
C++
A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
3,804 questions
asked 2024-12-16T10:36:24+00:00
Jin Yang 20 Reputation points
commented 2024-12-18T02:10:39.13+00:00
Minxin Yu 12,341 Reputation points Microsoft Vendor
1 answer One of the answers was accepted by the question author.

How to create, attach, format, mount and assign a letter to a VHD/VHDX?

I'm trying to programmatically create a VHD/VHDX and perform the same "steps" seen on this vbscript. Using C++, WINAPI without relying on diskpart: diskpartScriptPath = fso.GetSpecialFolder(2) & "\diskpart.txt" Set…

C++
C++
A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
3,804 questions
asked 2024-12-12T21:29:30.64+00:00
Laila 20 Reputation points
edited a comment 2024-12-17T17:32:55.73+00:00
Laila 20 Reputation points
0 answers

Question about Using SetFileCompletionNotificationModes with IOCP in Non-blocking Winsock Operations

Hello everyone, I'm currently working on a project where I am using WinSock to create both UDP and TCP sockets. The sockets are set in non-blocking mode using ioctl, and I am using overlapped operations with an I/O Completion Port (IOCP) to handle…

Windows API - Win32
Windows API - Win32
A core set of Windows application programming interfaces (APIs) for desktop and server applications. Previously known as Win32 API.
2,699 questions
C++
C++
A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
3,804 questions
asked 2024-12-16T10:09:09.4833333+00:00
Harshal Goyal 0 Reputation points
commented 2024-12-17T05:36:01.9566667+00:00
Jeanine Zhang-MSFT 10,046 Reputation points Microsoft Vendor
1 answer One of the answers was accepted by the question author.

How to call dism /apply-image using the dism api?

I have installed the Windows ADK and i'm trying to programmatically reproduce the same call from this command: dism /apply-image /imagefile:E:\sources\install.esd /index:6 /applydir:F:\ Looking at the DISM API Functions and also directly on the…

C++
C++
A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
3,804 questions
asked 2024-12-15T21:36:21.7633333+00:00
Masa Yuilki 40 Reputation points
commented 2024-12-16T11:11:53.8166667+00:00
Darran Rowe 1,221 Reputation points
0 answers

Is it safe to use multithreading with DISM APIs to remove multiple items from an image simultaneously?

I didn't find anything on the documentation if its safe to perform multithreaded calls to DismRemovePackage, DismRemoveCapability, DismDisableFeature, i mean, remove multiple "things" from the image at once. Also, i tried to follow the…

C++
C++
A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
3,804 questions
asked 2024-12-15T22:58:37.62+00:00
Masa Yuilki 40 Reputation points
edited the question 2024-12-16T05:34:16.8766667+00:00
Masa Yuilki 40 Reputation points
1 answer One of the answers was accepted by the question author.

CStdioFile::ReadString does not correctly read Unicode text file

While reading a UTF-8 text file in a Unicode C++ build, the CStdioFile::ReadString method fails to read certain Unicode characters correctly. For example, “John W. Gates” Day, is read as “John W. Gates” Day. In memory I see this: 0x000001B291ADC258 …

C++
C++
A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
3,804 questions
asked 2024-12-15T01:29:13.58+00:00
semicode 40 Reputation points
commented 2024-12-15T16:43:10.5266667+00:00
Viorel 118.6K Reputation points