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

Archive for 2013

.NET/C#: Getting volume free space from UNC path requires PInvoke of GetDiskFreeSpaceEx in Kernel32.dll

Posted by jpluimers on 2013/11/26

For some remote monitoring, I needed to get information on UNC paths.

Though suggested, you cannot do this using the System.IO.DriveInfo class (not through the constructor, nor through the VB.NET FileSystem way) as that is about drives, not UNC paths. The System.IO.DriveInfo constructor clearly indicates it doesn’t work with UNC paths. And if you still try, this is the error you will get:

System.ArgumentException was unhandled
HResult=-2147024809
Message=Object must be a root directory ("C:\") or a drive letter ("C").
Source=mscorlib
StackTrace:
at System.IO.DriveInfo..ctor(String driveName
)

Same for WMI: that only works when the UNC path has already been mapped to a drive letter.

You could do with adding a temporary drive letter but since there is nothing as permanent as a temporary

P/Invoke

The actual solution is based on calling Windows API functions using P/Invoke. Read the rest of this entry »

Posted in .NET, .NET 2.0, .NET 3.0, .NET 3.5, .NET 4.0, .NET 4.5, C#, C# 2.0, C# 3.0, C# 4.0, C# 5.0, CSV, Development, Missed Schedule, SocialMedia, Software Development, WordPress | Leave a Comment »

Optimize your Delphi installed disk size

Posted by jpluimers on 2013/11/26

Another instalment in the WordPress Missed Schedule series (:

Each version, Delphi gets more features, and grows bigger.

Especially in testing environments (where you want to have a cut-down base machine you can clone from), it is wise to cut down on the installation size.

A few directories you might want to consider compressing for your Delphi installation:

  • C:\Users\All Users\{*}
    The directories with GUID names contain the installer cache. You can ditch the whole installer cache if you keep ISO images of all installations. I prefer just to compress these directories.
    Compressing usually saves 50% of the storage there, which can count for 5+ gigabyte of savings for the newest Delphi version.
  • C:\Users\Public\Documents\RAD Studio
    Contains (among others) the help files and SVN examples, and (for the most recent version) the Platforms SDKs.
    Saving is usually a couple of 100 megabytes for less recent Delphi versions until about 1 gigabyte for the most recent.
  • C:\Program Files (x86)\Embarcadero\RAD Studio\#.0\lib
    This contains all the precompiled files. Since they are readonly in nature, it pays of compressing them, usually saving 50% or more.
    Saves 5+ gigabytes for the most recent Delphi version.

–jeroen

Posted in Delphi, Delphi XE, Delphi XE2, Delphi XE3, Delphi XE4, Delphi XE5, Development, Missed Schedule, SocialMedia, Software Development, WordPress | Leave a Comment »

Remote Android screen monitoring and viewing

Posted by jpluimers on 2013/11/25

Another one in the “WordPress Missed schedule” series.

Below are the Android remote screen monitoring/viewer/mirror tools I know about:

  • For a long time, I have used Droid@Screen: an Open Source,  Java based mature cross platform tool that uses ADB (it can even restart it for you in case it hangs) with lots of features (zooming, no temporary files, device recognition, disabling emulator devices, etc). There are some Screen Shots | Droid@Screen.
  • A while ago, I saw android-screen-monitor – Android Screen Monitor – Google Project Hosting. It is a mixed Java/C++ solution that only works on Windows.
  • Recently, Jim McKeeth open sources his Android Screen View: Android Screen View | The Podcast at Delphi.org. It is written as a quick hack in Delphi XE5, so right now it has less features and works in a more crude way than the two Java based tools, but it shows the potential of doing similar things with Delphi.

I primarily use Droid@Screen as so far it works best for me.

But I keep a close eye on the other two just to make sure I don’t miss improvements.

–jeroen

Posted in Android Devices, Delphi, Delphi XE5, Development, Java, Missed Schedule, Mobile Development, Power User, SocialMedia, Software Development, WordPress | 1 Comment »

80 Useful Keyboard Shortcuts for Microsoft Outlook

Posted by jpluimers on 2013/11/25

The ones I use most:

  • Ctrl + Y Go to Folder
  • Ctrl + Shift + M Open a new Message

–jeroen

via: 80 Useful Keyboard Shortcuts for Microsoft Outlook.

Posted in Keyboards and Keyboard Shortcuts, Office, Outlook, Power User | Leave a Comment »

silverlight – How to capture combobox selection in Caliburn Micro? – Stack Overflow

Posted by jpluimers on 2013/11/23

Interesting how you can this in such a concise way in Caliburn Micro: silverlight – How to capture combobox selection in Caliburn Micro? – Stack Overflow.

–jeroen

Posted in .NET, Development, Software Development | Leave a Comment »

Belastingdienst: opbouw betalingskenmerk, aangiftenummer, aanslagnummer, beschikkingsnummer

Posted by jpluimers on 2013/11/22

Onderstaand een aantal links hoe de diverse kenmerken en nummers van de belastingdienst zijn opgebouwd.

Ooit maak ik daar een leuk stukje software voor (:

Edit 20210216: Wayback links and an explanation of the letter and digit codes used: [Wayback] Belastingdienst Codes – Administratie Kau

–jeroen

Posted in LifeHacker, Power User | Leave a Comment »

30 years of Turbo Pascal: Integrated Approach Revolutionized Software Development (via: heise Developer)

Posted by jpluimers on 2013/11/21

Thanks for the German heise Developer people that reminded me yestarday was a special birthday of Turbo Pascal: 30 Jahre Turbo Pascal: Integrierter Ansatz revolutionierte die Softwareentwicklung | heise Developer.

The Google Translation into English isn’t bad at all.

–jeroen

Posted in Delphi, Development, Pascal, Software Development, Turbo Pascal | 2 Comments »

When the Delphi XE5 commandline compiler fails with `error F1026: File not found: ‘False.dpr’`

Posted by jpluimers on 2013/11/20

If you an error like below when compiling Delphi XE5 .dproj files using msbuild … then note the documentation for Debug information (Delphi) – RAD Studio. has not been updated yet as it still lists the values {$D+} or {$D-} {$DEBUGINFO ON} or {$DEBUGINFO OFF}.

(_PasCoreCompile target) -> C:\Program Files (x86)\Embarcadero\RAD Studio\12.0\Bin\CodeGear.Delphi.Targets(187,5): error F1026: File not found: 'False.dpr'

With Delphi XE5, you can specify 3 additional values: {$D1}{$D2} and {$D0}, or {$DEBUGINFO 1}{$DEBUGINFO 2} or {$DEBUGINFO 0}

In the msbuild .dproj files , the values are stored as DCC_DebugInformation elements. Read the rest of this entry »

Posted in Delphi, Delphi 2005, Delphi 2006, Delphi 2007, Delphi 2009, Delphi 2010, Delphi XE, Delphi XE2, Delphi XE3, Delphi XE4, Delphi XE5, Development, Missed Schedule, SocialMedia, Software Development, WordPress | 13 Comments »

ITDevCon 2013: speaker; Last=Pluimers

Posted by jpluimers on 2013/11/19

This summer was rough with some intestine issues, so I was really happy the recovery worked out and I could make it to a couple of conferences this fall.

ITDevCon 201 3was one of them, and I had great fun!

The BitTime people organizing the conference took many nice pictures of which one of me when I was explaining MVVM.

Note that the conferences downloads are online at https://bitbucket.org/jeroenp/conferences/src/tip/2013, so even if you didn’t make it you can still watch he slides and play with the examples.

Thursday there is one more conference to go: Be Delphi, and I will upload the materials from there as well.

–jeroen

Posted in Delphi, Delphi XE5, Development, Software Development | Tagged: | Leave a Comment »

LinkedIn: connecting two people, sort of. (via: LinkedIn Answers)

Posted by jpluimers on 2013/11/18

One of the things I wish that LinkedIn implements is an easy way to connect two of your relations.

I understand that the underlying issues might be a tad more difficult than this simple request (what about spam connects, or other security concerns?), but right now the way to do this is cumbersome:

how do i connect two people ?
posted June 18, 2009 in Using LinkedIn

Daniel Jatovsky:

You cant connect two people, but you can introduce them to each other. Then its up to them to connect.

There are two methods in LinkedIn for doing this.

One is to go to each persons profile. At the top of the profile is a link to Forward this profile. Click on it, forward it to the other person with a note from yourself. Once they’ve responded positively you can forward contact information to each other.

The other is to send a message to both simultaneously. To do that, go to your Inbox and click on Compose a message and select Send a message to a connection. Write a message that you can send to both simultaneously and, if you like, check the box that allows them to see the other persons name and email address.

–jeroen

via: how do i connect two people ? | LinkedIn Answers | LinkedIn.

Posted in LinkedIn, LinkedIn, Missed Schedule, Power User, SocialMedia, WordPress | 2 Comments »