Arrived

… is the name of a small Win32 command line tool I wrote. It executes a command whenever a volume (e.g. USB memory stick, portable hard drive) gets connected to or disconnected from the machine. The particular use-case for which it was written is, to execute an NT shell script whenever this happens.

The command can be freely chosen, but must be a program and/or script file. ShellExecute is used to execute it with the open verb. In order to make sense, the tool appends arrival and the drive letter to the command line. If it will be extended, new operations (currently only arrival) will be defined (e.g. removal).

So if you execute the tool like this:

arrived myscript.cmd

… it will execute the following command if you plug a USB drive in:

myscript.cmd arrival X:

X: is the drive letter of the newly connected drive. In order to make sure that the drive has settled after connecting, the tool will wait 15 seconds. This is not at the moment configurable. If enough people use it and let me know about it, I’ll probably make it configurable.

// Oliver

Download: here

REDISTRIBUTION TERMS: The source is of course included. The whole package is released into the PUBLIC DOMAIN. Disclaimer: This software is provided ‘as-is’, without any express or implied warranty. In no event will the author be held liable for any damages arising from the use of this software.
NOTE: The SimpleBuffer.h has its own license and is not released into the public domain, since I do not own the copyright for it! It is available under the BSD license.

Posted in /dev/null, EN, Programming, Software | Leave a comment

Silly little C++ wrapper class

Did you ever have the same problem: if you want to compiler a Win32 program with UNICODE/_UNICODE defined, for some reason the argv vector does not contain a single proper argument?! This happens in particular in DDK/WDK projects. I was sick of it, so here’s a little wrapper class that does almost nothing if UNICODE/_UNICODE are not defined and otherwise simply fills new values into the argc and argv parameters to the main/wmain function. The use is as simple as can be, make sure shell32.lib is linked in and include ShellAPI.h, then simply instantiate the class within (w)main like this:

CTcharArgs dummy(argc, argv);

Easy, huh? Here’s the class:

class CTcharArgs
{
public:
    CTcharArgs(int &argc, _TCHAR** &argv)
#if defined(UNICODE) || defined(_UNICODE)
        : m_argv(::CommandLineToArgvW(::GetCommandLine(), &m_argc))
#endif // UNICODE
    {
#if defined(UNICODE) || defined(_UNICODE)
        argc = m_argc;
        argv = m_argv;
#endif // UNICODE
    }

#if defined(UNICODE) || defined(_UNICODE)
    ~CTcharArgs()
    {
        if(m_argv)
        {
            ::LocalFree(reinterpret_cast(m_argv));
        }
    }
private:
    LPWSTR* m_argv;
    int m_argc;
#endif // UNICODE
};

This class is released into the PUBLIC DOMAIN. Disclaimer: This software is provided ‘as-is’, without any express or implied warranty. In no event will the author be held liable for any damages arising from the use of this software.

// Oliver

PS: Should even be compatible with cross-platform code (in which case _TCHAR will probably be an alias for char) 😉

Posted in EN, Programming, Software | 1 Comment

Taser: Ungefährliche Waffe?

Nach 5 Sekunden haben die beiden Herren in dem Video noch immer einen verhältnismäßig großen Mund. Wohlgemerkt, das ist nach nur fünf Sekunden in den Rücken. Hier (siehe damaliger TP-Artikel) gibt es die lange Variante bei der ein verwirrter – aber nicht wirklich gefährlich anmutender – Pole von kanadischen Polizisten frontal mit “a bisserl” längerem Stromstoß niedergestreckt wird – final niedergestreckt!

All das bloß, weil keiner da war, der seine Sprache sprach und die Polizisten – zu viert – sich offenbar nicht in der Lage sahen den Mann, der bei der Übermacht deutlich ruhiger erscheint, ohne den Taser zu überwältigen. Soviel zum Thema nicht-tödliche Waffen.

// Oliver

Posted in DE, Gedanken | Leave a comment

Übercool!

Check this out: predef.sourceforge.net.

Posted in EN, Programming | Leave a comment

“Define change!”

… that’s what people should have told Obama when he was preaching “change” to them. Now that names of his future staff transpire to the public, things do not look so revolutionary anymore. I’ll stay a skeptic for now.

// Oliver

Posted in /dev/null, EN | 2 Comments

http://www.vimeo.com/2067274

Posted in /dev/null, EN | Comments Off on

Hätte man doch

… tja, hätte man doch bspw. ein Lexikon oder die Wikipedia bemüht um mit einem Irrglauben aufzuräumen, dem man nun schon sehr lange aufsitzt. In meinem Fall betrifft dieser Irrglaube Kümmel und seinen quasi “Stiefbruder” den Kreuzkümmel. Jeder Mensch weiß, daß man in Sauerkraut ein wenig Kümmel machen sollte. Leider kannte ich bis heute nicht den Unterschied zwischen Kreuzkümmel (muß doch wegen des Namens ein Kümmel sein …) und echtem Kümmel. Aufgrund eines Bildes das mir jemand zur Erklärung des isländischen Begriffes (der im Englischen ebenso existiert) “cumin” einst gezeigt hat, war für mich klar, daß das Kümmel sein müsse. Denkste. Ich kann nur jedem empfehlen mal als Experiment in der Küche einen kleinen Teil des Sauerkrautes (oder anderen Gerichten die echten Kümmel verlangen) mit Kreuzkümmel zuzubereiten.

Glücklicherweise bin ich kein sonderlicher Fan von (echtem) Kümmel, schätze aber schon die “Note”. Daher habe ich nur ein wenig von “der Fälschung” (also dem Kreuzkümmel) reingemacht. Heute gab das schon bei einigen Bissen eine unangenehme Überraschung, wie das auch im Wikipedia-Artikel zum Kreuzkümmel (s.o.) beschrieben wird. Mal sehen wie das morgen wird …

Und das bei den Schwierigkeiten hier auf Island überhaupt an Sauerkraut zu kommen. Von geschmacksarm kann man dennoch nicht reden, immerhin gibt es hier Spezialitäten wie hákarl – lecker “fermentierter” Grönlandhai in Bröckchen (paßt hervorragend zum auch nicht so toll schmeckenden Brennivín) – súrsaður hrútspungar – in Sauermolke eingelegte Schafsbockeier – und nicht zuletzt den am Vorweihnachtstag beliebten kæst skata – kurz: Gammelrochen – die alle ein sehr intensiver Geschmack verbindet. Erst bei sviðasulta – Schafskopfsülze (auch gern mit Augen) – und slatur – unserer Grützwurst nicht unähnlich – wird der deutsche Magen wieder etwas versöhnlicher mit der isländischen Küche gestimmt. Bei kandierten Kartoffeln hört dann allerdings der Spaß absolut auf. Auch hier kann man einer Verwechslung aufsitzen – die sehen vergrößerten (frittierten) Kartoffelbällchen leider allzu ähnlich. Aber nicht mehr wenn man inzwischen vorgewarnt ist … siehe dazu auch der sehr unvoreingenommene Artikel Isländische Küche bei Wikipedia.

// Oliver

PS: Echten Kümmel scheint es übrigens dann hier nicht zu geben … Briefchen oder Hilfslieferungen willkommen 😉 :mrgreen:

Posted in /dev/null, DE, Island/Iceland/Ísland | 1 Comment

Apology to the Icelandic people

Last week I felt happy to have found some Sauerkraut in an Icelandic shop – unwittingly I took two bags at once. I could not have possibly known that this would be the complete supply of Sauerkraut for Iceland for the next year, as I was amazed this week not to find a single bag of Sauerkraut anymore. As I mentioned, I was not aware of the fact that I would buy the whole supply of this healthy dish, that Iceland got for the next year. Please take my apologies.

// Oliver ( 😉 )

Posted in EN, Island/Iceland/Ísland | Leave a comment

Reminder to self

Howto: “Replacing the trunk of a Subversion repository with a feature branch

# From the working copy of my branch:
$ svn del file:///repos/trunk -m "Temporarily deleted trunk."
$ svn mv file:///repos/branches/my_branch file:///repos/trunk \
   -m "Moved /branches/my_branch to /trunk"
$ svn switch file:///repos/trunk
Posted in /dev/null, EN, Programming | Comments Off on Reminder to self

Why is it, everyone is interested in the US elections?

… I mean at the end of the day only US citizens will have had the chance to vote, right? Is it perhaps because the world has learnt the painful way how far an American President can go?!

Let’s see what comes of this election …

Posted in /dev/null, EN, Thoughts | 2 Comments

Eigentlich finde ich die Verhandlungen zu ACTA gut

Warum? Weil sie zeigen wie undemokratisch die sogenannten westlichen Demokratien geworden sind. Das Abkommen an dem gewerkelt wird, finde ich dementsprechend SCHEISSE!

// Oliver

Posted in DE, Gedanken | Leave a comment

Nee, oder?

Bei der Zeit kann man nachlesen woher die offenkundige Abneigung von Dagmar Metzger stammt:

Die 49-Jährige Bankkauffrau und Wirtschaftsjuristin ist eine erfahrene Kommunalpolitikerin, in den Landtag ist sie im Januar zum ersten Mal gewählt worden. Ihre Abneigung gegen die Linke leitet Metzger vor allem aus Erfahrungen in Berlin her. Sie habe erleben müssen, wie entgegen offiziellen SED-Verlautbarungen die Mauer gebaut und ihre Familie zerrissen wurde, sagte sie.

Um es zusammenzufassen: als Wunderkind Dagmar 1961 im Alter von zweieinhalb Jahren (im Fernsehen? … gar Farbfernsehen?) Herrn Ulbricht mit seinem allseits bekannten Satz: “Niemand hat die Absicht, eine Mauer zu errichten.” hörte und dieser etwa zwei Monate später sein Wort brach, war das eine sehr traumatische Erfahrung für sie, wie man bis heute am hochstehenden Schopf erkennen kann …

Nee, is klaaaaaar …

Posted in DE, Ich, der Zyniker | 3 Comments

Icelandic “terrorists” revisited …

Thorkell Thorkelsson, an Icelandic photographer, shows the faces of a few dozen Icelandic “terrorists” and their weapons in a gallery on his website. Go and have a look! 😉

// Oliver

Posted in EN, Island/Iceland/Ísland | Leave a comment

Markenfälschung

Da bringt ein Erzbischof, der zufällig den gleichen Namen wie ein großer Denker – was man bei Erzbischöfen bekanntermaßen nicht befürchten muß – trägt, ein Buch mit dem gleichen Namen heraus wie dieser große Vordenker: “Das Kapital”.

Vielleicht hätte sich der Herr Bischof aber mal ein Vorbild an dem Gesamtwerk des Karl Marx nehmen sollen anstatt sich billig als Trittbrettfahrer zu gerieren. Wer weiß wie vielen Menschen, denen interessante Einblicke in den Kapitalismus “gedroht” hätten, nun dank des braven Oberhirten aus Bayern das Auffinden des Originalwerks “erspart” bleibt …

// Oliver

Posted in DE, Gedanken | Leave a comment

http://news.yahoo.com/s/nm/20081027/us_nm/us_usa_shooting_boy_2

Posted in /dev/null, EN | Comments Off on

“Yes we can” …

Can you? There is one candidate in the race for the next US presidency who advertises with the slogan: “Change” and “Yes we can” – Barack Obama. For me there is one reason why I think it might be interesting to see him in office, instead of John McCain: the death penalty.

While I hold it with Gore Vidal otherwise, who stated in the 1970s:

[…] here is only one party in the United States, the Property Party…and it has two right wings: Republican and Democrat. (Gore Vidal)

… Obama may have the guts to lead the US into modern times and abolish capital punishment after all.

Given the list of countries in which the death penalty is still exercised, the US government and the people living there should have asked themselves long ago why they are in such a bad company.

If he wins, he can try to prove his point …

// Oliver

PS: Yes I know the publicly stated stance Obama has – yet it will be interesting.

Posted in EN, Thoughts | 5 Comments

Ich versteh es nicht …

Vor ein paar Wochen nur, überweist eine deutsche Bank Geld an eine ausländische Bank (Lehman Brothers), die gerade darin begriffen ist pleitezugehen und man erzählt uns, das Geld sei verloren. Komischerweise muß ich als Kunde sogar bei innerdeutschem Bankverkehr mehr als einen Tag warten bis eine Überweisung durch ist. Wieso hat man das Geld nun nicht zurückbekommen können?

Posted in DE, Gedanken | Leave a comment

DDKBUILD.CMD 7.3/r27 released

Hereby I announce the release of DDKBUILD.CMD 7.3/r27. The version numbers are according to what I posted earlier here. This release contains really minor improvements only, but fixes also one bug that was reported over at OSR. This was caused due to sloppy handling of the command line flags.

Furthermore this revision has been tested more thoroughly than previous ones, so I hope it will be the DDKBUILD for some time to come.

Enjoy this release. Download the latest version of DDKBUILD.CMD as always from the DDKWizard website or over at osronline.com.

// Oliver

PS: At the time of this writing the trunk version and the release version are identical. Obviously this will change over time, but you would be able to see this from the changed revision number (current one is 27).

Posted in DDKWizard/DDKBUILD, EN, Programming | Leave a comment

Dear Film Industry, … you suck!

That said, please let me go into more detail. Today I tried to watch a Russian DVD (title “Сёстры”, on IMDB) that I bought from a shop in Germany. Now, the shop certainly imported that DVD from Russia according to the imprints and (Russian) seals on the DVD case. Those seals are meant to distinguish pirated copies from licensed ones. Why exactly is it, I can’t watch this DVD on my Philips DVD player, purchased here in Iceland?

The laconic statement on the screen reads: “Wrong Region”.

Guess what, I just started to sympathize with the guys from “The Pirate Bay”. I have a DVD – one that I bought – and I can’t watch it because some overly greedy people always need to segregate humanity in order to increase their own profits.

Oh wait. Instead of getting the licensed and legal version I probably should have asked some Russian friends of mine to get me an “underground copy”, right? Is that what this is all about? You want to get people to do illegal things in order to be able to punish them later on? Where’s the old saying that “the customer is always right”? To restate the obvious: you suck!

Haha, customer. Yeah … a similar feeling I had when I had bought the first DVD of the “Lord of the Rings” trilogy just to find an ad on it that explained to me how cool the extended cut was and that it would be out shortly after the time I had bought the DVD. Back then I decided not to watch the other parts of the trilogy and I never did. If it wasn’t a whole industry doing it, the guy doing it would be locked away … but since everyone does it, it’s okay. I call it organized deceit, though.

“Спасибо большое” и пошли все на…!

// Oliver

PS: The movie is several years old, so the stupid argument about different release dates in different regions is moot. Just get a grip on reality and let customers watch what they want. You could even introduce some kind of expiry date for the region lock that is, say, one year after the planned release. No problem with me. But as a matter of fact it is near-impossible to get Russian movies in Western shops, so there is no alternative …

Posted in EN, Thoughts | 5 Comments

For all IDA friends …

The fix to the memory sync problem in the debugger (5.3) has been fixed. You’ll need to upload your key to get the fix.

Posted in EN, Reversing, Software | Tagged | Leave a comment