3,634 questions with C++-related tags

Sort by: Updated
1 answer

When using the Win32 GetAppliedGPOList in C, the GPO list pointer is always NULL even when trying multiple GUIDs and even when the API returns success.

In the code below, pGPOList (the GPO list) is always NULL even when the GetAppliedGPOList returns success. I have tried multiple group policy extension GUIDs, but no luck. What am I doing wrong? This also happens when I try GetAppliedGPOList with user…

Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
4,883 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,519 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,634 questions
asked 2024-07-24T12:56:07.7066667+00:00
Madden, John 0 Reputation points
commented 2024-07-25T12:54:14.11+00:00
Madden, John 0 Reputation points
1 answer

CPP -- error CS5001: Program does not contain a static 'Main' method suitable for an entry point

Hi, Getting this error on a C++ application: error CS5001: Program does not contain a static 'Main' method suitable for an entry point: Tried adding this: (no luck...) public static void Main() { }

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,634 questions
asked 2024-07-25T09:47:57.83+00:00
edited the question 2024-07-25T12:47:04.83+00:00
Anna Xiu-MSFT 27,816 Reputation points Microsoft Vendor
2 answers

Visual C++ (VS 17.10.4) don't show template errors

After updating to the latest version of the studio, error output stopped appearing when compiling templates. That in a project with several thousand files makes work almost impossible. What do I 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,883 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,634 questions
asked 2024-07-20T15:44:40.9566667+00:00
Никольский Данил 0 Reputation points
answered 2024-07-25T09:00:39.6866667+00:00
Tianyu Sun-MSFT 29,446 Reputation points Microsoft Vendor
1 answer

Visual Studio 2022 not saving changes.

I have been trying to build a simple reverse string function in C++ but visual studio is not letting me save my work. It notifys me of build errors but I know there are none. Im testing with simple print statements. Every time my actions go like this. I…

Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
4,883 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,634 questions
asked 2023-03-02T21:43:48.9666667+00:00
Alex Trial 10 Reputation points
commented 2024-07-24T23:31:24+00:00
Swing, Tyson 0 Reputation points
2 answers One of the answers was accepted by the question author.

win32 When trying to convert string to LPCWSTR, the result is Japanese characters

I want to make what key the user presses added to a string and then displayed in SetWindowText, but the output is Chinese characters case WM_CHAR: { ifpressed; static std::string getwparam; getwparam.push_back( wParam ); SetWindowText(hwnd,…

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,519 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,634 questions
asked 2024-07-23T23:57:51.72+00:00
someone 20 Reputation points
accepted 2024-07-24T21:47:57.5966667+00:00
someone 20 Reputation points
4 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,634 questions
asked 2024-06-11T13:21:13.9233333+00:00
Flaviu_ 971 Reputation points
commented 2024-07-24T15:50:25.3433333+00:00
RLWA32 43,146 Reputation points
1 answer One of the answers was accepted by the question author.

Thumbnail Preview Title Icon

Is it possible to customize/modify the icon showed in the title bar of a thumbnail? For example, if a window doesn't have an icon in the title bar, its thumbnail does display an icon... the standard application icon (please see attachments). Is there any…

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,519 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,634 questions
asked 2024-07-23T13:44:15.57+00:00
Pedro Gil 30 Reputation points
commented 2024-07-23T20:08:22.2133333+00:00
Pedro Gil 30 Reputation points
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,634 questions
asked 2024-07-18T19:41:51.4866667+00:00
gabriel moreau 0 Reputation points
commented 2024-07-23T18:51:01.34+00:00
Castorix31 83,201 Reputation points
1 answer

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)
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,634 questions
Windows 11
Windows 11
A Microsoft operating system designed for productivity, creativity, and ease of use.
8,981 questions
asked 2024-07-19T10:46:29.9333333+00:00
67883078 41 Reputation points
edited the question 2024-07-23T09:22:07.28+00:00
Tianyu Sun-MSFT 29,446 Reputation points Microsoft Vendor
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,519 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,634 questions
asked 2024-07-08T05:39:14.6833333+00:00
채문석(jim) 41 Reputation points
commented 2024-07-23T01:42:12.7766667+00:00
Roy Li - MSFT 32,731 Reputation points Microsoft Vendor
1 answer

Can't reverse back to shortpath?

Hi, I have this folder path in short-form like this C:\Users\admin\Downloads\NEWFOL~2\NEWFOL~1\...\NEWFOL~1 using GetLongPathName, then I have C:\Users\admin\Downloads\New folder (2) - Copy - Copy test\New folder\...\New folder but now using…

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,519 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,634 questions
asked 2024-07-21T22:47:39.6433333+00:00
DangDKhanh-2637 946 Reputation points
edited an answer 2024-07-22T10:28:06.0333333+00:00
David Lowndes 2,510 Reputation points MVP
2 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,634 questions
Windows 11
Windows 11
A Microsoft operating system designed for productivity, creativity, and ease of use.
8,981 questions
asked 2024-07-19T10:06:54.6066667+00:00
Bhanodaya 0 Reputation points
answered 2024-07-22T08:41:43.1766667+00:00
Gary Nebbett 5,851 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,883 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,634 questions
asked 2024-07-17T03:09:10.87+00:00
Kevin 0 Reputation points
commented 2024-07-22T02:01:13.28+00:00
Minxin Yu 10,951 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,883 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,634 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,010 questions
asked 2024-07-14T00:42:44.5266667+00:00
ERIC.DEUCHER 0 Reputation points
edited the question 2024-07-22T01:43:01.9566667+00:00
Tianyu Sun-MSFT 29,446 Reputation points Microsoft Vendor
2 answers

Windows 11, PerMonitorV2 is NOT automatically scaling non-client areas of my window.

I have a manifest containing: <asmv3:windowsSettings xmlns='http://schemas.microsoft.com/SMI/2005/WindowsSettings'> <dpiAware>True/PM</dpiAware> </asmv3:windowsSettings> <asmv3:windowsSettings…

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,519 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,634 questions
asked 2023-05-15T08:24:55.89+00:00
Robinson 141 Reputation points
commented 2024-07-21T10:38:49.4166667+00:00
Darran Rowe 566 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,519 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,634 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 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,640 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,634 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
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,634 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.
967 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,010 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,446 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,883 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,634 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,519 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,634 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 566 Reputation points