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,862 other subscribers

Archive for September, 2014

Delphi: considerations regarding rendering performance improvements for FireMonkey applications (via: +Simon Stuart)

Posted by jpluimers on 2014/09/15

Simon Stuart yesterday posted a very interesting post on G+ that explains on this (edited) topic:

#Rendering   I was having a conversation last night … with +David Berneda regarding rendering performance improvements for FireMonkey applications.
Specifically, custom drawing/rendering on a FireMonkey Canvas.

I just want to summarize the points I raised, and some of the conclusions I’ve come to having been working with rendering in FireMonkey since the end of June this year.

–jeroen

via: Simon Stuart rendering performance improvements for FireMonkey applications. Specifically, custom drawing/rendering on a FireMonkey Canvas.

Posted in Delphi, Delphi XE5, Delphi XE6, Delphi XE7, Development, FireMonkey, OS X FMX, Software Development | 3 Comments »

interesting: YUMI – Multiboot USB Creator that understands both Windows and Linux

Posted by jpluimers on 2014/09/15

Ever wanted to put all your Windows installs on a bootable USB stick, but also add some Linux functionality?

It looks like YUMI can do just that.

On my research list (:

–jeroen

via: YUMI – Multiboot USB Creator (Windows) | USB Pen Drive Linux.

Posted in *nix, Linux, Power User, SuSE Linux, Windows, Windows 7, Windows 8, Windows Server 2008, Windows Server 2008 R2, Windows Vista, Windows XP | Leave a Comment »

Online Dutch Radio streams: some direct URLs

Posted by jpluimers on 2014/09/15

From Online Radio | Luister | Radio Veronica | Alleen Echte Hits:

–jeroen

Posted in Uncategorized | 1 Comment »

Boxstarter: quickly setup a machine with just a Gist

Posted by jpluimers on 2014/09/13

Interesting:

Quickly setup any machine with just a Gist – No Preinstalled software required

Want to setup your box without downloading any software or fussing with package authoring or publishing?

Well buckle up! [WayBack] Boxstarter makes this a snap!

Boxstarter makes it really easy to script things when you have a working internet connection.

The example script they show does a lot of things I normally configure by hand:

Set-WindowsExplorerOptions -EnableShowHiddenFilesFoldersDrives -EnableShowProtectedOSFiles -EnableShowFileExtensions
Enable-RemoteDesktop

cinst fiddler4
cinst git-credential-winstore
cinst console-devel
cinst sublimetext2
cinst poshgit
cinst dotpeek

Thanks Thomas Mueller for pointing me to this.

Boxstarter does all kind of neat things with NuGet and Chocolatey.

–jeroen

via

Posted in Power User, Windows | Leave a Comment »

Multiple instances of Word 2013 launching when opening files from Explorer window

Posted by jpluimers on 2014/09/12

If you ever have this problem, check if the [WayBackddeexec key word opening Word documents has a [REM_DDE_EXEC] prepended.

If so: remove it.

Background

ddeexec is used by the Windows Explorer to open a file through DDE (because that usually is a lot faster than starting a new proces) as explained by [WayBackTaming Microsoft Word 2007’s File Associations and Document Windows, Part One — Within Windows, which – since it is now only in the WayBack machine – I quote in full:

One of the gripes Paul had was with the z-order of his open windows being tampered with when opening two (or more) Microsoft Word documents. At first I thought of saying, what the hell are you talking about Paul, but resorted to the less abrasive: What?

Paul explained that if you open a Word document, minimize it, open an Excel spreadsheet, then finally open another document, both Word windows come to front, preventing you from ALT-Tab’ing to the spreadsheet you were working in. Come again, right?

Okay, here’s a video to make things a little easier to understand.

Get the latest Flash Player to see this player.

Given this appears to be an issue with the invocation of Word through a file type association (i.e. double-clicking), I jumped into HKEY_CLASSES_ROOT\Word.Document.12\shell\Open\command to check out the file association keys and parameters. The default value was set to:

C:\Program Files (x86)\Microsoft Office\Office12\WINWORD.EXE” /n /dde

As per KB210565/n instructs Word to starts a new instance of itself with no document open (would normally be a blank page). /dde, sadly undocumented, instructs Word to fire up its “DDE server”. Seeing as there is no %1 argument here, you’re probably wondering how Word opens the document you double-clicked…

Back in the 16-bit computing era, an inter-process communication method called Dynamic Data Exchange (DDE) was created, with the purpose of allowing data to be shared between applications. Today, with the advent of technologies such as COM and OLE, DDE isn’t very useful, but you’ll still find it in use deep within the bowels of Windows. You can read more about DDE on MSDNWikipedia, and on Raymond Chen’s blog.

Alright, so to instruct the shell that it must speak old DDE tongue with Word, an additional key must be present: HKEY_CLASSES_ROOT\Word.Document.12\shell\Open\ddeexec. This key, and the values beneath, instruct the shell how to inform Word, via DDE, that the user is trying to open a document. You’ll notice the default value for this key has FileOpen(“%1”), an instruction that merely simulates clicking File –> Open.

In layman’s terms, here’s what happens in Paul’s case. Bear with me folks.

First document invocation:

  1. Paul double-clicks a .docx file
  2. The shell (Windows Explorer) checks the registry for information on dealing with the ‘open’ action, notices ddeexec key, and goes down the DDE speak route
  3. The shell sends out a broadcast asking for someone to step forward and handle Word requests
  4. A DDE server accepting Word requests doesn’t respond (as it’s not running), therefore the shell fires up a new instance of a DDE server using the command value (i.e. winword /n /dde)
  5. The shell sends the FileOpen(%1) instruction to the new instance of Word.
  6. Document opens.
  7. Paul minimizes the document and opens other windows…

Second document invocation:

  1. Paul double-clicks a .docx file
  2. The shell (Windows Explorer) checks the registry for information on dealing with the ‘open’ action, notices ddeexec key, and goes down the DDE speak route
  3. The shell sends out a broadcast asking for someone to step forward and handle Word requests
  4. A DDE server accepting Word requests responds (Paul’s previous document).
  5. The shell sends the FileOpen(%1) instruction to the existing instance of Word.
  6. The existing instance of Word brings its window to front to handle the FileOpen instruction
  7. Paul screams.

Make sense now?

Same for [WayBack] Taming Microsoft Word 2007’s File Associations and Document Windows, Part Two – Within Windows:

Due to the way Word was designed, there doesn’t appear to be an easy solution to preserve the use of the DDE command and keep window z-order intact (on our end). In Connect lingo, this would have probably been marked WILLNOTFIX. Thankfully, we can tweak the registry a bit to alter the open behavior, therefore making Paul Thurrott happy.

Here is some very important information I’m required to inform you about:

  • Each document opened will now spawn a new winword.exe process.
  • Changing behavior for other actions (e.g. print) is out of this guide’s scope
  • Changing behavior for other applications (e.g. Powerpoint, Excel) is out of this guide’s scope.
  • Backing up the registry, undoing the changes, or other otherwise covering your ass is out of this guide’s scope.

Okay, let’s dig in! First, let’s brush up on some registry terminology with a cleverly produced picture.

That committed to non-pageable memory, let’s continue by altering the open behavior for legacy documents (.doc files)…

  1. With an elevated registry editor, navigate to HKEY_CLASSES_ROOT\Word.Document.8\shell\Open key.
  2. Rename the ddeexec sub-key to ddeexec.disabled.
  3. Navigate to the HKEY_CLASSES_ROOT\Word.Document.8\shell\Open\command key and rename the command value to command.disabled. Do not confuse the command value with the command key!
  4. Double-click the (Default) value and append “%1” (including quotes)to the end of the data string.
  5. Verify that legacy documents open in a new process upon every invocation.

… and now lets alter the open behavior for new documents (.docx files) …

  1. With an elevated registry editor, navigate to HKEY_CLASSES_ROOT\Word.Document.12\shell\Open key.
  2. Rename the ddeexec sub-key to ddeexec.disabled.
  3. Navigate to the HKEY_CLASSES_ROOT\Word.Document.12\shell\Open\command key and rename the command value to command.disabled. Do not confuse the command value with the command key!
  4. Double-click the (Default) value and append “%1” (including quotes)to the end of the data string.
  5. Verify that new documents open in a new process upon every invocation.

Okay, what did we just do? We simply disabled the DDE-related keys (just in case you need to restore them) and altered the launch command to include the document, you double-click, as a command line parameter, since the DDE FileOpen command will no longer be sent. Easy!

For those looking to automate this process, say for an entire enterprise-wide deployment, cough, you can use my PowerShell script. Just paste it into the PowerShell window and pray you don’t see red.

The PowerShell Script

[WayBack] uncouple_dde_word.txt:

New-PSDrive -Name HKCR -PSProvider Registry -Root HKEY_CLASSES_ROOT

Rename-Item -Path HKCR:\Word.Document.8\shell\Open\ddeexec -NewName ddeexec.disabled
Rename-Item -Path HKCR:\Word.Document.12\shell\Open\ddeexec -NewName ddeexec.disabled

Rename-ItemProperty -Path HKCR:\Word.Document.8\shell\Open\command -Name command -NewName command.disabled
Rename-ItemProperty -Path HKCR:\Word.Document.12\shell\Open\command -Name command -NewName command.disabled

Set-ItemProperty -Path HKCR:\Word.Document.8\shell\Open\command\ -Name "(default)" `
    ((Get-ItemProperty -Path HKCR:\Word.Document.8\shell\Open\command\)."(default)" + " ""%1""")

Set-ItemProperty -Path HKCR:\Word.Document.12\shell\Open\command\ -Name "(default)" `
    ((Get-ItemProperty -Path HKCR:\Word.Document.12\shell\Open\command\)."(default)" + " ""%1""")

–jeroen

via: [WayBack] Multiple instances of Word launching when opening files from Explorer window.

Posted in Office, Power User, Word | 4 Comments »

Android Wear Check

Posted by jpluimers on 2014/09/11

Interesting:

Android Wear is designed to work with Android phones running 4.3 or higher. Not sure what version of Android you have? Visit g.co/WearCheck on your phone to see if it’s compatible with Android Wear.

My Google Nexus 4: check!

–jeroen

via: Android Wear Check.

Posted in Android, Android Devices, AndroidWear, Development, Google, Mobile Development, Power User | Leave a Comment »

Continua CI Update 1.5.0.278 for breaking change (via: Version 1.5 History | Continua CI)

Posted by jpluimers on 2014/09/11

For a breaking issue, there has been an important bug fix to Coninua CI. From the downloads page:

From the change log:

Read the rest of this entry »

Posted in .NET, Continua CI, Continuous Integration, Delphi, Development, DVCS - Distributed Version Control, git, Mercurial/Hg, Software Development, Subversion/SVN | Leave a Comment »

Reminder to Self: write Eurekalog article about finding cause for hard to catch Access Violations in Delphi

Posted by jpluimers on 2014/09/11

Reminder to Self: write Eurekalog article about finding cause for hard to catch Access Violations in Delphi

–jeroen

via: web services – Access Violation (Delphi) – except the first run – Stack Overflow.

Posted in Delphi, Development, Software Development | Leave a Comment »

Google Voice calling on Android via Google Hangouts 2.3+ APK and Hangouts Dialer

Posted by jpluimers on 2014/09/10

Google Hangouts on iOS could make Google Voice calls for a while, and it is now finally available for Android too: Official Google Blog: Call me maybe? Introducing free voice calls from Hangouts.

You need two pieces of software for this:

Roderick Gadellaa published a G+ post with the link to Hangouts Dialer and the Google Hangouts 2.3 APK at Android Police.

At the thread Free voice calling finally comes to Hangouts! both Allen Edmonds and Brandon D’Souza posted the link to the Google Hangouts 2.3 APK at http://goo.gl/TbRMVE.

You can even configure Hangouts to receive incoming Google Voice calls. Quoting from the same thread:

Spencer Petersen …

  1. Go to Hangouts settings,
  2. select your account, and
  3. under Google Voice
  4. there’s an option to receive incoming calls.

Calling to USA and Canada is free. Other regions do cost money, but the prices are very competitive: http://www.google.com/hangouts/rates

–jeroen

via:

Posted in Google, GoogleHangouts, GoogleVoice, Power User | Tagged: , , | Leave a Comment »

A url or site like example.org which always produces a 404 error (and two for 200 and 204)

Posted by jpluimers on 2014/09/10

Yesterday I posted this question on StackOverflow and G+: Is there a url or site like example.org which always produces a 404 error?

Soon after that, I found out three links that produce predictable HTTP status codes:

They also work for https:

Edit 20241223: these also return a 404: http://www.google.com/undefined and https://www.google.com/undefined

On StackOverflow very few people even noticed the question, probably wondering “why?”.

I’m using these links for positive and negative testing of some http / https handling code that needs to be good at coping with positive and negative responses.

In my testing life, I’ve learned the hard way that both negative and positive tests are core part of your suite, hence the question.

–jeroen

via: Is there a url or site like example.org which always produces a 404 error?.     Read the rest of this entry »

Posted in .NET, .NET 2.0, .NET 3.0, .NET 3.5, .NET 4.0, .NET 4.5, Chrome, Communications Development, Development, HTTP, Internet protocol suite, Power User, REST, Software Development, TCP, Web Browsers, Web Development | Leave a Comment »