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 2011

Impersonation on the iSeries: Changing Profile User

Posted by jpluimers on 2011/10/12

When running on Windows, changing the current user is called impersionation.

There are various ways to do this in Windows, including

On the iSeries, there is only one way, as everything goes through the same API: use QSYGETPH (Get Profile Handle) to verify a username/password combination and obtain a handle to the authentication token, then use QWTSETP (Set Profile Handle) to change the user currently signed on, as for instance mentioned by Colin Williams directing to the CHGCURUSR tool on FreeRpgTools.com and an article on Swapping AS/400 User Profiles by Shannon O’Donnel that comes with source code.

On the iSeries, when you are done, you should use QSYRLSPH (Release Profile Handle) when done impersonating, and you need to get the handle from the original user profile if you want to return to it.

The IBM documentation contains a small sample with QSYGETPH, QWTSETP and QSYSRLSPH that sets and restores the profile handle (edit 20120214: it got moved to http://publib.boulder.ibm.com/infocenter/iseries/v5r3/index.jsp?topic=%2Fapis%2Fapiexushand.htm)

Note that on both Windows ans iSeries, impersonation within a process/thread will make it run in the new context, but the process still keeps the identity of the user that started the process.

If you want to change that, then on both you need to start a new process from the impersonated thread.

In Windows, you can combine the impersionation and the creation of a new process by using the CreateProcessWithLogonW function (as mentioned at the Old New Thing by Raymond Chan). I’ve yet to find an equivalent on the iSeries.

–jeroen

Posted in .NET, C#, Delphi, Development, iSeries, Software Development | Leave a Comment »

EKON 15 conference news and discount (German text at the end of the blog post): Cary Jensen presents the keynote @caryjensen #ekon

Posted by jpluimers on 2011/10/11

EKON 15 – first day has many English sessions

From 26 till 28 of October, I’ll be speaking at the 15th EKON conference at the Renaissance Hotel in Düsseldorf, Germany.

I just sat next to the conference organizer, and he proudly announced that well known and long time Delphi guru Cary Jensen will be presenting the keynote on the evolution of Delphi from Delphi 1 to XE2.

I still have the disks marked “Wasabi” and “Mango” from the early 90s (and funny that Microsoft is using the same name for a 7.5 product, where Delphi 1 was a real revolution).

Next to the German sessions, there will be English sessions as well: Cary also does his other sessions that day (on cross platform development, windows services, and RESTful webservices).

Being a German conference, most of the other sessions will be in German, but it is good that the English ones are all in one day: you get a one-day visit to conference as a non-German speaker, get a discount and visit the beautiful city of Dusseldorf (especially the Altstadt is recommended).

Contact me for more information on discounts: there are both discounts for the English day and the full the whole conference.

On the EKON 15 site there is a nice conference planner and session overview.

Last but not least, on friday after the conference, Edwin van der Kraan and I will present a full day Delphi XE2 workshop covering x64, new VCL and of course FireMonkey cross platform development (so bring your Mac and iOS devices with you!).

15. EKON Konferenz – Delphi XE2 und mehr…

Vom 26. bis zum 28. Oktober findet die 15. Entwickler Konferenz (EKON) im Renaissance Hotel in Düsseldorf statt. Ich werde als Speaker ebenfalls vor Ort sein.

Als ich gerade mit dem Organisator der Konferenz zusammen saß, verkündete er mir stolz, dass Cary Jensen, bekannter und langjähriger Delphi-Guru, auf der EKON 15 eine Keynote zu Delphis Evolution von Delphi 1 zu XE2 halten wird.

Ich bin immer noch im Besitz von Disketten aus den frühen 90er Jahren, die mit „Wasabi“ und „Mango“ beschriftet sind (witzig dabei ist, dass Microsoft den gleichen Namen für ein 7.5-Produkt nutzt, während es bei Delphi 1.0 eine richtige Revolution gab).

Neben den deutschen Sessions werden auf der EKON auch Sessions auf English angeboten: Cary wird unter anderem auch über Cross-Plattform-Entwicklung, Windows Services und RESTful Web Services sprechen.

Zwar werden die meisten Sessions auf Deutsch gehalten, jedoch gibt es diesmal eine Besonderheit bei den englischen Sessions: Diese finden an einem Tag statt!
Somit können auch die Nicht-Deutschsprachigen für ermäßigten Eintritt an den Sessions auf Englisch teilnehmen und ganz nebenbei die schöne Innenstadt Düsseldorfs erkunden
(besonders die Altstadt ist sehr empfehlenswert).

Zu guter Letzt präsentieren Edwin van der Kraan und ich am Freitag einen ganztägigen XE2 Power Workshop zu x64, New VCL und natürlich zur FireMonkey Cross-Plattform-Entwicklung (bringen Sie also Ihre Macs und iOS-Geräte mit!).

Bei weiteren Fragen, Interesse und Infos über die Ermäßigungen können Sie mich gerne kontaktieren (Ermäßigte Preise gibt es sowohl für den English-Day als auch für die Gesamtkonferenz). Auf der Website finden Sie eine übersichtlichen Zeitplaner, die Sessions im Überblick und alle weiter Informationen zur Entwickler Konferenz.

–jeroen

Posted in About, Conferences, Delphi, Development, EKON, Event, Personal, Travel | Leave a Comment »

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 »

Forcing decimal dot (.) for number parsing

Posted by jpluimers on 2011/10/11

Small but useful, especially in countries that have something else than a dot (.) as decimal digit separator (all of the green countries: probably more than you’d thought).

The C# sourcecode is really simple use a NumberFormatInfo instance (or an instance of another class implementing IFormatProvider) in a Single.ToString call:

                float number = 3.1415;
                NumberFormatInfo numberFormatInfo = new NumberFormatInfo();
                numberFormatInfo.NumberDecimalSeparator = ".";
                numberFormatInfo.NumberGroupSeparator = string.Empty;
                string numberString = number.ToString(numberFormatInfo);

The classes implementing IFormatProvider are CultureInfo, DateTimeFormatInfo and NumberFormatInfo.

–jeroen

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

Mac practical joke: How to Invert Colors on a Mac – wikiHow

Posted by jpluimers on 2011/10/10

Press CtrlOptionCommand8 in your colleagues keyboard and watch them getting their inverted colours back :)

It is like the 3-finger salute on Windows, but much much nicer, as the inversion is all done on the GPU hardware :)

–jeroen

Via: How to Invert Colors on a Mac – wikiHow.

Posted in Apple, Fun, Keyboards and Keyboard Shortcuts, LifeHacker, Mac, Mac OS X / OS X / MacOS, Mac OS X 10.5 Leopard, Mac OS X 10.6 Snow Leopard, Mac OS X 10.7 Lion, MacBook, MacBook Retina, MacBook-Air, MacBook-Pro, Power User | Leave a Comment »

Adest Night of Music was een heerlijk feest #anom foto’s komen on-line @adestmusica (dank @Bvdmusic, @Cbalfoort)

Posted by jpluimers on 2011/10/10

Afgelopen zaterdagavond een spetterend feest gehad met Adest’s Night of Music.

Na het duikdrama van afgelopen week, stond ik er ‘s middags bij de generale repetitie toch met gemengde gevoelens: ik wilde wel, maar kon ik het ook waarmaken? Nu kan ik terugkijken of een meer dan geslaagd feest. Hoewel ik zelf niet helemaal de kwaliteit heb geleverd die ik had willen leveren, maakte de rest dat meer dan goed.

In de middag een goede generale gehad, waarbij Charissa Balfoort met mijn camera wat foto’s geschoten heeft.

Wat een opening met Ben van Dijk en Song for Japan, direct gevolgd door een knallende “Where Eagles Sing” van de Drum- en Showband.

Daarna de Jeugdband met hun nieuwe show Zapp Around, daarna samen met Partyband Ain’t no Secret.

De slagwerksectie van de Drum- en Showband ging door met Stinkin’ Garbage, een spektakelstuk dat tijdens de afterparty – onder het mom “we want more” nog een keer werd overgedaan.

Daarna was het de beurt aan Ben van Dijk met de blazers van de Drum- en Showband om drie mooie combinaties van bastrombone en begeleiding te spelen: Blue Topaz, Oblivion en Capriccio.

Tijdens de pauze was saxofonist Wouter Kiers al lekker bezig om tussen het publiek wat sound bites te spelen.

De Stageband ging na de pauze helemaal met hem los: een reeks swingende nummers beginnend bij American Patrol en eindigend met Splanky.

Na het leeghalen van het podium, was het weer de beurt aan de Drum- en Showband met hun Tattoo on Stage show: de eerste keer dat zoiets in Nederland werd gedaan.

Daarna kwam Ben van Dijk om samen met hen de afsluiting Cry me a River te spelen, dat na luid applaus nog eens herhaald werd.

De afterparty was voor Partyband Ain’t no Secret, die tot in de kleine uurtjes lekker door ging.

Terugkijkend op dit heerlijke feest: dat hadden we veel eerder moeten doen :)

–jeroen

Media:

Posted in About, Adest Musica, Personal | Leave a Comment »

#lopentegenkanker een success, grote opkomst, goede organisatie

Posted by jpluimers on 2011/10/10

Afgelopen zondag in de gemeente Teylingen aan Lopen Tegen Kanker meegedaan. Voor mij de eerste keer sinds een flinke tijd dat ik een 10km liep (66 minuten, niet een geweldige tijd, mar wel uitgelopen). Loopmaatje Otto van Dijk liep hem in 48 minuten (en dat met een verkoudheid!) en vrouw Nicolette liep de 5km in 36 minuten (herstellend van een hielspoor viel haar dat reuze mee). Otto – nr 123 – en ik – n3 65 – hebben zelfs de Teyding gehaald!

Twee kleine kritiekpuntjes (hebben we dat vast gehad <g>):

  1. Het afhalen van de startnummers van de voorinschrijvingen was veel te druk, waardoor beide starttijden een kwartier uitgesteld werden. Volgend jaar per afstand van de voorinschrijving 2 loketten openen, en dan loopt dat ook gesmeerd.
  2. De route op de site was niet echt heel duidelijk (tijdens het lopen wel), onderstaand de route voor de 5km en 10km die gelopen is.

Voor de rest niets dan lof over de organisatie: dit was de eerste keer dat Lopen Tegen Kanker werd georganiseerd, en het liep gesmeerd:

  1. Overal vrijwilligers die je konden helpen
  2. Goed aangegeven route
  3. Ruim voldoende verkeersregelaars
  4. Meerdere waterpunten tijdens de 10km route
  5. Heerlijke loopomstandigheden (15 graden en een klein beetje miezerregen: perfect!)
  6. Mooie omgeving (voor ik richtin Amsterdam verhuisde heb ik 25 jaar in Sassenheim gewoond, en was een beetje vergeten dat de omgeving zo mooi eigenlijk is)
  7. Een fantastische start/finish (met leuke omroeper, fijne muziekband, genoeg water, en genoeg ruimte)

Tijdens het finishen van de 10km was ook de geZZinsloop in volle gang; wat een geweldige combinatie van ouders met kinderen was dat!

Deze loop heb ik opgedragen aan loopmaatje Conny (die vrijdag een borstbesparende operatie onderging, iets dat – dankzij research – tegenwoordig met een dagopname mogelijk is!) en vrouw Nicolette (die 10 jaar geleden een erfelijke vorm van kanker kreeg, maar na een operatie – half pond bilspier weg – en bestraling toch mooi de 5 km gelopen heeft).

Ik kijk nu al uit naar volgend jaar!

Volg tegen die tijd ook weer de Twitter hash #lopentegenkanker (dit jaar staan daar een boel leuke tweets).

–jeroen

Route 5 km: Start 11:15 uur Route 10 km: Start 11:00 uur
Warmond

  1. Start Groot Leerust
  2. Dorpsstraat
  3. Gemeentehaven
  4. Rondje Koudenhoorn buitenzijde
    (met de klok mee)
  5. Gemeentehaven
  6. Dorpsstraat
  7. Burgemeester Nederburghlaan
  8. Van Beverningkstraat
  9. Warmundstraat
  10. Doctor Ammanstraat
  11. Julianastraat
  12. Margrietstraat
  13. Beatrixlaan
  14. Burgemeester Ketelaarstraat
  15. Finish Groot Leerust
Warmond

  1. Start Groot Leerust
  2. Dorpsstraat
  3. Bisschoplaan
  4. Monseigneur Aengenentlaan
  5. Oude Dam
  6. Spoorpad

Sassenheim

  1. Klinkenberg
  2. Rijksstraatweg
  3. Edisonstraat

Voorhout

  1. Oosthoutlaan
  2. Azaleahof
  3. Korenbloemstraat
  4. Distelweg
  5. Oosthoutplein
  6. Anijsweg
  7. Kruidenschans
  8. Peperzoom
  9. Peperstraat
  10. Rozemarijnhof
  11. Snoeklaan
  12. Voornhof
  13. Eikenhorstlaan
  14. Van de Berch van Heemstedeweg

Sassenheim

  1. Zandslootkade
  2. Hoofdstraat
  3. Zuilhofstraat
  4. Van Alkemadelaan
  5. Kwekersweg
  6. Wasbeekerlaan
  7. Jagtlustkade
  8. Warmonderweg

Warmond

  1. Wasbeeklaan vervangen door Warmonderweg
  2. Oosteinde
  3. Herenweg
  4. Beatrixlaan
  5. Burgemeester Ketelaarstraat
  6. Finish Groot Leerust

Posted in About, Personal | Leave a Comment »

Writing an audio CD as ISO image is a no-no: the closest you get is a .CUE file that links to either WAV files or a BIN/IMG image

Posted by jpluimers on 2011/10/10

Recently I had to create an Audio CD image to record it on a bunch of recordables to do some comparisons.

One of the things I learned is that you cannot create a CD ISO image file from a bunch of 44.1 Khz PCM encoded stereo audio WAV files.

The reason is that ISO images contain a file system, whereas audio CDs don’t (and contain their index in the sub-track data).

Since most CD software do not support the DDP format, the easiest way to go is .CUE/.BIN way:

  1. Create a .CUE file that refers to the .WAV files (for instance by using the ImgBurn  Tools -> Create CUE file option)
  2. Mount that .CUE file as a virtual audio CD using a virtual CD mounting tool like DAEMON tools
  3. Capture that .CUE/.BIN combo (some software uses .IMG instead of .BIN)
  4. Burn the .CUE/.BIN combo to physical CDs

Probably there are shorter steps (by shortcutting the mounting), but this worked fine for me.

–jeroen

Read the rest of this entry »

Posted in Power User | 1 Comment »

#lopentegenkanker wie moedigt ons zondag aan of rent mee in #warmond #sassenheim #voorhout in de gemeente #teylingen?

Posted by jpluimers on 2011/10/08

Nicolette, ik en nog ruim 400 andere mensen gaan zondagochtend Lopen Tegen Kanker.

Er zijn 4 routes: 1 wandelroute, 2 hardlooproutes en 1geZZinsloop.

Inschrijfgeld is EUR 10 per persoon voor de wandel/hardlooproutes. De geZZinsloop is een sponsorloop.

Nicolette doet de 5 km (plaatje links): een pittoreske route door Warmond en het Koudenhoorn eiland aan het Joppe.

Ik doe de 10 km: een mooie route die ook de dorpskernen van Sassenheim en Voorhout aan doet.

Er lopen vele andere mee, waaronder Otto van Dijk, Chantal Peeters en nog ruim 400 anderen.

Nicolette en ik lopen deze keer voor een loopmaatje die afgelopen vrijdag een borstbesparende operatie onderging.
Nicolette loopt uiteraard ook voor haarzelf: ze is al ruim 10 jaar vrij van kanker en ondanks het gemis van een deel van haar bilspier loopt ze die 5 km toch maar mooi mee!

Meer deelnemers en supporters langs de kant zijn van harte welkom: ik heb (vanwege de zorg rondom het duikincident in de Kreidensee) al ruim een week niet gelopen, en zaterdagavond een mooi concert (de Adest Night of Music): de 10 km wordt een uitdaging, maar met een gepast tempo en genoeg supporters gaat het gewoon lukken.

Straatnamen van de routes staan hieronder.
Let op: Op de site van Lopen Tegen Kanker is het onduidelijk welke richting de routes nemen, dus ze kunnen ook in omgekeerde volgorde zijn!

–jeroen

Route 5 km: Start 11:15 uur Route 10 km: Start 11:00 uur
Warmond

  1. Start Groot Leerust
  2. Burgemeester Ketelaarstraat
  3. Beatrixlaan
  4. Margrietstraat
  5. Julianastraat
  6. Doctor Ammanstraat
  7. Warmundstraat
  8. Van Beverningkstraat
  9. Burgemeester Nederburghlaan
  10. Dorpsstraat
  11. Gemeentehaven
  12. Rondje Koudenhoorn buitenzijde
    (met of tegen de klok in?)
  13. Gemeentehaven
  14. Dorpsstraat
  15. Finish Groot Leerust
Warmond

  1. Start Groot Leerust
  2. Burgemeester Ketelaarstraat
  3. Beatrixlaan
  4. Herenweg
  5. Oosteinde
  6. Wasbeeklaan

Sassenheim

  1. Wasbeekerlaan
  2. Kwekersweg
  3. Van Alkemadelaan
  4. Zuilhofstraat
  5. Hoofdstraat
  6. Zandslootkade

Voorhout

  1. Van de Berch van Heemstedeweg
  2. Eikenhorstlaan
  3. Voornhof
  4. Snoeklaan
  5. Rozemarijnhof
  6. Peperstraat
  7. Peperzoom
  8. Kruidenschans
  9. Anijsweg
  10. Oosthoutplein
  11. Distelweg
  12. Korenbloemstraat
  13. Azaleahof
  14. Oosthoutlaan

Sassenheim

  1. Edisonstraat
  2. Rijksstraatweg
  3. Klinkenberg

Warmond

  1. Spoorpad
  2. Oude Dam
  3. Monseigneur Aengenentlaan
  4. Bisschoplaan
  5. Dorpsstraat
  6. Finish Groot Leerust

Posted in About, Personal | 1 Comment »

Alles op het gebied van TV series: Bierdopje.com en eztv.it

Posted by jpluimers on 2011/10/08

Altijd al gezegd: overal is een site voor. En dus ook over TV series.

In dit geval dus Bierdopje.com. Samen met eztv.it heel erg handig als je inzicht wilt krijgen in welke series nu wanneer wel (of niet: als er bijvoorbeeld een sportuitzending is, of als ze ineens een film of special uitzenden) worden uitgezonden.

Er zijn zelfs mensen die de ondertitels intikken :)

–jeroen

via: Bierdopje.com | Frontpage.

Posted in LifeHacker, Power User | 2 Comments »