2,609 questions with Windows API - Win32 tags

Sort by: Updated
0 answers

How to limit the Bcrypt library generated random numbers range?

Hello! I'm using the Bcrypt library BCryptGenRandom function to generate random numbers. The BCryptGenRandom function generates UCHARs with range 0-255. I need a range of 1-50. I know I can use the formula: rand_num % (MAX_NUM + 1 - MIN_NUM) + MIN_NUM.…

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,609 questions
asked 2024-09-29T14:38:14.4133333+00:00
Zsolt Kántor 40 Reputation points
commented 2024-10-03T21:40:55.0133333+00:00
Zsolt Kántor 40 Reputation points
0 answers

Issue with SetNamedSecurityInfo Returning Error Code 59 on Shared File

Hello, I am encountering an issue with the **SetNamedSecurityInfo **API while attempting to modify the security settings of shared files. I have five shared files, and the API works as expected on four of them. However, for one specific shared file, the…

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,609 questions
asked 2024-09-30T09:10:36.2966667+00:00
Rishi C 0 Reputation points
commented 2024-10-03T14:30:12.6833333+00:00
Rishi C 0 Reputation points
3 answers One of the answers was accepted by the question author.

Programatically turn on/off Japanese IME Kana/Romaji input mode

I am trying to programmatically turn on/off Japanese Kana/Romaji input mode. This is equivalent to the "Kana input" option in the IME input menu I have tried to use InputMethod.SetPreferredImeConversionMode but it can only sets the TextBox…

Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
5,099 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,609 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.
10,904 questions
asked 2024-10-03T02:46:06.51+00:00
CHAN Samuel 20 Reputation points
accepted 2024-10-03T08:32:03.5133333+00:00
CHAN Samuel 20 Reputation points
4 answers One of the answers was accepted by the question author.

c++ basic GDI bitmap not working

hi, I want to draw a bitmap, as simple as that. From the beginning, the first step was to create a basic desktop app Since the app Visual Studio creates does not include a Window class definition, I declared the bitmap as a global variable // Global…

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,609 questions
asked 2024-10-02T04:43:50.6+00:00
VooDooChicken 40 Reputation points
edited an answer 2024-10-03T03:52:09.5033333+00:00
Tong Xu - MSFT 2,456 Reputation points Microsoft Vendor
0 answers

What are the known folder paths returned by SHGetKnownFolderPath on Windows 11 using OneDrive's Known Folder Move Feature?

OneDrive now includes a feature called Known Folder Move. It is my understanding that for consumers (not managed devices) when OneDrive is used on a Windows 11 system it will implement this feature and several of the known folders will now default to…

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,609 questions
Windows 11
Windows 11
A Microsoft operating system designed for productivity, creativity, and ease of use.
9,587 questions
asked 2024-10-01T09:00:52.61+00:00
RLWA32 45,476 Reputation points
commented 2024-10-02T08:48:53.2166667+00:00
RLWA32 45,476 Reputation points
0 answers

How to view all Visual Tree UI elements of any UI controls, Which is using styles & templates on windows 11 OS environment using VisualUIAVerifyNative tool?

VisualUIAVerifyNative is not displaying few UI elements If TextBox uses style, which has TextBlock as PlaceholderText, then the placeholder textblock UI element is not getting displayed in VisualUIAVerifyNative on windows 11 machine <Style…

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,609 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.
808 questions
asked 2024-09-11T12:08:30.5+00:00
Kavitha T 0 Reputation points
commented 2024-10-02T08:33:32.41+00:00
Junjie Zhu - MSFT 17,806 Reputation points Microsoft Vendor
0 answers

Why doesn't GetNameInfo win32 api resolve Chinese computer names on Windows 11?

0 I have a small lab based Active Directory environment with 3 devices. They have the following OS installed. DC running Windows Server 2022 hosting my AD server. 1.Endpoint running Windows 10 Pro (22H2 Build 19045.4780) [English US installation 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,609 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,719 questions
Windows 11
Windows 11
A Microsoft operating system designed for productivity, creativity, and ease of use.
9,587 questions
asked 2024-10-01T07:31:51.6766667+00:00
Arif Waqas 0 Reputation points
commented 2024-10-02T03:02:59.8733333+00:00
Tong Xu - MSFT 2,456 Reputation points Microsoft Vendor
0 answers

LogonUser Win32 API Function gives error of incorrect username or password passed for the correct credentials passed!

I created a Windows SSHD MSI Installer using CPP and Win32 API Function to create a SSH login to the remote user on the Windows Server on which we install our MSI Installer. The Portuguese Language based Windows Server 2016 when logged in with a default…

Windows Server 2016
Windows Server 2016
A Microsoft server operating system that supports enterprise-level management updated to data storage.
2,504 questions
Windows Server
Windows Server
A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.
13,049 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,609 questions
Active Directory
Active Directory
A set of directory-based technologies included in Windows Server.
6,515 questions
Windows Network
Windows Network
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.Network: A group of devices that communicate either wirelessly or via a physical connection.
752 questions
asked 2024-09-27T07:54:29.66+00:00
Prem Jha 45 Reputation points
commented 2024-10-01T10:36:04.14+00:00
Prem Jha 45 Reputation points
1 answer

How to make XAudio2 throw a Device Lost flag/error?

Hi, I was wondering how I can produce a Device Lost message for XAudio2. I tried using the dxcaps -forcetdr command in the Developer Command Prompt window for Visual Studio, but it did not work. I am using C++ and programming for Windows 10. Derek

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,609 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,719 questions
asked 2024-10-01T02:15:50.39+00:00
Derek Todd 0 Reputation points
answered 2024-10-01T09:14:14.06+00:00
Tong Xu - MSFT 2,456 Reputation points Microsoft Vendor
1 answer

AudioSessionControl::SetIconPath no longer works volume mixers besides SndVol

We have multiple HWNDs and volume controls in the same process so we want to set the icon for each volume control differently. AudioSessionControl::SetDisplayName works fine across all Windows volume mixers (ie. SndVol, "Windows + G" dashboard,…

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,609 questions
asked 2024-09-20T00:35:34.35+00:00
rizhang 1 Reputation point
commented 2024-10-01T03:30:45.19+00:00
Junjie Zhu - MSFT 17,806 Reputation points Microsoft Vendor
0 answers

why it is faster or slower than it should be when I use sink writer to write sample?

When I use sink writer to write sample I find that it is faster or slower thank it shoude be. it is the example:https://github.com/ljzj2/testdemo1

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,609 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,719 questions
asked 2024-09-21T12:37:42.3333333+00:00
mc 4,476 Reputation points
commented 2024-09-30T08:03:07.5866667+00:00
Jeanine Zhang-MSFT 9,666 Reputation points Microsoft Vendor
1 answer

Why does IAudioClient::GetMixFormat return 8 channels audio even if the system's sound card only has two channels?

为甚么 IAudioClient::GetMixFormat return 8 channels audio ,扬声器实际上仅支持 2 声道 captureClient->GetMixFormat(&m_wfex);

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,609 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,719 questions
Windows 11
Windows 11
A Microsoft operating system designed for productivity, creativity, and ease of use.
9,587 questions
asked 2024-09-29T08:12:47.26+00:00
Yniar GL 0 Reputation points
commented 2024-09-30T02:52:04.0066667+00:00
Jeanine Zhang-MSFT 9,666 Reputation points Microsoft Vendor
1 answer One of the answers was accepted by the question author.

How to get the tooltip value when hovering the mouse anywhere on the desktop

I'm working on a VB project and I need to capture the tooltip value when hovering over the desktop. Can someone help me figure out how to do this? Is this reversible?

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,609 questions
VB
VB
An object-oriented programming language developed by Microsoft that is implemented on the .NET Framework. Previously known as Visual Basic .NET.
2,722 questions
asked 2024-09-29T06:03:39.5933333+00:00
Mansour_Dalir 1,876 Reputation points
commented 2024-09-29T12:53:17.42+00:00
Castorix31 85,116 Reputation points
1 answer One of the answers was accepted by the question author.

Is there any way to temporarily hang or disable zero-page thread in windows,i only want to test?

Hi~ Recently I want to emporarily hang or disable zero-page thread to test something, Is there any better way?

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,609 questions
asked 2024-09-29T03:02:16.0933333+00:00
qicheng 20 Reputation points
accepted 2024-09-29T06:17:01.28+00:00
qicheng 20 Reputation points
2 answers

Win32 TreeView drag item flickering

I have a basic Win32 tree control I've implemented drag/drop with. The TreeView has been set to double buffer to avoid any flicker. The drag item is drawn no problem as I drag around. However in order to get correct drawing of the underlying view as…

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,609 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,719 questions
asked 2024-08-02T17:24:18.4833333+00:00
Robinson 146 Reputation points
commented 2024-09-28T16:11:05.3366667+00:00
Robinson 146 Reputation points
0 answers

High DPI with embedded WinForm UserControl in a Win32 application.

Apologies in advance as this question is a long shot and somewhat obscure. I have a C++ application I maintain. It embeds two .NET 4.x WinForms User Controls as panels in its Win32 window with: My_Control.CreateInstance(L"My…

Windows Forms
Windows Forms
A set of .NET Framework managed libraries for developing graphical user interfaces.
1,889 questions
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,378 questions
.NET
.NET
Microsoft Technologies based on the .NET software framework.
3,834 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,609 questions
.NET CLI
.NET CLI
A cross-platform toolchain for developing, building, running, and publishing .NET applications.
336 questions
asked 2024-09-27T11:30:11.23+00:00
Robinson 146 Reputation points
commented 2024-09-27T14:29:38.39+00:00
Robinson 146 Reputation points
0 answers

Logging in to different domain using LogonUser API

Calling LogonUser before a Winforms application starts running. So if the credentials are correct the application starts and if they are wrong the application wont start. So this working fine with the user credentials for the domain my system belongs to.…

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,609 questions
asked 2024-03-20T09:37:38.5933333+00:00
Bhattacharjee, Aditya 0 Reputation points
commented 2024-09-27T10:26:59.9666667+00:00
Prem Jha 45 Reputation points
1 answer

When calling FlashWindowEx, Window behaves abnormally in Windows 11.

We would like to inquire about an abnormal behavior observed during the development of a Windows-based application. This was working normally in Windows 10, but in Windows 11, abnormal behavior has been confirmed when calling the Window API as shown…

Windows Forms
Windows Forms
A set of .NET Framework managed libraries for developing graphical user interfaces.
1,889 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,609 questions
Windows 11
Windows 11
A Microsoft operating system designed for productivity, creativity, and ease of use.
9,587 questions
asked 2024-09-24T09:32:40.85+00:00
윤기 오 0 Reputation points
commented 2024-09-27T06:43:23.3566667+00:00
Jiale Xue - MSFT 44,926 Reputation points Microsoft Vendor
2 answers One of the answers was accepted by the question author.

would you know why URLDownloadToFile fails on windows 10

I have compiled code using watcom c++ compilier under win32 using the function URLDownloadToFile and while this was working on other machines its not working on a brand new install. #include <urlmon.h> HANDLE hr = URLDownloadToFile(NULL, …

Windows 10
Windows 10
A Microsoft operating system that runs on personal computers and tablets.
11,566 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,609 questions
asked 2024-09-19T08:58:29.7833333+00:00
Lloyd Etheridge 20 Reputation points
commented 2024-09-25T13:10:55.52+00:00
Lloyd Etheridge 20 Reputation points
1 answer

the sink writer always stopped or error after 1-3 times success?

i am using sink writer to write sample. here is the code: while(true){ hr = dxgiOutputDuplication->AcquireNextFrame(0, &frame_info, &resource); if (SUCCEEDED(hr)) { ID3D11Texture2D* texture = NULL; hr =…

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,609 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,719 questions
asked 2024-09-19T16:02:26.66+00:00
mc 4,476 Reputation points
commented 2024-09-25T06:51:54.9066667+00:00
Junjie Zhu - MSFT 17,806 Reputation points Microsoft Vendor