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 March, 2013

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 »

Delphi “type types”: similar types but not the same type identity, some examples.

Posted by jpluimers on 2013/03/12

Few people know about a Delphi language feature that has been present since Delphi 1: prepending the type definition with a type keyword to make the type getting a new identity.

Each time I use it, I have to do some browsing for the consequences, and this time I wrote down some notes and created a small example program (source is also below).

This time I needed it when writing class wrappers on top of the Delphi bindings for WebSphere MQ.

WebSphere MQ has Queues where you can put and get messages. It also has Queue Managers to which you connect, and that provide queuing services and manages queues.

Both Queues and Queue Managers have names that can be up to 48 (single byte) characters long.
Those names mean totally different things, so though the have similar data types, they have a different identity.

The same holds for 20 byte character arrays (they can be used as names for ChannelNameShortConnectionName and MCAName). The 264 byte character array is so far used for ConnectionName only.

Distinguishing those types: That’s what “type types” in Delphi are all about. Read the rest of this entry »

Posted in CP437/OEM 437/PC-8, 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 x64, Delphi XE, Delphi XE2, Delphi XE3, Development, Encoding, Shift JIS, Software Development, Unicode, UTF-8, UTF8 | 1 Comment »

xkcd: Circumference Formula

Posted by jpluimers on 2013/03/11

(:

–jeroen

via: xkcd: Circumference Formula.

Posted in Comics | Leave a Comment »

A couple DLL Locations that Windows uses to display Icons from

Posted by jpluimers on 2013/03/11

This one most people know of:

  • %SystemRoot%\system32\SHELL32.dll

But these files also provide icons:

  • %SystemRoot%\system32\filemgmt.dll
  • %SystemRoot%\system32\dsadmin.dll
  • %SystemRoot%\system32\els.dll

Various versions of Windows share the icon ID in those files, but have different visual content.

A tool like IconsExtract – Extract icon/cursor stored in EXE, DLL, OCX, CPL files can be used to view or extract those icons.

IconExtract works much better at finding the Index inside SHELL32.dll that is described at How Can I Change the Icon for an Existing Shortcut? – Hey, Scripting Guy! Blog – Site Home – TechNet Blogs.

Copyright issues might apply…

–jeroen

Posted in 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 »

Mordac, the preventer of information services strikes again… (via: Dilbert comic strip for 2013-03-09)

Posted by jpluimers on 2013/03/09

Dilbert comic strip for 03/09/2013 from the official Dilbert comic strips archive..

–jeroen

Posted in Comics | Leave a Comment »

Remote desktop is not displayed in Full-Screen mode when the screen resolution is 1366× 768 pixels in Windows 7 or in Windows Server 2008 R2

Posted by jpluimers on 2013/03/08

Just in case I get another laptop that suffers from this:

Remote desktop is not displayed in Full-Screen mode when the screen resolution is 1366× 768 pixels in Windows 7 or in Windows Server 2008 R2.

–jeroen

Posted in Power User, Remote Desktop Protocol/MSTSC/Terminal Services, Windows | Leave a Comment »

DropBox leaks suspended processes when it cannot poke through your HTTP Proxy

Posted by jpluimers on 2013/03/08

On Windows, when you have a HTTP Proxy Server and DropBox cannot poke through it, it pops up a window asking if you want to change the “Connection Settings”.

When you have a busy proxy that denies access when busy, but allows when not busy, the window disappears and DropBox continues.

So far so good you think?

Not! DropBox creates suspended process instances of itself when showing or removing the window.

And when DropBox exits, it doesn’t cleanup those suspended processes: you have to do that yourself.

They take up a couple of hundred kilobyte each.

You can use Taskkill. to clean them up like this:

C:\users\jeroenp>taskkill /F /IM Dropbox.exe

Which gave this result on my machine after about 15 minutes:

SUCCESS: The process "Dropbox.exe" with PID 22632 has been terminated.
SUCCESS: The process "Dropbox.exe" with PID 23680 has been terminated.
SUCCESS: The process "Dropbox.exe" with PID 21240 has been terminated.
SUCCESS: The process "Dropbox.exe" with PID 22312 has been terminated.
SUCCESS: The process "Dropbox.exe" with PID 22568 has been terminated.
SUCCESS: The process "Dropbox.exe" with PID 23116 has been terminated.
SUCCESS: The process "Dropbox.exe" with PID 23288 has been terminated.
SUCCESS: The process "Dropbox.exe" with PID 5328 has been terminated.
SUCCESS: The process "Dropbox.exe" with PID 16784 has been terminated.
SUCCESS: The process "Dropbox.exe" with PID 17248 has been terminated.
SUCCESS: The process "Dropbox.exe" with PID 15056 has been terminated.
SUCCESS: The process "Dropbox.exe" with PID 21508 has been terminated.
SUCCESS: The process "Dropbox.exe" with PID 16276 has been terminated.

I’ve seen this behaviour on Windows 7.

–jeroen

Posted in Power User, Windows, Windows 7 | Leave a Comment »

IKEA into the Hotel Business (via: nu.nl – De Jager)

Posted by jpluimers on 2013/03/07

Today, Gerrit de Jager again had a brilliant comic. This time on Marriott pairs with IKEA for its first budget hotels | Reuters.

Translates it says

IKEA gets into hotel business

“Here is your room key. And your hex key.” Read the rest of this entry »

Posted in About, IKEA hacks, LifeHacker, Opinions, Personal, Power User | Tagged: , , , , , , , , | Leave a Comment »

Convenient when translating C header files: Delphi to C++ types mapping (Embarcadero docwiki)

Posted by jpluimers on 2013/03/07

A while ago I was involved in a C header file translation for the header files of the IBM WebSphere MQ family of products, and the table helped a lot for the base types:

Delphi to C++ types mapping – RAD Studio.

A few C things missing there:

These articles helped resolving the missing bits:

Now we can do SOA between System i (a.k.a. iSeries, aka AS/400) from Windows 7.

–jeroen

PS: Later I found someone else also did a lot of work on this and published http://www.milosev.com/Download/WebSphere/WebSphereD2009.rar [WayBack] (thanks Murat Mutlu for pointing me at that) with a very thin note at http://www.milosev.com/32-mq/mq/171-delphi-2009.html [WayBack]

Posted in C++, C++ Builder, Delphi, Delphi 2006, Delphi XE2, Development, MQ Message Queueing/Queuing, Software Development, WebSphere MQ | Leave a Comment »