Pull to refresh
42.66

Development for Windows *

Developing for Microsoft OSs

Show first
Rating limit
Level of difficulty

How the CSS markup fragment broke the C++ compiler

Reading time 2 min
Views 1.8K

Picture 1

Static analysis methodology involves various technologies. One of them is preprocessing files right before analyzing them. Preprocessed files are created by the compiler that runs in a special working mode. Unfortunately, our long-standing experience of developing a static analyzer shows that this mode is not great for testing. In this note, I'll give the example of a fresh bug in the C++ compiler from Microsoft.
Read more →
Total votes 29: ↑28 and ↓1 +27
Comments 1

.NET Reference Types vs Value Types. Part 2

Reading time 10 min
Views 3.1K


The Object base type and implementation of interfaces. Boxing


It seems we came through hell and high water and can nail any interview, even the one for .NET CLR team. However, let's not rush to microsoft.com and search for vacancies. Now, we need to understand how value types inherit an object if they contain neither a reference to SyncBlockIndex, not a pointer to a virtual methods table. This will completely explain our system of types and all pieces of a puzzle will find their places. However, we will need more than one sentence.


Now, let's remember again how value types are allocated in memory. They get the place in memory right where they are. Reference types get allocation on the heap of small and large objects. They always give a reference to the place on the heap where the object is. Each value type has such methods as ToString, Equals and GetHashCode. They are virtual and overridable, but don’t allow to inherit a value type by overriding methods. If value types used overridable methods, they would need a virtual methods table to route calls. This would lead to the problems of passing structures to unmanaged world: extra fields would go there. As a result, there are descriptions of value type methods somewhere, but you cannot access them directly via a virtual methods table.


This may bring the idea that the lack of inheritance is artificial


This chapter was translated from Russian jointly by author and by professional translators. You can help us with translation from Russian or English into any other language, primarily into Chinese or German.

Also, if you want thank us, the best way you can do that is to give us a star on github or to fork repository github/sidristij/dotnetbook.
Read more →
Total votes 34: ↑34 and ↓0 +34
Comments 0

False Positives in PVS-Studio: How Deep the Rabbit Hole Goes

Reading time 6 min
Views 793
Единорог PVS-Studio и GetNamedSecurityInfo

Our team provides quick and effective customer support. User requests are handled solely by programmers since our clients are programmers themselves and they often ask tricky questions. Today I'm going to tell you about a recent request concerning one false positive that even forced me to carry out a small investigation to solve the problem.
Read more →
Total votes 21: ↑20 and ↓1 +19
Comments 0

Making Git for Windows work in ReactOS

Reading time 10 min
Views 4.7K

Good day to you! image


My name is Stanislav and I like to write code. This is my first english article on Habr which I made due to several reasons:



This article is an english version of my very first article on russian.


Let me introduce the main figures in this story who actually fixed the bug preventing Git from running in ReactOS — the French developer Hermès Bélusca-Maïto (or just Hermes with hbelusca nickname) and of course me (with x86corez nickname).


The story begins with the following messages from the ReactOS Development IRC channel:


Jun 03 18:52:56 <hbelusca> Anybody want to work on some small problem? If so, can someone figure out why this problem https://jira.reactos.org/browse/CORE-12931 happens on ReactOS? :D
Jun 03 18:53:13 <hbelusca> That would help having a good ROS self-hosting system with git support.
Jun 03 18:53:34 <hbelusca> (the git assertion part only).
Read more →
Total votes 44: ↑43 and ↓1 +42
Comments 1

Running image viewer from Windows XP on modern Windows

Reading time 2 min
Views 21K
I have a directory with old images which I collected in the noughties. I move it with all my other files from one computer to another on every upgrade. Every now and then, when I feel a bit nostalgic, I open it and look through the pictures. There are a few GIF files with animation, and every time I notice that the default image viewer from Windows 7 does not support it. I remembered, that the image viewer from Windows XP was able to play GIF animation properly. So, I spent a bit of time to overcome a few obstacles and to run the old image viewer on modern Windows, a small launcher was created for this purpose. Now I can watch these old images in authentic interface of the old image viewer from Windows XP.


Download: shimgvw_xp32.7z (includes a binary and source code of the launcher, and the shimgvw.dll from English Windows XP SP3).

Read more →
Total votes 27: ↑25 and ↓2 +23
Comments 1

ML.NET Tutorial — Get started in 10 minutes

Reading time 3 min
Views 5.2K
Last year we announced ML.NET, cross-platform and open ML system for .NET developers. During this time, it has evolved greatly and has gone through many versions. Today we are sharing a guide on how to create your first ml.net application in 10 minutes.

Читать дальше →
Total votes 22: ↑19 and ↓3 +16
Comments 1

How to crack a self-service terminal and why 80% of them are under threat

Reading time 2 min
Views 2.9K
Author of the original post in Russian: frsamara

I always loved playing with things and testing them under all sorts of wacky conditions as a kid and even considered getting a job as a tester, but I never did. Nevertheless, I still like taking things made by someone else and poking them for vulnerabilities.

I remember, when first self-service payment terminals started popping around town, I saw one of them put up a browser window while updating, and the game was on — I broke it almost immediately. There’s been a lot of discussion about it since then and developers have started to pay a lot more attention towards security in these machines.

Recently, fast-food joints have started installing these terminals. Obviously, it’s quite convenient: just tap a couple of virtual buttons, place an order, pay with a bank card and wait for your number to show on the screen.

Also, nearly every big mall has these interactive boards with floor plans and information on various sales and discounts.

How secure are they?
Read more →
Total votes 13: ↑13 and ↓0 +13
Comments 1

Authors' contribution