How Can I fix lParam pointer Error in Pinvoke/Win32 ?
Hi there, currently I need to dig up some Win32 code which is a part of my project, Actually, it's a part of my WPF application where access Win32 APIs using the traditional Pinvoke method. But Currently I facing some error at lParam pointer…
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…
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 =…
How to preview GDI+ images on Image Watch?
I'm trying to visualize on memory GDI+ images using the Image Watch extension, i requested support on this feature long time ago directly on the developercommunity it got a lot of upvotes but MSFT just market it as "under review". I tried to…
Memory leak when using IShellItem plus BindToHandler
I write this code that iterates over all files on the desktop, its working correctly, however, the memory keeps increasing constantly. I'm already using CComPtr to automatic manage the memory of these pointers, i'm trying to figure out whats leaking. The…
Why am I getting the compile error code 2248 for a friend function to a nested class?
Hello, I am developing a cross platform library and I am running into a compile error which I only get in Windows and not Linux. I have declared the operator<<() as a friend inside of a class which has a nested struct within it. However, the…
How to programmatically force use of the old print dialog in Windows 11 22H2
Please tell me how to programmatically force the use of the old print dialog in Windows 11 22H2 in C ++? For example, using the PrintDlgEx() and PrintDlg() functions also invokes a new print dialog instead of the old one. There is also a way to make an…
How do you log function call counts in C++ with vsinstr.exe
I'd like to get a call tree with counts for a C++ dll. This says only supported for .NET: https://learn.microsoft.com/en-us/visualstudio/profiling/cpu-usage?view=vs-2022 but Starting in Visual Studio 2022 version 17.6, the Instrumentation tool also…
EDIT control will disappear when I clear the window using direct3d?
first I created EDIT. I use direct3d to BeginDraw and EndDraw then present the EDIT will disappear. and If I use direct2d to do it .it will be ok. why I can not use direct3d? here is the project I create:https://github.com/ljzj2/testedit
OpenOCD/GDB in Makefile project
I'm trying to run OpenOCD/GDB in my Makefile-project. The only way seems to be a custom project type, because there is no Debug target. I spent my whole holidays on this but i couldn't find a solution. There are some examples for CMake but i have my…
how to get IStream from char * or std::string?
now I want to use ID2D1DeviceContext5::CreateSvgDocument to create svg document. and how to get IStream from char *? I have svg and I do not want to write it to file.
Windows Service Create a privilege Process in spicefied session
I create a process in current session in Windows service but it has only current user privileges. But now I want to create a privilege process in specified session from code in Windows service, What shall I do? Here is my code below BOOL RunInSession(int…
Filter from SetUnhandledExceptionFilter not capturing C++ exceptions from threads started with _beginthread on windows server 2022
We have found a the change in behaviour of the SetUnhandledExceptionFilter API call. On windows server 2016, this enables any uncaught C++ exceptions to be handled by a registered filter, including on our worker threads. In our filter callback we have…
how to remove border of picture ?
I create dialog using DialogBoxW(hInstance,MAKEINTERESOURCE(IDD_PICTURE1),O_WND); and there is picture on it how to remove its border.
Cannot start visual studio due to an error. Microsoft.ServiceHub.Client.ControllerConnectionException: Controller terminated before accepting condition. Exit code: -532462766
Upon opening Visual Studio Professional 2022, the following error appears: Cannot start visual studio due to an error. Microsoft.ServiceHub.Client.ControllerConnectionException: Controller terminated before accepting condition. Exit code:…
Migrate VBA to vb6, vb.net, or c++
I have VBA code heavily integrated with Excel and it also creates shapes that will be put into a Powerpoint slide. I want to be able to create an exe file for distribution. What language is best to convert to VB.Net, VB6, C++ ?
C++ Configure DCB before opening serial port
In C# it's reasonably easy to create a serial port object, configure it and open the serial port. I'm looking for a way to do the same in C++. Opening the serial port with CreateFile asserts DTR and RTS which I would like to prevent. For this, I have the…
Error on opening .exe file
I was building a Backend server in microsoft visual studio using crow c++ library. Everything was working fine but suddenly on trying to build project after sometime it showed error which said " cannot open .exe file " out of nowhere Please…
What are the steps to create an exe from UWP WinRT code that will not be added to the Windows Store
I did this once, but I having difficulty remembering or finding the web page that gives the steps on how to perform this. Could someone help me. I remember that I had to create a certificate to do this, but beyond that, I don't remember much. Thanks for…
Disabling autocompletion from anything else than Tab in VS 2022
Although I set "Default IntelliSense completion mode" to Tab-only in Text Editor/Advanced, Visual Studio keeps replacing text as I type with its first suggestion when I press e.g. space or dot. I do not want the editor to ever autocomplete…