43,735 questions
1
vote
0
answers
101
views
How to make this hello world program work? [closed]
I'm new to nasm assembly and I am trying to make a hello world program, but my code prints nothing.
It seems that something in the gethandle label is broken, which leads to WriteConsoleA receiving an ...
-7
votes
0
answers
163
views
Why do I need extra commands for printing documents?
I'm supposed to be taking over a server application which is sending documents to a printer. It does the following:
if (OpenPrinter((LPTSTR)printer, &hPrinter, nullptr))
{
wchar_t ...
0
votes
1
answer
81
views
Draw bitmap as 1D array of bytes, not RGBQUAD objects. GDI StretchDIBits
I have an int array where every 4 elements describes blue, green, red and alpha values of each pixel of the image, for example:
int data[] = {255,0,0,255, 0,255,0,255, 0,0,255,255}
represents a 3x1 ...
0
votes
0
answers
44
views
Setting status icon to excluded with the CFAPI
I am writing a one drive-like application using the CFAPI. I am trying to figure out how to set the Status icon to the Error state and to the Excluded state. Both have proven to be very difficult. The ...
Advice
0
votes
4
replies
55
views
What/How is `D3DKMT_BRIGHTNESS_INFO` used for?
https://learn.microsoft.com/en-us/windows-hardware/drivers/ddi/d3dkmthk/ns-d3dkmthk-_d3dkmt_brightness_info
I want to query the brightness level of a monitor without using WMI. This structure ...
0
votes
1
answer
89
views
BCryptSetProperty KDF to SHA256 fails for ECDH_P256 on Windows 25H2 26200.6584 and later
The following code is used to generate a Diffie-Hellman Key using Windows CryptNG (aka Cryptography API: Next Generation, BestCrypt, bcrypt).
One of the tasks is to set the Key Derivation Function to ...
Best practices
1
vote
2
replies
73
views
Providing stubs to a static library
Environment:
Windows, Visual Studio, low level.
A bit of context:
One of my project is a static library with C functions that export functionalities. Some of those C functions make use of C functions ...
Advice
0
votes
1
replies
68
views
How to check if Windows TPM is available and enabled using NCrypt API?
Before performing any operations using NCrypt APIs, I want to check if TPM is available and enabled for the machine. I couldn't find any APIs that does this. Can anyone please let me know how to ...
0
votes
2
answers
73
views
Correct way to track pressed keystates on focusing a window
What is the correct way to track the keys that are currently pressed, at the time that a window is being focused? More specifically, a way that guarantees that those keys which are reported as "...
0
votes
0
answers
84
views
How to avoid GNAT Serial sending HIGH signal upon calling Open (Win32 API under the hood)?
I'm using the Win32 library to interact with serial ports. More specifically, I'm using the GNAT.Serial_Communications library in some basic Ada code and calling the Open procedure imbedded in this ...
2
votes
1
answer
138
views
Issue compiling template class [duplicate]
I've been working on legacy MFC application compiled with /std:c++17. It was compiling fine until I upgraded it to use c++20. This library I've been working on has a template class depending on some ...
0
votes
2
answers
209
views
Why am I getting conflicting error messages relating to my strings?
I'm working on a C++ program for a college project, and I have the following code written down:
const wchar_t g_szClassName[] = L"myWindowClass";
// Step 4: the Window Procedure
LRESULT ...
3
votes
2
answers
246
views
Flickering when real time capture/drawing on QGraphicsView
I'm working on a Color Picker widget using Qt 6.6, QWidget and QGraphicsView, I'm experiencing two issues:
Issue 1)
When the QGraphicsView has no zoom and the window is moved and the image is draw, ...
0
votes
0
answers
70
views
Win32 Portable Device WPD file to local directory Stream-Copy fails on some files
I'm trying to copy a WPD Portable Device file to a local C:\ folder. I got this code from Google and some MSDN examples. It works correctly on most files, However, for others, I get the exception:
...
Advice
0
votes
4
replies
69
views
Integrating Windows Explorer as a control in Windows 11
Is it possible to integrate Windows Explorer component as a control, created on my window? For instance, as an ActiveX control. It should work in modern Windows 11 (24H2, 25H2).
Back in Windows 9x ...