February 10, 2010

DEP: The Return

Filed under: .Net — Jeff @ February 10, 2010 3:26 pm

We just migrated our project to Visual Studio 2008 today and… it stopped working.  Our application is a VB.NET/C# hybrid that makes use of a number of legacy ActiveX controls.  When we ran the freshly migrated project the ActiveX controls would fail with “Invalid Access to Memory Location” errors.

 image

This is a side effect of the C# compiler now generating executables with the NXCOMPAT bit set (with no option in the IDE to turn that off).  This setting on the EXE enabled DEP (Data Execution Protection) on our program which prevents the legacy DLLs from doing what they need to do.

We’ve encountered this before here with our build machine and were able to resolve it by tweaking the build script.  Unfortunately the IDE was now failing and that’s more complicated.

On of our developers came up with a fix:

Turn of NXCOMPAT bit on build output

There is a utility called “editbin” that lets you modify the EXE and turn the NXCOMPAT bit off.  You can add it to the post-build events and that fixes the generated EXEs.  Unfortunately, the application still will not run under the IDE because it’s inheriting DEP from the vshost process.

image 

Turn off NXCOMPAT bit on vshost32.exe

To make the application run under the IDE we can turn of NXCOMPAT on the vshost32 executable using “editbin”.

image

At this point the application seems to run like it always did under the IDE.

<grumble>

February 9, 2010

Garlic Cheese Bread

Filed under: Cooking — Jeff @ February 9, 2010 8:10 am

My first garlic cheese bread.  It’s a basic white bread with big chunks of garlic and cheese.  The whole house smells but this bread is super tasty.

image

December 17, 2009

Best Firewall Rejection Message so far

Filed under: Fun — Jeff @ December 17, 2009 8:28 am

I tried to read more about a Boot CD tool that cracks WEP passwords and was denied with “Hacking/Computer Crime not allowed”.

How lame.

image

December 8, 2009

Adding GNU Emacs to the Explorer Context Menu on Windows

Filed under: Development, Software — Jeff @ December 8, 2009 8:46 am

 

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\*\shell]

[HKEY_CLASSES_ROOT\*\shell\openwemacs]
@="Edit with &GNU Emacs"

[HKEY_CLASSES_ROOT\*\shell\openwemacs\command]
@="C:\\Program Files\\emacs-23.1\\bin\\emacsclientw -n –a \"C:\\Program Files\\emacs-23.1\\bin\\runemacs.exe\" \"%1\""

November 25, 2009

Blast from the Past

Filed under: Fun — Jeff @ November 25, 2009 10:07 am

I logged in to do a build of one of our older utilities…  It’s been a while apparently…  IE5?!

image

November 17, 2009

Wow. 18 processes? That’s it?

Filed under: Unix — Jeff @ November 17, 2009 4:13 pm

I was just noticing that our incredibly out of date OpenBSD server at work has only 18 processes running on it.  That’s nuts!

image  
I’m used to my Ubuntu desktop at 177 when I’m not even doing anything.

How things change…

November 9, 2009

Creating Remember the Milk tasks from E-Mails in Outlook

Filed under: Software — Jeff @ November 9, 2009 9:29 am

I wanted to be able to quickly create Remember the Milk tasks from e-mail messages in Outlook.  Basically:

  1. Forward e-mail to your private RTM e-mail address.
  2. Change e-mail to text only because otherwise RTM won’t find embedded commands
  3. Add header with spots to fill out due date and priority
  4. Let you adjust the headers before sending it

Press “ALT+F11” to bring up the Visual Basic editor while in Outlook:

image 

Right click on “Project 1” and choose “Insert –> Module”.  Paste in the following code into the newly created “Module1” (being sure to update the e-mail address on the objMail.To line).

Sub CreateRtmTask()
Dim objMail As Outlook.MailItem
Set objItem = GetCurrentItem()
Set objMail = objItem.Forward
objMail.To = "RTM ADDRESS GOES HERE@rmilk.com"
objMail.BodyFormat = olFormatPlain
objMail.Body = "Priority: " & vbCrLf & _
                "Due: " & vbCrLf & _
                "Tags: " & vbCrLf & _
                "Location: @work" & vbCrLf & _
                vbcrfl & "—" & objMail.Body
objMail.Display
Set objItem = Nothing
Set objMail = Nothing
End Sub

Function GetCurrentItem() As Object
Dim objApp As Outlook.Application
Set objApp = Application
On Error Resume Next
Select Case TypeName(objApp.ActiveWindow)
Case "Explorer"
Set GetCurrentItem = _
objApp.ActiveExplorer.Selection.Item(1)
Case "Inspector"
Set GetCurrentItem = _
objApp.ActiveInspector.CurrentItem
Case Else
End Select
End Function

Now you can add a button.  Right click on the toolbar in the main outlook Window and choose “Customize”.  Find the Macro you just created:

image

And drag it to the toolbar in outlook.  You can the right-click on it to change the Text and Icon for it.  Voila.  

image

Now clicking on the e-mail and hitting the new button will pop-up a mostly filled out e-mail to create the task in RTM.

image

November 3, 2009

Finally Pulled the Plug w/ Dreamhost :(

Filed under: Web Hosting — Jeff @ November 3, 2009 7:05 am

I finally closed my Dreamhost account.  They’ve been absolutely fantastic but I just didn’t need it any more.  Is it strange that this e-mail actually made me sad (specifically the closing)?

Hello,

This is just an email verification for you that we’ve now closed your
Account as you just requested via our web panel.

You will no longer receive any bills from us (unless you kept an
active domain _registration_ with us) nor other communications.

We’re very sorry it didn’t work out and maybe we’ll see you again
someday!

Sincerely,
The UnHappy DreamHost Goodbye Team

October 15, 2009

Focus Blending (Part II)

Filed under: Photography — Jeff @ October 15, 2009 7:24 am

Focus Blending 2

(left: focus blended image / middle: near focus / right: far focus)

This image was a blended focus image from 6 different exposures using Enfuse.  None of those images had both foreground and background in focus at the same time.  I think it’s clear from this experiment that:

  1. Don’t use a lightweight camera on a tripod on carpet.  It moves.
  2. Don’t try to focus blend moving people.  It’s bad

Otherwise though it looks like this might actually have worked.  How cool!

October 14, 2009

Live Page Templates with PHP

Filed under: Development, Site News, Software, Web Hosting — Jeff @ October 14, 2009 12:04 pm

I’ve come up with a somewhat odd (but awesome) approach to templates for my static HTML pages that makes authoring/maintenance trivial and allowed for functional offline copies.

(article and code here)

Next Page »