3,628 questions with C++-related tags

Sort by: Updated
0 answers

Getting wrong CPU Processor ID with __cpuid() in Win 11 systems

  Hello Friends,   I am facing an issue in getting CPU Processor ID with C++ code. I used __cpuid() function as below:   #include <iostream> #include <intrin.h>   int main() {                 unsigned __int32  regs[4];                       …

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,628 questions
Windows 11
Windows 11
A Microsoft operating system designed for productivity, creativity, and ease of use.
8,927 questions
asked 2024-07-19T10:06:54.6066667+00:00
Bhanodaya 0 Reputation points
commented 2024-07-19T16:04:45.6066667+00:00
Viorel 114.5K Reputation points
3 answers One of the answers was accepted by the question author.

Get deleted item from recyclebin

Task: I need to get deleted item having SHITEMID data. SHITEMID is defined as: typedef struct _ITEMIDLIST { SHITEMID mkid; }ITEMIDLIST; defined in C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\um\shtypes.h I have the following code to get…

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,628 questions
asked 2024-06-11T13:21:13.9233333+00:00
Flaviu_ 971 Reputation points
edited a comment 2024-07-19T11:06:13.05+00:00
Flaviu_ 971 Reputation points
0 answers

How to get the geolocation position based on the WiFi source always instead of the IPAddress

Hi, I would like to know how can I get the geolocation based on the WiFi source instead of the IP address. I was getting the geolocation based on the WiFi in last month in my Windows 11 system, but it started giving the geo location based on the IP…

Universal Windows Platform (UWP)
Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
4,869 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,628 questions
Windows 11
Windows 11
A Microsoft operating system designed for productivity, creativity, and ease of use.
8,927 questions
asked 2024-07-19T10:46:29.9333333+00:00
67883078 41 Reputation points
1 answer

How do I save ID2D1Bitmap as a file?

Bitmap and text were output to DIALOG using Direct2D. I tried to make this rendered screen into a bitmap and save it as a file. But, I get D2DERR_WRONG_RESOURCE_DOMAIN. Is there a way to transform ID2D1Bitmap to IWICBitmap? My goal is to use GDI+…

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,512 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,628 questions
asked 2024-07-08T05:39:14.6833333+00:00
채문석(jim) 41 Reputation points
commented 2024-07-19T01:14:48.2333333+00:00
Roy Li - MSFT 32,731 Reputation points Microsoft Vendor
1 answer

Can't read input from keyboard/mouse using Nuget GameInput lib on PC

Currently working with the latest version of Microsoft.GameInput version 0.2303.22621.3038. Using the follwing code, I'm able to read the axis values of a Logitech joystick IGameInputReading* reading; if…

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,628 questions
asked 2024-07-18T19:41:51.4866667+00:00
gabriel moreau 0 Reputation points
answered 2024-07-18T23:19:29.21+00:00
Castorix31 83,101 Reputation points
0 answers

C++/WinRT background task (non UWP)

Hi, I'm looking to create a win32 app utilizing WinRT to use UWP Background Task I tried to find some samples on the internet and I found two main "official" repos here …

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,512 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,628 questions
asked 2022-04-07T00:28:59.643+00:00
JafarM 1 Reputation point
commented 2024-07-18T21:09:18.1833333+00:00
Godly T. Alias 0 Reputation points
0 answers

how to fix error C++ command-line error: cannot open metadata file

I'm trying to make a windows form but in the premade C++ file it gives this error "C++ command-line error: cannot open metadata file." I did add a form and it worked perfectly but there was a bug that fixes when you delete it and make a new…

Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
4,869 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,628 questions
asked 2024-07-17T03:09:10.87+00:00
Kevin 0 Reputation points
edited a comment 2024-07-17T07:50:51.6966667+00:00
Viorel 114.5K Reputation points
0 answers

How to fix Expression: m_pAccessor != 0 Debug Assertion Failed!

Debug Assertion Failed! Program: C:\Windows\Microsoft.NET\Framework\v4.0.30319\clr.dll File: C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Tools\MSVC\14.39.33519\atlmfc\include\atldbcli.h Line: 5198 Expression: m_pAccessor != 0 For…

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.
10,625 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,628 questions
asked 2024-07-09T12:58:59.3533333+00:00
Shubham Kshirsagar 0 Reputation points
edited the question 2024-07-17T06:17:59.9+00:00
Roy Li - MSFT 32,731 Reputation points Microsoft Vendor
2 answers

DLLs that are only in older versions of Microsoft Visual C++

I got a program that apparently works with Microsoft Visual C++ 2013 installed. I came to this conclusion after installing all the versions I found here…

Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
4,869 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,628 questions
asked 2024-07-14T00:42:44.5266667+00:00
ERIC.DEUCHER 0 Reputation points
commented 2024-07-17T06:13:43.9166667+00:00
Tianyu Sun-MSFT 29,351 Reputation points Microsoft Vendor
1 answer

Can't Modify or Uninstall Visual C++ 2015-2019 (Causing Errors for Ableton Live Install)

Hello, My ultimate goal is to install the Ableton Live 11 trial. When I try to do that, I receive an error about it "already being installed" which the Ableton forums say may be an issue with Visual C++. I tried repairing all my versions of…

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,628 questions
Visual Studio Debugging
Visual Studio Debugging
Visual Studio: A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.Debugging: The act or process of detecting, locating, and correcting logical or syntactical errors in a program or malfunctions in hardware. In hardware contexts, the term troubleshoot is the term more frequently used, especially if the problem is major.
966 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,009 questions
asked 2022-11-20T21:21:19.34+00:00
Marina Kittaka 1 Reputation point
commented 2024-07-17T03:22:48.4+00:00
Tianyu Sun-MSFT 29,351 Reputation points Microsoft Vendor
1 answer

How to get the Native Activity App (Android)?

I wanted to create an app for android in visual studio community 2022, and all of the tutorials on youtube or internet talks about the template of native activity app or opengl-es app. Although i have installed mobile development with c++ but i cant see…

Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
4,869 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,628 questions
asked 2023-02-05T04:51:09.8+00:00
Sudhanshu Kr. Suman 25 Reputation points
commented 2024-07-16T19:20:51.0966667+00:00
Stephen Robinson 0 Reputation points
1 answer

Not able to reach even wWinMain in Windows Server Core Machine 2022

Hi, I am trying to run a C++ Win32 application with XAML Island as UI Library. I am able to run on normal desktop machines such as Windows 11 but when I try to run the same application on Windows Server core machine it failed and didn't even reach our…

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,512 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,628 questions
asked 2024-07-16T10:52:59.8866667+00:00
Shyam Butani 190 Reputation points
edited an answer 2024-07-16T14:38:43.69+00:00
Darran Rowe 561 Reputation points
1 answer One of the answers was accepted by the question author.

Help needed to retrieve the LogonType using Win32LogonSession class in C++

Hello, I am trying to use Win32LogonSession to retrieve the LogonType in my C++ code. However, I'm encountering several errors and I am unsure if I'm writing the correct code. Can anyone provide assistance? Thank you.

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,512 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,628 questions
asked 2024-07-12T06:19:11.6866667+00:00
Rohan Pande 420 Reputation points
commented 2024-07-15T09:18:10.4633333+00:00
Rohan Pande 420 Reputation points
3 answers One of the answers was accepted by the question author.

Can't Call MASM functions from CPP?

I recently started to Learn x64 MASM. I'm using Visual Studio 2022. I wrote a simple function in assembly .. .code funcCall proc ret funcCall endp end I tried calling it from C++ file: #include <iostream> extern "C" int funcCall(int…

Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
4,869 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,628 questions
asked 2024-07-14T04:31:57+00:00
Hritik Shahi 20 Reputation points
answered 2024-07-14T09:09:58.7333333+00:00
Bhai ka rola 0 Reputation points
1 answer One of the answers was accepted by the question author.

Should I set `activeCodePage` to `UTF-8` on both an EXE and its DLLs?

I’m currently working on contributing to Descent 3. Specifically, I’m trying to make sure that Descent 3 uses UTF-8 everywhere. I’ve already confirmed that Descent 3 has at least one character-encoding-related bug, and I suspect that it has more. One of…

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,628 questions
asked 2024-07-11T12:37:35.5833333+00:00
Jayman 110 Reputation points
accepted 2024-07-13T12:12:39.3766667+00:00
Jayman 110 Reputation points
2 answers

Some doubts regarding after registering for WinUI3 packaged with external location app?

Hi, I was earlier creating a WinUI3 blank unpackaged app. Followed the steps here to make my solution from packaged to unpackaged application. In this project I have disabled the XAML code and created my own entry point (WinMain). Steps that I have…

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.
749 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,628 questions
asked 2024-04-18T11:28:49.1633333+00:00
Rohan Pande 420 Reputation points
edited an answer 2024-07-12T09:14:55.4166667+00:00
Darran Rowe 561 Reputation points
5 answers

Which project template

Windows 11, Visual Studio 2022 I am having trouble finding a web page that provides some basic comparisons of the different template types.  The current need is a simple GUI for some number crunching.  There will be no graphics or pictures.  There will…

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,628 questions
asked 2024-07-06T04:33:59.53+00:00
Bryan Kelly 321 Reputation points
commented 2024-07-12T02:03:25.6333333+00:00
Minxin Yu 10,871 Reputation points Microsoft Vendor
1 answer

How to fix "module was not instrumented." Reason:"path_is_excluded" error in Microsoft.CodeCoverage.Console tool?

I'm receiving the following problem while trying to instrument my dll with Microsoft.CodeCoverage.Console tool. module was not instrumented. Reason: path_is_excluded." I'm using Microsoft.CodeCoverage.A console tool for calculating code coverage.…

.NET
.NET
Microsoft Technologies based on the .NET software framework.
3,623 questions
Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
4,869 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,628 questions
Visual Studio Testing
Visual Studio Testing
Visual Studio: A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.Testing: The act or process of applying tests as a means of analysis or diagnosis.
337 questions
asked 2024-06-13T06:50:10.2966667+00:00
R M 0 Reputation points
commented 2024-07-11T05:08:11.25+00:00
R M 0 Reputation points
1 answer One of the answers was accepted by the question author.

What is MSVC’s default execution character set?

According to MSVC’s documentation, I can use the /execution-charset option to change which execution character set a program uses. Let’s say that I don’t use the /execution-charset option. What execution character set will MSVC use by default? 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,628 questions
asked 2024-07-09T23:31:29.6366667+00:00
Jayman 110 Reputation points
accepted 2024-07-10T17:58:06.3333333+00:00
Jayman 110 Reputation points
1 answer One of the answers was accepted by the question author.

GameInput issues with detecting input when Xbox controller is connected via bluetooth

Hi, I was following the tutorials on utilising GameInput, a component of GDK (from here https://video2.skills-academy.com/en-us/gaming/gdk/_content/gc/input/overviews/input-fundamentals) and noticed that if I have a controller connected via bluetooth 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,628 questions
Windows Driver Kit (WDK)
Windows Driver Kit (WDK)
A set of Microsoft tools that are used to develop, test, and deploy Windows drivers.
52 questions
asked 2024-07-09T12:02:48.8133333+00:00
Alan Walker 20 Reputation points
accepted 2024-07-10T12:05:15.6966667+00:00
Alan Walker 20 Reputation points