1992 meet 2009. 2009 say hello to 1992

Tuesday, 25 August 2009 15:51 by gibwar

I can still remember when I got my first computer. It was a Leading Edge computer running an Intel 8086 with a whopping 512 KB of RAM and an internal hard drive of 10MB! Now that was a kicking system! I quickly learned that HIMEM.SYS and EMM386.EXE only worked with Extended Memory (XMS) and Expanded Memory (EMS).

I quickly learned what things broke the system and which things don’t. format c: /y? Bad! Deletes the drive data! command.com? It’s ok, though it nests a shell.

Well, after installing the latest Windows 7, I started to feel a little nostalgic. I kind of miss those days, back where the operating system didn’t take care of you and you actually had to have an idea of what you were doing.

It got the better of me, so I managed to get Windows 3.11 online and running inside of Windows 7. They got to say hello over the network! It’s amazing that technology from 1992 can still operate in today’s world!

Without further ado, say hello again to Windows for Workgroups 3.11!

Windows for Workgroups 3.11
Tags:   ,
Categories:   Windows 7
Actions:   E-mail | Permalink | Comments (0) | Comment RSSRSS comment feed

Explorer still limited by MAX_PATH

Saturday, 22 August 2009 17:41 by gibwar

With the upcoming release of Windows 7 by Microsoft I am still surprised at a limitation of Explorer that has been around since explorer was first introduced with Windows 95. When Microsoft first introduced Windows 95 they included long filename support. This long filename support allowed Windows to store a filename of “up to 255 characters” while still maintaining compatibility with DOS and previous versions of Windows.

Remember filenames like LETTER~1.DOC and directories like PROGRA~1? Well, believe it or not they still exist by default in Windows 7! You can confirm this yourself by opening a command prompt and running the dir /x command. This will display files in the current directory with both their long filenames and DOS compatible filenames. Of course you can turn this filename generation off by setting the appropriate registry keys.

Back with Windows 95 the Windows API generally provided only ANSI functions. ANSI strings were either single-byte or a variable-width multi-byte arrays. When Windows NT came along with its new kernel, all of the internal strings were represented in Unicode (double-width) character arrays.

The string "HELLO" in ANSI:
Byte: 1 2 3 4 5 6
Data: H E L L O \0
The string "HELLO" in Unicode:
Byte: 1 2 3 4 5 6 7 8 9 10 11 12
Data: H \0 E \0 L \0 L \0 O \0 \0 \0

Along with the Unicode kernel, Windows NT also included updated APIs that used the new Unicode strings. So for every CreateFileA you now had a CreateFileW. To maintain backwards compatibility the original CreateFileA still had the limitation on the length of the path that Windows 95 did. Otherwise known by the macro of MAX_PATH which is defined as 260. Since CreateFileW was a new function, there was no backwards compatibility to maintain, so Microsoft provided a way to provide a path up to 32,676 characters. You can read more about the maximum path length on MSDN.

The drawback of still providing both APIs is that as applications pick and choose they can run into issues with the length of the path. Microsoft Word uses the CreateFileW function which allows them to create longer filenames than explorer can handle. I was hoping that in Windows 7 Explorer would finally be updated to use the Unicode CreateFile function… since Windows 95 was released over 14 years ago.

Unfortunately I ran into Explorer’s 260 character limitation just the other day. One of the deleted files resulted in a path of 273 characters long and the following dialog popped up:

The folder contains items whose names are too long for the Recycle Bin.
Tags:   , ,
Categories:   Programming | Windows 7
Actions:   E-mail | Permalink | Comments (0) | Comment RSSRSS comment feed

Understanding xAP with .Net

Saturday, 23 May 2009 19:42 by gibwar

I am currently writing a .Net application to listen, log and graph the temperatures and fan speeds of my servers using the xAP protocol. I’ll be using SpeedFan to monitor the temperatures and fan speeds of the servers because SpeedFan includes the ability to broadcast the current sensors using xAP. Sounds complicated right? We’ll lets look at the xAP protocol first.

The xAP Home Automation Protocol is a lightweight, ASCII based communication protocol. It’s a simple protocol that takes very little processing power to use and is actually easy to work with. It seems their goal is to work across multiple mediums (ethernet, serial, parallel) and multiple systems (full machine, light embedded systems, and even audrino boards!) while remaining simple and human readable.

xAP protocol message from SpeedFan
xAP-header
{
v=12
hop=1
uid=FF671100
class=PC.status
source=Almico.SpeedFan.NARU
}
temp.1
{
id=Core
curr=48.0
want=40
warn=50
}
temp.2
{
id=CPU Off Die
curr=40.0
want=40
warn=50
}
temp.3
{
id=Motherboard
curr=40.0
want=40
warn=50
}
temp.4
{
id=HD0
curr=48.0
want=40
warn=50
}
fan.1
{
id=Fan1
curr=3342
}

As you can see in the message above you can easily read the following information:

  • The class of the message is the type of PC.Status.
  • The source is from SpeedFan by Almico on the computer Naru.
  • There are 4 temperature sensors and 1 fan sensor on the server as reported by SpeedFan.

xAP over Ethernet uses a UDP broadcast on port 3639. Now, armed with this information, writing a simple .Net console application doesn’t seem too hard does it?

Hopefully by now you can already see a way or two in processing this text-based message. Believe me, it isn’t as hard as it seems! Over the next couple posts we’ll see a method for parsing the message and the incorporation of a few of the newer .Net technologies (some extension methods and lambda expressions)! Stay tuned!

TFS 2008, Server 2008, SQL 2008

Monday, 19 January 2009 14:56 by gibwar

Oye, so apparently I like pain. I keep doing it to myself too. I decided to set up a virtual machine (through Hyper-V) running Windows Server 2008 that would host a new instance of Team Foundation Server 2008. If any of you have heard of TFS before you may know that it is a pain in the ass to install. Out of the three installs I have completed I have never had one work the first time. So while following every step of the instructions to the letter, I still ended up with a failed install. As much as I would love to contribute to helping people, I have lost any idea of what I was doing  so there's no way a decent write up is happening. So here I am, wrestling with TFS yet again... so that's why I figure I like pain... I keep doing this to myself.

I changed it again!

Saturday, 17 January 2009 16:30 by gibwar

Well, in less than one week of using dasBlog I went ahead and switched blogging systems again. Surprise, surprise. I guess it was coming. Anyway the major reasons I switched is I liked their theme engine better, they allow the ability to have pages not part of the blog timeline, they can use a database if needed, and seems to be a bit more active.

As you can see I am already importing my theme that Jared designed for me for my old blog. While it isn't completed yet it should be in the next day or so (I hope).

Naturally with this engine change the syndication feed changed so make sure you update your feed readers!

Now, after many infomercials about Obama coins and listening to Chuck Norris talk about how great the Total Gym is I am headed to bed at 5:30am.

Tags:   , ,
Categories:   General
Actions:   E-mail | Permalink | Comments (0) | Comment RSSRSS comment feed

Playing with Dictation

Wednesday, 14 January 2009 23:56 by gibwar

So there I was showing David the new Windows 7 beta when we decided to play with the dictation features of Windows (speech-to-text). Naturally during the tutorial we wouldn't say exactly what was requested we would either leave out syllables or leave out whole words directly. We noticed that the tutorial would actually continue as long as you said about 50% of the words but what we didn't know until the end when it told us was it was using that initial tutorial to start training itself. Even more entertaining was their disclaimer and opt-in feature to scan my documents and emails to pick up on words and phrases that were commonly used on my computer. While it seemed like a good idea at the time, we soon found out it was a very bad idea to let it read all of that.

Here are a few sentences produced by speaking (we don't remember what we originally said unfortunately):

None of the league agreed on a dynamic built-in David built-in booya and financing built-in the event is that you cross the border town of Larry G5 to one Friday in your beta kit that the Olympic club at the very thing the government meddling in the economy that reenactment of the right file a will he do for a reenactment Cameron raveling and the only and I you are still in the lending law violate the no while they by know about one.

And here is a slightly later one:

I think the people will be downloaded it will really actually help them.

And one more:

Dictating is a bathtub edition and that the man down at the event that palin group that led by David name the other man on the red onion home directory and the drug and weapon that the file recently moved and the government the real leaders believe you're a aggressive e-mail at it but dictating is a pain the ass.

You can tell that the dictating engine had scanned my emails and documents by noticing the references to the government, the economy and Sarah Palin (don't worry, it's her Wikipedia article). I must say, it was quite an entertaining experience and I will definitely need to reset and retrain the engine if I'm ever going to use it properly.

Inspired by the YouTube video Microsoft Vista Speech Recognition Tested - Perl Scripting.

Bonus YouTube video: An Engineer's Guide to Cats.

Uh oh, not again...

Tuesday, 13 January 2009 22:52 by gibwar

So I figured I better explain myself on this one.

After a brief hiatus of over a year (yeah... "brief") I have finally decided to start blogging again. Rather than try and write my own blogging software I figured I'd fall back on an old friend, dasBlog. If any of you actually followed my blog before you might notice that I've followed this chain: dasBlog > Community Server by telligent > Tessa (my custom one) > dasBlog; talk about going full circle!

dasBlog has come quite a long way since I've last used it a few years ago. Setup was a breeze, they now have IIS7 integrated pipeline support (which means IIS7 has more control over the flow of the program and generally just seems cooler!) and they finally support .Net 2.0! While I know I could've used any online blogging service such as Google's Blogger (actually there was a one post stint on blogger), or WordPress I've always liked the idea of running my own site locally. I suppose I could've done it like Jared and had Blogger upload it to me via FTP but that still wasn't good enough. I wanted something that will work immediately, but allow me to edit it, extend it, and generally change it in the future without many problems. Naturally, understanding someone else's codebase is much harder to do than writing your own, I have learned a lot about programming in the last few years as well. In fact, that was one of the reasons I took Tessa down, I ended up learning so much that I was actually upset with what I had written and could no longer hack it together... I was actually planning on a complete rewrite!

Maybe in the future I'll progress down the same road as described above but I wanted something to let me write my topics now. You know, as they happen. This blog will be whatever I want it to be right now, there is no goal, there is no direction, it is just a place for me to jot my thoughts down and let others read them if they so desire. Obviously, given my background, most of the posts will probably be technical but that is how things work. I have gotten quite a bit of information on the internet from other blogs just like this one. Here's the scenario: some guy out there has a problem that is just causing all sorts of havoc and while the answer eludes them they eventually figure it out. Now at this point they would have a couple of choices but I am only interested in two.

  1. They do nothing and go on their merry way, maybe they wrote it down for themselves or documented it though some work order system or maybe they didn't. Who knows?
  2. They decide "hey, that was a pain, but let me write about it and post it online; that way if anyone else has this same problem, they can read my fix and get going much quicker."

I certainly hope they choose option #2 because I can benefit from it... it can save me time, and let me fix whatever the problem is quicker. Of course, whoever posted that information usually isn't asking for anything in return (generally) and will usually get nothing in return other than the satisfaction that maybe, just maybe, their post has helped someone else. (and in this field that can actually go a long way – why else would you be writing if it wasn't to help others?) So I figure after many, many years of reading posts, seeing code snippets, and having that elusive answer posted right in front of me I can finally return the favor and maybe, just maybe, someone might find my post helpful for them.

Tags:   , ,
Categories:   General
Actions:   E-mail | Permalink | Comments (4) | Comment RSSRSS comment feed

Covering my butt legally

Sunday, 26 February 2006 08:19 by gibwar

Well, in accordance to the new law my name is Joshua Edward Harley, born on July 11 (no joke) and I currently reside in Colorado Springs, CO.

Tags:   ,
Categories:   Internet
Actions:   E-mail | Permalink | Comments (3) | Comment RSSRSS comment feed

Downloading Windows Vista

Saturday, 25 February 2006 16:34 by gibwar

Well, right now as we speek, or rather type, I am downloading the new version of Vista that was released to us MSDN subscribers on Thursday. I believe the build number is 5308, the February CTP release. Downloading using the new File Transfer Manager (don't notice the speed increase... I'm capped at 160 KB/sec (that's kilobytes, not bits, if it was in bits it would be about 1,280 kpbs and that is a very *general* approximation). So hopefully it'll be done when I wake up.

Tags:   ,
Categories:   Vista
Actions:   E-mail | Permalink | Comments (0) | Comment RSSRSS comment feed

Eventlog ID 2021 (Source: Srv)

Friday, 24 February 2006 08:17 by gibwar

Well, here at work, I ran into a nice little problem with a pseudo-server. I have a Windows XP machine running as a file server, which unfortunately entails a 10 concurrent user limit (no big deal here). The problem arose when they were viewing the contents of the hard drive, loaded with .tiff files, over a 100Mbit network. Mind you, the system itself is a 350MHz, 128MB RAM system, with an 8GB (os), 30GB, and 10GB striped together. Long story short, they were having issues where the server itself just stopped responding. Looking at the event log revealed an ID error of 2021 from the process Srv. Googling that (quite simple) I came across this article: KB 317249. I ran the registry edits Microsoft recommended, and all seems to be well right now, which is nice. For those of you who didn't follow the link, long story short, the network/file viewing requests were quickly filling the non-paged pool... and once it ran out... boom.

For those of you following my blog, it seems IE7 Beta 2 (7.0.5296.0) seems to have issues using the hyperlink tool in the RichText window editor.

Tags:   , ,
Categories:   Software
Actions:   E-mail | Permalink | Comments (0) | Comment RSSRSS comment feed