Archive for the ‘Visual Studio C++’ Category
Posted by jpluimers on 2025/07/22
A while ago, I had to figure out the field sizes for some Windows API functions. In the distance past, the base data types used to be defined in windows.h, but over the decades that file has been split into various other files as there are far more than just the BOOL, int, UINT, DWORD, HWND, LPARAM and WPARAM data types. Currently the data types are defined in [Wayback/Wayback] Windows Data Types (BaseTsd.h) – Win32 apps | Microsoft Learn.
Note that C++ allows to specify bit field sizes for fields in struct composite data types, so under some circumstances, fields my have a different number of bits than you might expect from their data type.
Via [Wayback/Archive] c++ dword uint size – Google Search.
–jeroen
Posted in C++, Development, Software Development, Visual Studio C++, Windows Development | Leave a Comment »
Posted by jpluimers on 2025/04/10
Over the last years a few C:\Windows.msi vulnerabilities have been discovered (and fixed), of which some are linked below.
The core is that the Windows Installer tries to be transactional, and NTFS is, but the combination with installer processes isn’t.
That leads into vulnerabilities where you can insert malicious Roll Back Scripts (.rbs files) and Roll Back Files (.rbf files), and I wonder if by now more have been discovered.
So this post is a kind of reminder to myself (:
Oh, and I learned much more about whoami on Windows, as there whoami /groups shows very detailed SID information. From that, I learned more on the internals of SIDs too!
Read the rest of this entry »
Posted in Blue team, C++, Development, Power User, Red team, Security, Software Development, Visual Studio C++, Windows, Windows Development | Tagged: 1, else, endif, if | Leave a Comment »
Posted by jpluimers on 2024/10/15
A while ago I downloaded some internal tooling that required vcredist140.dll (and related DLLs).
From the name you cannot see if that is a 32-bit (x86) or 64-bit (x64) dependency so you often have to trial and error to figure out which one you need.
I adopted some winget package install command-lines with package IDs current at the time of writing this blog post; similar should be available at the time of publication:
Read the rest of this entry »
Posted in .NET, C++, Development, Software Development, Visual Studio 2015, Visual Studio 2017, Visual Studio 2019, Visual Studio 2022, Visual Studio and tools, Visual Studio C++ | Leave a Comment »
Posted by jpluimers on 2024/09/25
Posted in C, C++, Development, NTFS, Power User, RoboCopy, Software Development, Visual Studio C++, Windows, Windows 10, Windows 11 | Leave a Comment »
Posted by jpluimers on 2024/03/28
A while back, early in the Wednesday morning after Patch Tuesday I performed regular updates of all the systems noticing some updates failed because timeouts on the Microsoft download servers.
Note I perform the manual steps on Wednesday as Patch Tuesday as it starts at 10:00 AM PST which is in the evening in Amsterdam. The automated steps are automated and kick in when Microsoft tells the Windows machines to update themselves.
See [Wayback/Archive] Security Update Guide FAQs
Microsoft schedules the release of security updates on “Patch Tuesday,” the second Tuesday of each month at 10:00 AM PST.
Depending on time zone(s) in which the organization operates, IT pros should plan their deployment schedules accordingly. Please note that there are some products that do not follow the Patch Tuesday schedule.
I posted a gist and a Tweet, but didn’t immediately thought of a good resolution so I postponed that until Thursday and found it:
Read the rest of this entry »
Posted in C, C++, Development, Power User, Software Development, Visual Studio and tools, Visual Studio C++, vscode Visual Studio Code, Windows, Windows Development | Leave a Comment »
Posted by jpluimers on 2021/05/14
The Microsoft rebuilt move affects these Chocolatey Microsoft Visual C++ Redistributable packages, usually multiple times:
You get error messages like this:
ERROR: Checksum for 'C:\Users\saroot\AppData\Local\Temp\chocolatey\vcredist2010\10.0.40219.2\vcredist_x86.exe' did not meet '66B797B3B4F99488F53C2B676610DFE9868984C779536891A8D8F73EE214BC4B' for checksum type 'sha256'. Consider passing the actual checksums through with --checksum --checksum64 once you validate the checksums are appropriate. A less secure option is to pass --ignore-checksums if necessary
The cause is [Archive.is] vcredist-all fails to install due to broken checksum of vcredist2005, vcredist2008 and vcredist2010 · Issue #105 · jberezanski/ChocolateyPackages
Great, Microsoft is apparently on an in-place installer update spree.
Actually, this is not a problem with vcredist-all, but rather with those specific packages and should be reported to maintainers of those packages. It so happens, however, that I’m also one of the maintainers of vcredist2008 and vcredist2010 (which live in https://github.com/chocolatey-community/chocolatey-coreteampackages/tree/master/manual). I’ve already prepared a fix for 2010 and I guess I’ll do 2008 tomorrow.
As for 2005, I can see that it has the same maintainer as vcredist2010 had until very recently – when we took over that package because the maintainer did not respond. So we probably should take over 2005, too.
Progress
The vcredist2010 package has been modified two times for this:
Hopefully the vcredist2008 and vcredist2005 packages will follow soon.
–jeroen
Posted in C++, Chocolatey, Development, Power User, Software Development, Visual Studio C++, Windows | Leave a Comment »
Posted by jpluimers on 2020/01/29
Via [WayBack] As far as I can tell (and documentation on that is reaaaaaaly hard to find), dcc64 can link in .obj files in OMF and COFF format. Bcc64 uses LLVM chain and therefore produces ELF .o files… – Primož Gabrijelčič – Google+:
David Heffernan:
dcc32 does coff and omf, dcc64 only coff
and later he commented:
One of the difficulties with linking objects is the handling of exceptions. The 64 bit exception model is table based, in contrast to the stack based 32 bit model.
I don’t think that the exception tables are written correctly for code linked in objects. If exceptions are raised then this can lead to abnormal process termination. Process just disappears. Poof!
One common way that this happens is floating point exceptions that are by default unmasked by the Delphi RTL. I have found it necessary to mask them when calling into any linked object code to avoid exceptions being raised.
And compiling with cl can be a bit of a game. It’s stack checking options need to be disabled. And there are a few other key switches that help. And then there’s the forward declaration trick to help the one pass compiler cope with C objects that are expected to be linked in a separate step.
Anyway, it can be quite a challenge at times, but I’ve yet to find a plain self contained C library that has defeated me!
–jeroen
Posted in C++, C++ Builder, Delphi, Delphi x64, Development, Software Development, Visual Studio C++ | 2 Comments »
Posted by jpluimers on 2018/01/17
Link archive so I know how to get the 64-bit ARM, 32-bit Win32/x86 and 64-bit Win64/x64 downloads for the Visual C++ Redistributable files.
Note the various names of pages and files Microsoft uses.
- Visual Studio 2015
- Microsoft Visual C++ 2015 Redistributable Update 3
- Visual C++ Redistributable for Visual Studio 2015
- Visual Studio 2013
- Update for Visual C++ 2013 and Visual C++ Redistributable Package
- Visual C++ Redistributable Packages for Visual Studio 2013
- Visual Studio 2012
- Visual C++ Redistributable for Visual Studio 2012 Update 4
- 11.0.61030.0
- [WayBack] https://www.microsoft.com/en-us/download/details.aspx?id=30679
- [WayBack] https://www.microsoft.com/en-us/download/confirmation.aspx?id=30679
- [WayBack] https://download.microsoft.com/download/1/6/B/16B06F60-3B20-4FF2-B699-5E9B7962F9AE/VSU4/vcredist_arm.exe
- [WayBack] https://download.microsoft.com/download/1/6/B/16B06F60-3B20-4FF2-B699-5E9B7962F9AE/VSU_4/vcredist_x64.exe
- [WayBack] https://download.microsoft.com/download/1/6/B/16B06F60-3B20-4FF2-B699-5E9B7962F9AE/VSU_4/vcredist_x86.exe
- ??? Microsoft Visual C++ Redistributable 2012
- Visual Studio 2010
- Microsoft Visual C++ 2010 Service Pack 1 Redistributable Package MFC Security Update
- 10.0.40219.325
- [WayBack] https://www.microsoft.com/en-us/download/details.aspx?id=26999
- [WayBack] https://www.microsoft.com/en-us/download/confirmation.aspx?id=26999
- [WayBack] https://download.microsoft.com/download/1/6/5/165255E7-1014-4D0A-B094-B6A430A6BFFC/vcredist_ia64.exe
- [WayBack] https://download.microsoft.com/download/1/6/5/165255E7-1014-4D0A-B094-B6A430A6BFFC/vcredist_x64.exe
- [WayBack] https://download.microsoft.com/download/1/6/5/165255E7-1014-4D0A-B094-B6A430A6BFFC/vcredist_x86.exe
- Microsoft Visual C++ 2010 SP1 Redistributable Package (x64)
- 10.0.40219.1
- [WayBack] https://www.microsoft.com/en-us/download/details.aspx?id=13523
- [WayBack] https://www.microsoft.com/en-us/download/confirmation.aspx?id=13523
- [WayBack] https://download.microsoft.com/download/A/8/0/A80747C3-41BD-45DF-B505-E9710D2744E0/vcredist_x64.exe
- Microsoft Visual C++ 2010 SP1 Redistributable Package (x86)
- 10.0.40219.1
- [WayBack] https://www.microsoft.com/en-us/download/details.aspx?id=8328
- [WayBack] https://www.microsoft.com/en-us/download/confirmation.aspx?id=8328
- [WayBack] https://download.microsoft.com/download/C/6/D/C6D0FD4E-9E53-4897-9B91-836EBA2AACD3/vcredist_x86.exe
- Microsoft Visual C++ 2010 Redistributable Package (x86)
- Microsoft Visual C++ 2010 Redistributable Package (x64)
- Visual Studio 2008
- Microsoft Visual C++ 2008 Service Pack 1 Redistributable Package MFC Security Update
- 9.0.30729.5677
- [WayBack] https://www.microsoft.com/en-us/download/details.aspx?id=26368
- [WayBack] https://www.microsoft.com/en-us/download/confirmation.aspx?id=26368
- [WayBack] https://download.microsoft.com/download/5/D/8/5D8C65CB-C849-4025-8E95-C3966CAFD8AE/vcredist_IA64.exe
- [WayBack] https://download.microsoft.com/download/5/D/8/5D8C65CB-C849-4025-8E95-C3966CAFD8AE/vcredist_x64.exe
- [WayBack] https://download.microsoft.com/download/5/D/8/5D8C65CB-C849-4025-8E95-C3966CAFD8AE/vcredist_x86.exe
- Microsoft Visual C++ 2008 SP1 Redistributable Package (x86)
- Microsoft Visual C++ 2008 Redistributable Package (x86)
- 9.0.21022.8
- [WayBack] https://www.microsoft.com/en-us/download/details.aspx?id=29
- [WayBack] https://www.microsoft.com/en-us/download/confirmation.aspx?id=29
- [WayBack] https://download.microsoft.com/download/1/1/1/1116b75a-9ec3-481a-a3c8-1777b5381140/vcredist_x86.exe
- Microsoft Visual C++ 2008 Redistributable Package (x64)
- Visual Studio 2005
- 6.0.2900.2180 – Microsoft Visual C++ 2005 Redistributable Package (x86)
- [WayBack] https://www.microsoft.com/en-us/download/details.aspx?id=3387
- [WayBack] https://www.microsoft.com/en-us/download/confirmation.aspx?id=3387
- [WayBack] https://download.microsoft.com/download/d/3/4/d342efa6-3266-4157-a2ec-5174867be706/vcredist_x86.exe
- 6.0.2900.2180 – Microsoft Visual C++ 2005 Redistributable Package (x64)
- [WayBack] https://www.microsoft.com/en-US/Download/details.aspx?id=21254
- [WayBack] https://www.microsoft.com/en-US/Download/confirmation.aspx?id=21254
- [WayBack] https://download.microsoft.com/download/9/1/4/914851c6-9141-443b-bdb4-8bad3a57bea9/vcredist_x64.exe
–jeroen
Posted in C++, Development, Software Development, Visual Studio C++ | Leave a Comment »