Microsoft Bob

Just a short, simple blog for Bob to share some tips and tricks.

Be sure to check out my non-technical blog at www.bobsbasement.net.

Month List

Inheriting C++ Code from Other Programmers

Trying to get someone else's 20-year-old C++ code to compile is like trying to translate hieroglyphics without the use of the Rosetta Stone...

cpp-errors

"Safe strings to prevent buffer overruns? Bah! Who needs 'em..."

Sad smile


UPDATE: True story - the original C++ code which was the impetus behind this blog post was written sometime around the release of Visual Studio 5 or 6, so the way that I eventually managed to get this code to compile on an up-to-date version of Visual Studio was to do the following: I set up a virtual machine in Hyper-V running Windows XP, installed Visual Studio 6.0, and compiled the code. Once I had it compiling with no errors, I kept updating the version of Visual Studio and recompiling; e.g. VS.NET, VS2003, VS2005, VS2008, VS2010, VS2012, VS2013, and finally VS2015, (which was good enough for what I needed to accomplish). As I upgraded each version of Visual Studio, I fixed whatever errors were introduced on a version-by-version basis. A few hours later and all the errors were gone, and the original program worked great.

Posted: Jun 14 2017, 22:11 by Bob | Comments (0)
  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
Filed under: CPP | Programming
Social Bookmarks: E-mail | Kick it! | DZone it! | del.icio.us

Omnicharge is Your Devices' Best Friend when Travelling

When I travel, I tend to bring a lot of interesting gear along with me, and much of that gear is designed to support my other gear. I never know what I might need, so I plan for the worst and try to bring a little bit of everything. For example, I have various chargers for phones/tablets/notebooks, etc., plus a variety of USB/Network cables and adapters, and when I'm travelling overseas I bring adapters for international electrical outlets.

However, I have often found myself at a loss for power outlets in various airports, so last year I invested in an Indiegogo campaign to support a device which I thought needed to be brought to the market: Omnicharge. While it wasn't cheap, it promised 2 fast-charging USB ports and an actual AC/DC power outlet. And I must admit, the prospect of having a way to recharge my laptop and other devices was rather appealing.

During the Indiegogo campaign, I pledged the extra cash for the Omnicharge Pro (Omni 20), which boasts 20400mAh with a maximum output of 100W. The campaign was successfully funded at 4,257% of its original goal, (with a grand total of $3,185,869 pledged), so I guess that I wasn't the only traveller who thought this was an amazing device to add to their "go bag."

Omnicharge_Side_View

I received my Omnicharge a couple months ago, and I have had a chance to travel with it a few times. So far, it has exceeded my expectations. I have been stranded with a dying laptop and no AC power outlet on more than one occasion, and the Omnicharge has rescued my laptop each time. The Omnicharge's screen and menus are easy-to-navigate, and it completely charges my Microsoft Surface Book's drained batteries in an hour (while I am still using it).

Omnicharge_Front_Panel

Now that the Indiegogo campaign has long-since ended and backers have received their "early bird" releases, you can now purchase one of these devices through Amazon at http://amzn.to/2nnZgrw.

For more in-depth information about the Omnicharge, see the following video-based overview on YouTube:

Posted: Mar 30 2017, 15:21 by Bob | Comments (0)
  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
Filed under: Technology | Reviews
Social Bookmarks: E-mail | Kick it! | DZone it! | del.icio.us

This Dude Picked the Wrong Guy to Mess With

What a great way to start my day. I just received a call on my work phone from an anonymous number where a guy with a thick accent on the other end of the line began his pitch by claiming, "This is Windows Technical Support. I am calling you today because we have been receiving a bunch of messages from your computer which are telling us that..."

lg_nortel_phones_ip_phones_8540_big

Hehe... seriously? This clueless dude had no idea he was dealing with a Microsoft employee. But then again, I had a busy day planned, so I had no time for squabbling.

I quickly cut him off and said, "Look, I can save us both a bunch of time. Do you know who I work for?"

The would-be con man was immediately taken aback and momentarily at a loss for words, but he managed to eke out a hesitant "No" as a reply.

I continued by saying, "I work for Microsoft."

The scammer attempted to regain his composure and started to reply with, "Oh, then you must know..."

I cut him off again and I asserted, "Yes, I do know. I have worked for Microsoft for over 20 years, and I know that Microsoft does not call customers like you are doing. You are a liar. And what you're doing is illegal."

Predator had turned to prey, and the hapless dolt on the opposite end of the phone began to mumble, "Honestly, sir, I... uh..."

And then I heard nothing but dial tone.

Yup, that was a great way to start my day.

Posted: Dec 08 2016, 07:21 by Bob | Comments (0)
  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
Filed under: Microsoft | Support | Windows
Social Bookmarks: E-mail | Kick it! | DZone it! | del.icio.us

Exporting and Importing Windows Media Center Recording Schedules

I ran into an interesting problem the other day which warranted some investigation: I was replacing the computer which my dad uses for Windows Media Center, (which he uses as his DVR and to watch movies), and he had an elaborate recording schedule set up for all of his favorite shows and wish lists. The problem for me - as his IT guy - was to figure out how to migrate his recording schedule from his old computer to his new computer, and as it turns out - there was already a command line solution from Microsoft which was pretty easy to use.

The tool in question is called loadmxf.exe, and you can find out more about that utility in the Windows Media Center Guide Listings Format article on MSDN.

That being said, here are the steps to export your recording schedules from one Windows Media Center computer and import them into a new Windows Media Center computer.

On Your Old WMC Computer:

  1. In Windows Explorer, navigate to the following folder:

    "%ProgramData%\Microsoft\eHome"

  2. Find the most recent "mcepgX-X" folder
  3. Find the "backup\recordings" folder
  4. Copy the latest "yyyymmdd_hhmmss" file to a share or flash drive

Note: The "yyyymmdd_hhmmss" file is an XML file which contains your recording schedule, and you can find detailed information about the data in the file in the Windows Media Center Guide Listings Format article which I mentioned earlier.

On Your New WMC Computer:

  1. Copy "yyyymmdd_hhmmss" file from earlier to the following folder:

    "%ProgramData%\Microsoft\eHome\mcepgX-X\backup\recordings"

  2. Open a command prompt and type:

    "%windir%\ehome\loadmxf.exe" -i "%ProgramData%\Microsoft\eHome\mcepgX-X\backup\recordings\yyyymmdd_hhmmss"

  3. Once completed, the tool will display the import status
  4. Open the Windows Media Center application
  5. All of your scheduled recordings should be displayed in Windows Media Center, however - they will not work until you open each scheduled recording and resave it without making any changes
Posted: Oct 28 2016, 22:12 by Bob | Comments (0)
  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
Social Bookmarks: E-mail | Kick it! | DZone it! | del.icio.us

Hacking - Hollywood Style

I read an article the other day about the "tech consultants" who work for Hollywood. (Sorry, I don't remember where I read the original article... and at the moment I don't feel like looking for it, either.)

Anyway, these consultants are acutely aware of the fact that real hacking does not make for gripping Hollywood-style action, so directors and assorted other creative supervisors ask for scenes which make for better movies. These requests - of course - lead to scenes which are so far over the top ridiculous that you have to completely dismiss reality if you actually know anything about computers. That being said, the article also mentioned that since these same consultants are aware that their scenes cannot be realistic, there is something of a competition between consultants to see who can make their scenes the least-plausible. (My favorite is the guy who used Excel and a MacBook to diffuse a nuclear bomb.)

With that in mind, a subreddit has emerged as a repository of all of these utterly ludicrous technology fails, and I have to admit - I'm hooked and I cannot stop laughing...

reddit

It's a Unix System, I know This! • /r/itsaunixsystem

www.reddit.com

A subreddit for every over the top, embarrassing, and down right flat out incorrect usage of Technology found in Movies, TV Shows, and Video Games!

Posted: Oct 08 2016, 12:56 by Bob | Comments (0)
  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
Filed under: Random Thoughts
Social Bookmarks: E-mail | Kick it! | DZone it! | del.icio.us

Fixing Underwater Videos with FFMPEG

I ran into an interesting predicament: I couldn't get the right color adjustment settings to work in my video editor to correct some underwater videos from a scuba diving trip. After much trial and error, I came up with an alternative method: I have been able to successfully edit underwater photos to restore their color, so I used FFMPEG to export all of the frames from the source video as individual images, then I used a script to automate my photo editor to batch process all of the images, then I used FFMPEG to reassemble the finished results into a new MP4 file.

The following video of a Goliath Triggerfish in Bora Bora shows a before and after of what that looks like. Overall, I think the results are promising, albeit via a weird and somewhat time-consuming hack.

Exporting Videos as Images with FFMPEG

Here is the basic syntax for automating FFMPEG to export the individual frames:

ffmpeg.exe -i "input.mp4" -r 60 -s hd1080 "C:\path\%6d.png"

Where the following items are defined:

-i "input.mp4" specifies the source MP4 file
-r 60 specifies the frame rate for the video at 60fps
-s hd1080 specifies 1920x1080 resolution (there are others)
"C:\path\%6d.png" specifies the directory for storing the images, and specifies PNG images with file names which are numerically sequenced with a width of 6 digits (e.g. 000000.png to 999999.png)

Combining Images as a Video with FFMPEG

Here is the basic syntax for automating FFMPEG to combine the individual frames back into an MP4 file:

ffmpeg.exe -framerate 60 -i "C:\path\%6d.png" -c:v libx264 -f mp4 -pix_fmt yuv420p "output.mp4"

Where the following items are defined:

-framerate 60 specifies the frame rate for the output video at 60fps (note that specifying a different framerate than you used for exporting could be used to alter the playback speed of the final video)
-i "C:\path\%6d.png" specifies the directory where the images are stored, and specifies PNG images with file names which are numerically sequenced with a width of 6 digits (e.g. 000000.png to 999999.png)
-c:v libx264 specifies the H.264 codec
-f mp4 specifies an MP4 file
-pix_fmt yuv420p specifies the pixel format, which could also specify "rgb24" instead of "yuv420p"
"output.mp4" specifies the final MP4 file
Posted: Sep 23 2016, 02:45 by Bob | Comments (0)
  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
Social Bookmarks: E-mail | Kick it! | DZone it! | del.icio.us

Correlation versus Causation

I just saw this t-shirt and I absolutely love it...

Correlation-versus-Causation

I cannot count the number of times that I have had to explain this simple concept to people who think that something coincidental was the driving force behind a problem which has developed with the technology that they use in their daily lives. For example, imagine the following statement: "I just closed the door and my television no longer works." Those two events obviously sound like completely unrelated events, and yet I have had to answer questions from dozens of people who honestly believe that one inapplicable event like this caused the other unconnected failure.

Oh sure, there are concepts like the Butterfly Effect to consider, but by and large those do not apply in your average, day-to-day situation. More often than not, the cause for most of the technology problems which I help people troubleshoot have nothing to do with what they believe to be the cause. (And believe me - I have heard some amazing theories from various people about the sources of their technological maladies.) My favorite story along these lines is the apocryphal My Car Does Not Like Vanilla Ice Cream story, which I honestly wish was true.

Nevertheless, as a piece of unsolicited advice - when something has gone wrong, it is often best to analyze the failure for what it is instead of trying to analyze what you believe is the origin of your problems.

Posted: Aug 07 2016, 19:54 by Bob | Comments (0)
  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
Filed under: Troubleshooting | Support
Social Bookmarks: E-mail | Kick it! | DZone it! | del.icio.us

First World Problems

One of the four computer monitors on my desk has died and I'm left thinking, "Well, darn. How am I going to get any work done?"

Office Drawing

(Note: They're actually flat-screen monitors; the CRTs are from Visio.)

Posted: Mar 31 2016, 14:43 by Bob | Comments (0)
  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
Filed under: Hardware
Social Bookmarks: E-mail | Kick it! | DZone it! | del.icio.us

How to Add the Nik Collection to Corel's PaintShop Pro

Following Google's acquisition of Nik Software, Google has decided to make it's suite of plugins available for free. With that in mind, I thought that I  would post a simple "How-To" guide for using the Nik plugins for anyone who is using Corel's PaintShop Pro instead of Adobe's hideously-priced Photoshop software. (Note that Photoshop is really cool, of course - it's just priced and/or licensed badly.)

In any event, here are the steps to use the Nik Collection plugins with Corel's PaintShop Pro on a Windows computer:

  1. Download the Nik Collection from https://www.google.com/nikcollection/
  2. Install the collection into the default folder; this should be something like the following path:

    "%ProgramFiles%\Google\Nik Collection"

  3. Open a Windows command prompt
  4. Change directory to the plugins folder for the version of PaintShop which you have installed; for example:

    cd /d "%ProgramFiles%\Corel\Corel PaintShop Pro X8 (64-bit)\PlugIns\EN"

  5. Create a directory junction to the Nik Collection:

    mklink /j "Nik Collection" "%ProgramFiles%\Google\Nik Collection"

  6. When you next open PaintShop, the Nik Collection will show up under Effects->Plugins:

    Nik-Plugins-For-Corel-PaintShop-Pro

That's all it takes. Have fun!

Posted: Mar 24 2016, 16:48 by Bob | Comments (0)
  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
Filed under: Photography
Social Bookmarks: E-mail | Kick it! | DZone it! | del.icio.us

Adventures With Proxy Servers

One of the things about being an ubergeek is setting up a full Active Directory Domain to manage all of the computers in my house and running my own proxy server to provide Internet access for our home network. I am currently using Microsoft's Threat Management Gateway (TMG), and before that I was using Microsoft's Internet Security and Acceleration (ISA) Server - both of which have allowed me to do some fun things.

For example, for one whole year I intercepted all requests for the Google website and sent them to a website which I had created that looked and acted like Google but used the Bing API to provide the results. (No one could tell the difference, and I eventually wrote a blog about my experiment called Fun with Search Engines.)

At other times I would intercept my kids' Internet requests and send them to a "Your Internet is Turned Off" page when they failed to complete their chores; this was often met with much grumbling on their part. (Although one of my daughters learned how to pirate a neighbor's unsecured WiFi connection, and I was too proud of her ingenuity to get upset at her for skirting around the house rules.)

Running my own proxy server was good for accountability, too: I created a program which crawled all of the proxy server logs and created detailed reports that were dumped in a public share so everyone in the family could see where everyone else was browsing. (I'm a parent - so there is no such thing as "Private Browsing" in my house.)

That being said, I recently ran into a situation where I felt it necessary to interfere with the Internet for a few days. I had seen too many people post spoilers on Facebook about who died on The Walking Dead, and my wife saw too many spoilers about what was happening on Downton Abbey. With that in mind, when Star Wars VII  was hitting the theaters, I decided that I needed to block Facebook for a few days.

But I couldn't just "block" Facebook, I needed to have fun with it... so I did this - I sent all requests for Facebook to the following page until my wife and I had a chance to see Star Wars:

http://www.microsoftbob.com/star-wars-warning.htm

Yeah, it's a really simple script - but it did the trick. ;-)

Posted: Feb 11 2016, 00:08 by Bob | Comments (0)
  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
Filed under: Windows
Tags: ,
Social Bookmarks: E-mail | Kick it! | DZone it! | del.icio.us