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

Archive for 2013

Absolutely awesome MacBook sticker! 

Posted by jpluimers on 2013/03/20

(19) Jeroen Pluimers – Google+ – Absolutely awesome MacBook sticker! .

Posted in About, Personal | Leave a Comment »

inessential.com: Brian’s Stupid Feed Tricks

Posted by jpluimers on 2013/03/20

If you think it’s easy to deal with RSS read this:

inessential.com: Brian’s Stupid Feed Tricks.

It reminds me so much about handling StUF.

–jeroen

Posted in Development, HTML, HTML5, SOAP/WebServices, Software Development, StUF, Web Development | Leave a Comment »

Porting Delphi 2006 to XE2, fields versus properties: tightened compiler error E2197

Posted by jpluimers on 2013/03/19

When porting some communications code that used records as properties from Delphi 2006 to Delphi XE2, I came across a tightened compiler error “E2197 Constant object cannot be passed as var parameter“.

Let me first explain the good old occurrence of E2197 with some code that uses my last Variant Records example:

Just look at TPacket.InitializePacket and TPacketBase.InitializeFPacket: Basically even though the Packet property has storage specifiers indicating it directly reads from a field and directly writes to a field, you cannot pass it as a var parameter in the FillChar method.

Of course you can with a field, you can pass it to FillChar without trouble as TPacketBase.InitializeFPacket shows. Read the rest of this entry »

Posted in Delphi, Delphi 2006, Delphi XE2, Delphi XE3, Development, Software Development | 3 Comments »

TSListUsers: great little console tool to list Remote Desktop / Terminal Services Users

Posted by jpluimers on 2013/03/18

Thanks to Joe KlemencicTSListUsers is a great little console tool that shows you the currently logged on users and which session they use:

List Terminal Services Users

TSListUsers is a command line utility to list both the currently connected and disconnected users, hostname, IP address and RDP session number on either the local or a remote Windows Terminal Server/RDP Server

To list the users, you need to have the following abilities:

  • NetBios access to the server
  • Permissions allowing you to Query RDP session information (if you can log into the TS, you should have this by default)
  • Terminal Services/RDP should be running on the target host

Usage:
TSListUsers.exe /? to get the Help text
TSListUsers.exe to query a target Terminal Server
TSListUsers.exe with no paramters to query the local host

You can download TSListUsers from here.

Example output of remote session:

C:\Windows>TSListUsers.exe
Active Connections:
Username, HostName(IP), SessID, RDP-Port
----------------------------------------
jeroenp, W701UJPL (192.168.71.34), 2, RDP-Tcp#92

Disconnected Connections:
Username, HostName, SessID
--------------------------

Example output of local session:

C:\Windows>TSListUsers.exe
Active Connections:
Username, HostName(IP), SessID, RDP-Port
----------------------------------------
jeroenp,  1, Console

Disconnected Connections:
Username, HostName, SessID
--------------------------

–jeroen

via List Terminal Services Users.

Posted in Power User, Remote Desktop Protocol/MSTSC/Terminal Services, Windows, Windows 7, Windows 8, Windows Server 2000, Windows Server 2003, Windows Server 2003 R2, Windows Server 2008, Windows Server 2008 R2, Windows Vista, Windows XP | Leave a Comment »

Track My Runners : Results of NYC Half-Marathon 2013

Posted by jpluimers on 2013/03/17

Ran the NYC Half Marathon 2013 with my wife and friends today.

Here are the unofficial results through Track My Runners : Results.

I cannot copy the graph here, but it is interesting to the comparison of split times and average speeds on each 5K parts at Track My Runners : Graph. It struck me that both Conny and me ran a very flat second half.

You cannot run this event without taking some pictures; they are currently being uploaded here: Jeroen Pluimers – Google+ – NYC Half-Marathon 2013.

NAME MARKER BIB GENDER CITY COUNTRY BACK TO RESULTS
Jeroen Pluimers 14522 M Amsterdam Netherlands
DISTANCE TIME OF DAY ELAPSED TIME EST. FINISH PACE/MILE
5K 08:18:10 AM 0:31:30.05 09:59:22 AM 10:07.73
10K 08:51:16 AM 1:04:35.95 10:02:57 AM 10:24.14
15K 09:26:17 AM 1:39:36.57 10:06:41 AM 10:41.26
DISTANCE TIME OF DAY ELAPSED TIME EST. FINISH PACE/MILE
20K 10:00:14 AM 2:13:34.07 10:07:26 AM 10:44.73
FINISH 10:07:41 AM 2:21:02 10:07:41 AM 10:46
NAME MARKER BIB GENDER CITY COUNTRY BACK TO RESULTS
Nicolette van Cronenburg 14648 F Amsterdam Netherlands
DISTANCE TIME OF DAY ELAPSED TIME EST. FINISH PACE/MILE
5K 08:21:06 AM 0:34:17.06 10:11:14 AM 11:01.43
10K 08:59:20 AM 1:12:31.30 10:19:48 AM 11:40.69
15K 09:38:43 AM 1:51:53.93 10:24:06 AM 12:00.37
DISTANCE TIME OF DAY ELAPSED TIME EST. FINISH PACE/MILE
20K 10:18:41 AM 2:31:52.20 10:26:52 AM 12:13.08
FINISH 10:27:19 AM 2:40:31 10:27:19 AM 12:16

 

NAME MARKER BIB GENDER CITY COUNTRY BACK TO RESULTS
Elke Van Erp 14650 F Amsterdam Netherlands
DISTANCE TIME OF DAY ELAPSED TIME EST. FINISH PACE/MILE
5K 08:22:40 AM 0:35:30.96 10:16:45 AM 11:25.19
10K 09:02:01 AM 1:14:51.62 10:25:04 AM 12:03.28
15K 09:42:28 AM 1:55:19.13 10:29:15 AM 12:22.39
DISTANCE TIME OF DAY ELAPSED TIME EST. FINISH PACE/MILE
20K 10:23:41 AM 2:36:31.60 10:32:07 AM 12:35.55
FINISH 10:32:16 AM 2:45:07 10:32:16 AM 12:37
NAME MARKER BIB GENDER CITY COUNTRY BACK TO RESULTS
Conny Slagboom 14596 F Duivendrecht Netherlands
DISTANCE TIME OF DAY ELAPSED TIME EST. FINISH PACE/MILE
5K 08:30:17 AM 0:43:07.70 10:48:49 AM 13:52.05
10K 09:17:38 AM 1:30:28.07 10:58:00 AM 14:34.08
15K 10:01:30 AM 2:14:21.04 10:56:00 AM 14:24.91
DISTANCE TIME OF DAY ELAPSED TIME EST. FINISH PACE/MILE
20K 10:46:01 AM 2:58:51.51 10:55:39 AM 14:23.35
FINISH 10:55:34 AM 3:08:25 10:55:34 AM 14:23

–jeroen

Posted in About, Personal | Leave a Comment »

ntfs – How do you find what process is holding a file open in Windows? – Server Fault

Posted by jpluimers on 2013/03/15

First a warning: when you have found the process holding open a file, and you want to forcibly close the handle, read this post why you should not: Windows Confidential: Forcing Handles Closed.

In fact:

if you forcibly need to close a handle to salvage something, you should reboot shortly afterwards.

Back to the question at hand:

How do you find what process is holding a file open in Windows?

One thing that annoys me no end about Windows is the old “sharing violation” error. Often you can’t identify what’s holding it open. Usually it’s just an editor or explorer just pointing to a relevant directory but sometimes I’ve had to resort to rebooting my machine.

Any suggestions on how to find the culprit?

All of the below solutions require you to run with Administrative privileges.

On current Windows versions, if you run them without UAC elevation, they will miss a lot of processes. And still: under some secured environments you won’t see all processes anyway.

My preferred answer is not on the list:

Quit the application that holds the handle

All the tools that show you the handles will indicate which process holds the handle.

Often, you can just quit that process, do your job on the affected file, then relaunch that process.

When the process is Explorer, there is a neat little trick that works for Windows Vista and up:

For explorer, btw, hold ctrl-shift and right-click a blank area of the start menu, and you’ll get “Exit Explorer” – ps, not quite Jeff’s answer.. – Mark Sowul

Another answer I like is to use Handle, as it is both a command-line tool, and allows for wildcard searching: Read the rest of this entry »

Posted in Conference Topics, Conferences, Event, Power User, Windows, Windows 7, Windows 8, Windows Server 2000, Windows Server 2003, Windows Server 2003 R2, Windows Server 2008, Windows Server 2008 R2, Windows Vista, Windows XP | Leave a Comment »

Retina users, this fixes your fan issue: Apple Releases Retina MacBook Pro SMC Update (via: Mac Rumors)

Posted by jpluimers on 2013/03/14

Today, Apple released SMC version 1.1 for MacBook Pro machines that especially Retina owners will like: it fixes their fan issue that has been present for months, but caused some stir lately.

Apple rushed this update. In fact, it is so new, not even EFI and SMC firmware updates for Intel-based Macs lists it.

It affects both mid 2012 and early 2013 models.

This is how to update:

I had the same problem with the basic installation. Just do the OSX updates from the App Store and the problem will disappear.

Lots of users are reporting the below SMC update fixes the fan issue.

It worked for my MacBook Retina too.

–jeroen

via:Apple Releases Retina MacBook Pro SMC Update to Address Gaming Frame Rates and Fan Issues – Mac Rumors.

Posted in Apple, Mac, MacBook, MacBook Retina, Power User | Tagged: , , , | Leave a Comment »

Google Reader stops at 2013-07-01: How can I download my Reader data? (via: Reader Help)

Posted by jpluimers on 2013/03/14

Google Reader will not be available after July 1, 2013

Learn more.

Reminder to self:

Edit; this Dutch post covered it nicely: Wat zijn alternatieven voor Google Reader?.

Google stopt per 1 juli met Google Reader – IT Pro – Nieuws – Tweakers.

–jeroen

via:

Posted in About, Google, Personal, Power User | 1 Comment »

Delphi “Variant Records”, a few notes

Posted by jpluimers on 2013/03/14

Variant Records are a feature that has been in the Pascal language since Standard Pascal.

A cool page for historic perspective is R3R: Pascal Features in Popular Compilers, hopefully someone will update it to more modern versions of the mentioned compilers.

There is not much official documentation on the Delphi side on this, so below some parts of a case I used for a project that started in 1997 and is still in use to day. Read the rest of this entry »

Posted in APPC, AS/400 / iSeries / System i, ASCII, COBOL, Communications Development, Conference Topics, Conferences, CPI-C, Delphi, Delphi 1, Delphi 2005, Delphi 2006, Delphi 2007, Delphi 2009, Delphi 2010, Delphi 3, Delphi 4, Delphi 5, Delphi 6, Delphi 7, Delphi 8, Delphi XE, Delphi XE2, Delphi XE3, Development, Encoding, Event, HIS Host Integration Services, Internet protocol suite, MQ Message Queueing/Queuing, SNA, Software Development, TCP, Unicode, UTF-8, WebSphere MQ | 9 Comments »

When you automatically check “Automatically close on successful compile” and the compiler progress disappears…

Posted by jpluimers on 2013/03/13

Every once in a while I manage to check “Automatically close on successful compile” during compilation, the compiler progress disappears, and I loose my clue if compilation ended or not.

This is how to fix it:

  • find the registry portion of your Delphi version, under either of these
    – HKEY_CURRENT_USER\Software\Borland\BDS\#.0
    – HKEY_CURRENT_USER\Software\CodeGear\BDS\#.0
    – HKEY_CURRENT_USER\Software\Embarcadero\BDS\#.0
    Where #.0 is your version number from this Delphi Release Dates page.
  • Under the key “Compiling”, find the string value named “Auto Close Progress Dialog”  and change it from “True” to “False”

–jeroen

via: Embarcadero Newsgroup Archive :: embarcadero.public.delphi.ide :: Re: D2006 compiler progress.

Posted in Delphi, Delphi 2006, Delphi 2007, Delphi 2009, Delphi 2010, Delphi x64, Delphi XE, Delphi XE2, Delphi XE3, Development, Software Development | 7 Comments »