The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 1,860 other subscribers

Archive for the ‘.NET CF’ Category

Duotrigordle – find 32 simultaneous Wordle solutions in 37 steps

Posted by jpluimers on 2024/04/09

I wish my language skills were better: [Wayback/Archive] Duotrigordle

Guess all 32 Duotrigordle words in 37 tries!


Based on

Source on GitHub: [Wayback/Archive] thesilican/duotrigordle: Play 32 wordles simultaneously (source in TypeScript and CSS)

–jeroen

Posted in .NET CF, Development, JavaScript/ECMAScript, Scripting, TypeScript, Web Development | Leave a Comment »

Unless you write an installer with the right manifest, don’t include Installer, Update, Upgrade, Setup, … in your EXE name

Posted by jpluimers on 2015/09/28

I’ve seen this question coming up a few times, and bumped into this at a client recently: the UAC dialog coming up when debugging a 32-bit executable.

This is caused (more details below) by Installer Detection Technology introduced in Windows Vista (with UAC) and tightened in more modern Windows versions.

The solution is to either:

  • not include Installer, Patch, Update, Upgrade, Setup, … in your EXE name
  • provide a correct manifest to your EXE (getting this right can be hard)
  • don’t use x86 as platform target

For software you don’t have source code for, you can alter the manifest with a requestedExecutionLevel elementFixing the way Vista Auto-detects Installers – Ben’s Writing.

A few links on Installer Detection Technology in Windows:

Read the rest of this entry »

Posted in .NET, .NET 1.x, .NET 2.0, .NET 3.0, .NET 3.5, .NET 4.0, .NET 4.5, .NET CF, C#, C# 1.0, C# 2.0, C# 3.0, C# 4.0, C# 5.0, C# 6 (Roslyn), Delphi, Delphi 10 Seattle, Delphi 2, Delphi 2005, Delphi 2006, Delphi 2007, Delphi 2009, Delphi 2010, Delphi 3, Delphi 4, Delphi 5, Delphi 6, Delphi 7, Delphi XE, Delphi XE2, Delphi XE3, Delphi XE4, Delphi XE5, Delphi XE6, Delphi XE7, Delphi XE8, Development, RemObjects C#, Software Development | 1 Comment »

.NET uses banker’s rounding as default as it follows IEEE 754 (via: Stack Overflow)

Posted by jpluimers on 2014/05/08

It is almost 3 years that Ostemar wrote an interesting answer on Stack Overflow to the question

Why does .NET use banker’s rounding as default? – Stack Overflow.

Few people (even many programmers don’t!) know about rounding and how it can influence software, let alone what bankers rounding does so lets set a few things straight first.

Rounding matters. Depending on the kinds of software you write, it matters a little, or a lot.

For instance, in these categories, it can matter an awful lot:

  • Financial applications
  • Statistical applications

Bankers rounding means rounding half even. Which means that #.5 will round to the even number closest to #.

In bankers rounding, 1.5 rounds to 2, 3.5 to 4 as does 4.5, -1.5 rounds to -2, -3.5 to -4 as does -4.5.

This is called “unbiased” because for reasonable distributions of y values, the expected (average) value of the rounded numbers is the same as that of the original numbers.

This is contrary to what the majority of people are accustomed to: Round half away from zero is taught in most countries (even for the Dutch, despite the alias “Dutch Rounding” for round half to even).

Round half away from zero rounds 1.5 rounds to 2, 3.5 to 4 and 4.5 to 5. Negative numbers round like this: -1.5 rounds to -2, -3.5 to -4 as does -4.5 to -5.

This is only free of overall bias if the original numbers are positive or negative with equal probability.

In short, .NET uses bankers rounding because it follows the IEEE 754 rounding rules.

This was his answer: Read the rest of this entry »

Posted in .NET, .NET 1.x, .NET 2.0, .NET 3.0, .NET 3.5, .NET 4.0, .NET 4.5, .NET CF, C#, C# 1.0, C# 2.0, C# 3.0, C# 4.0, C# 5.0, Development, Software Development | 3 Comments »

When two types are not the same: Assembly Load Contexts Subtleties (via: All Your Base Are Belong To Us)

Posted by jpluimers on 2014/01/09

Reading c# – Type.IsSubclassOf does not behave as expected – Stack Overflow, I found this very interesting link via Assembly Load Contexts Subtleties at Sasha Goldshtein’s blog (I love the name of the blog: All Your Base Are Belong To Us).

He explains the reasons for the error message

System.InvalidCastException: Unable to cast object of type ‘Plugin.MyPlugin’ to type ‘Plugin.MyPlugin’.

Actually his blog entry is an abstract of a 200+ page thesis on  that is also recommended reading: Flexible Dynamic Linkin for .NET (by Anders Aaltonen, Alex Buckley and Susan Eisenbach).

–jeroen

via:

Posted in .NET, .NET 3.5, .NET 4.0, .NET 4.5, .NET CF, C#, C# 3.0, C# 4.0, C# 5.0, Development, Software Development | Leave a Comment »

.NET/C#: Igor Ostrovsky wrote a few great MSDN magazine articles helping you write better threading code

Posted by jpluimers on 2013/09/17

Igor Ostrovsky wrote a few very nice MSDN magazine articles. Not all of them have ended up in the list at MSDN magazine, so here is a more complete list:

Though the articles show the majority of sample code in C#, the actual topics are of great interest to any developer writing .NET code or interfacing to it.

Some keywords in his articles: Read the rest of this entry »

Posted in .NET, .NET 1.x, .NET 2.0, .NET 3.0, .NET 3.5, .NET 4.0, .NET 4.5, .NET CF, C, C#, C# 1.0, C# 2.0, C# 3.0, C# 4.0, C# 5.0, C++, Delphi, Development, F#, LINQ, PLINQ, Prism, Software Development, VB.NET, VB.NET 10.0, VB.NET 11.0, VB.NET 7.0, VB.NET 7.1, VB.NET 8.0, VB.NET 9.0 | Leave a Comment »

.NET/C# assemblies and namespaces

Posted by jpluimers on 2013/07/23

Ever since I started .NET programming after .NET Beta 1 Arrived in 2001, I found that many people struggle with the relation between assemblies and namespaces.

So I was glad that I posted this answer about 2.5 years ago on StackOverflow. Below is the slightly edited form:

People are easily confused by the namespace/assembly thing, as it decouples the concept of where your code is physically located (the assembly) and how you reference it:

  • logically reference is by using the namespace
  • physical reference is by referencing the assembly

I usually explain the relation using the word contribute:

  1. An assembly can contribute to multiple namespaces.
    For instance, the System.Data.dll assembly contributes to namespaces like System.Data (e.g. the class System.Data.DataTable) and Microsoft.SqlServer.Server (e.g. the class Microsoft.SqlServer.Server.SqlContext).
  2. Multiple assemblies can contribute to a single namespace.
    For instance both the System.Data.dll assembly and the System.Xml.dll assembly contribute to the System.Xml namespace.
    Which means that if you use the System.Xml.XmlDataDocument class from your project, you need to reference the System.Data.dll assembly.
    And if you use the System.Xml.XmlDocument class, you need to reference the System.Xml.dll from your project.

(the above examples are .NET 4.0, but likely hold for previous .NET versions as well).

Danny Thorpe explained the concept of namespace and internal really well, so I won’t go into detail about those.

Ever since I started .NET courses 10 years ago, I draw a table explaining assemblies and namespaces like this:

Assemblies contributing to namespaces
Assembly Namespaces it contributes to
System.Data Microsoft.SQLServer.Server System.Xml
↑ Example classes
System.Data.dll DataTable SqlContext XmlDataDocument
System.Xml.dll XmlDocument

–jeroen

via: C# assemblies, whats in an assembly? – Stack Overflow.

Posted in .NET, .NET 1.x, .NET 2.0, .NET 3.0, .NET 3.5, .NET 4.0, .NET 4.5, .NET CF, C#, C# 1.0, C# 2.0, C# 3.0, C# 4.0, C# 5.0, Development, Software Development | Leave a Comment »

A few more interesting links on Delphi, C# and CLR history (trip down memory lane; Peter Sollich)

Posted by jpluimers on 2013/02/27

The continuation of the trip down memory lane

Few people know the name Peter Sollich, as he always chose not to be a public figure (for instance, he is absent on the Outstanding Technical Achievement video).

Peter has been very important for both the Delphi and the .NET worlds: he was the original author of the 32-bit product that became the Delphi x86 compiler.

A few interesting links came up when using his name in some Google searches.

–jeroen

Posted in .NET, .NET 1.x, .NET 2.0, .NET 3.0, .NET 3.5, .NET 4.0, .NET 4.5, .NET CF, C++, C++ Builder, Delphi 1, Delphi 3, Delphi 4, Delphi 5, Delphi 6, Development, Software Development | 2 Comments »

Bring back support for Smart Device Extensions – Customer Feedback for Microsoft

Posted by jpluimers on 2011/10/11

Having done quite a bit of Windows CE development work in .NET, I totally support the below UserVoice request: re-add support for Windows CE in Visual Studio 2010.

Please vote both the underlying Microsoft connect request, and the uservoice entryif you support it too!

Bring back support for Smart Device Extensions

Microsoft caused outrage when without warning or explanation they dropped support for the Smart Device Extensions. Meaning that there is no support for both managed (Compact Framework) and unmanaged (C++) development for the Windows CE platform.

Microsoft promised support would be added by the time VS2010 was released but then back tracked, to date the official line is use VS2008. This product is nearly 4 years old, it is becoming increasingly more impractical to use VS2008 solely for the purpose of developing for the Windows CE platform. Many development teams invested heavily in the benefit of having a single UI for both embedded and desktop development, with the advent of the Compact Framework skill sets and more importantly the code base could easily be shared across platforms. This is now no longer true, as the desktop development/source control/build/test environments have moved on the embedded development environment is stuck in the past. This means duplication of code, duplication of effort and increased cost.

Anyone wanting to start developing for Windows CE has to first buy an MSDN subscription because you can no longer buy VS2008 retail.

As support for Smart Devices has been inherent in VS since VS2003 many people have been caught out when upgrading to VS2010, in many cases those who make their living in the embedded world are now stuck with no upgrade path. Microsoft has refused to comment or discuss the future of embedded development, this silence has forced many to look at alternative platforms.

One of the top voted suggestions on the Connect site was to restore Smart Device Extension support in VS2010, Microsoft has ignored this in typical fashion.

See the Connect Item.

–jeroen

via Bring back support for Smart Device Extensions – Customer Feedback for Microsoft.

Posted in .NET, .NET CF, Development, Mobile Development, Software Development, Windows CE | 3 Comments »

Some #reflector URLs

Posted by jpluimers on 2011/02/17

While it is still free…

The current version: http://reflector.red-gate.com/Reflector.zip

The “Check for Updates” entry in the “Help” menu checks this URL: http://reflector.red-gate.com/Reflector.version

Which currently returns:

6.6.0.30
6.1.0.0
http://reflector.red-gate.com/Download.aspx?File=Reflector&Client={Client}&Version={Version}

When Reflector detects there is a new version, you get a dialog like this:

—————————
.NET Reflector
—————————
A new version of .NET Reflector is available. Do you want to install automatically?
—————————
Yes No
—————————

When you press [Yes], it starts downloading from a URL that depends on the current version: http://reflector.red-gate.com/Download.aspx?File=Reflector&Client=Reflector&Version=6.5.0.135

{Client} was replaced by Reflector, and {Version} was replaced by 6.5.0.135 (the version of the currently running Reflector).

–jeroen

Posted in .NET, .NET 1.x, .NET 2.0, .NET 3.0, .NET 3.5, .NET 4.0, .NET 4.5, .NET CF, Development, Software Development | 1 Comment »

Delphi – record and class helpers: an overview of useful links

Posted by jpluimers on 2009/09/28

At the EKON13 conference, I will be presenting a talk about record and class helpers.

This morning, my laptop did “beeeeeeep beep beep” followed by a deadly silence.
It will take a while before my spare laptop arrives at the hotel and my Vista and VM’s are working again.
So I needed to redo some of my preparations to make sure that I can do a ‘plan B’ if restoring on the spare laptop fails.

Hence below a list of useful links, not yet in a particular order, but it saves you browsing through search engine results sifting the good from the not so good info.

Posted in .NET, .NET CF, Conferences, Delphi, Development, EKON, Event, Software Development | Leave a Comment »