OCX Port

Oct 15, 2009 at 7:49 PM

I have a product that uses an activex wrapper and an ocx control.  I also have the source for the control in c++.  I was able to successfully convert it into VS2008 pro.  With almost no changes to the source I was able to successfully compile with no warnings or errors.  It is a MFC shared dll.  I checked out the tlb and it looks good with all the events and functions listed and an embedded manifest.  I used aximp to create a new activex wrapper from the tlb.  However, when I try to register the ocx I get the dreaded 0x80040200 error.  I have processmon but have seen no obvious issues with registration (not very familiar with that tool though).  I know about Vista and UAC.  I can successfully register and use the original ocx binary with an aximp generated wrapper.  It is in my current product with over 1000 copies sold to date.  I guess my questions are:

1 Any thoughts or ideas?

2. Is there a tool that will let me step through the registration process to see where it fails?

3. Is there a tool that will let me see what is in the ocx file?

Any comments are very much appreciated!

Mark

Oct 19, 2009 at 10:34 AM

Hey Mark, could you let me know your repro steps? It would help us to identify the problem or give you a solution.

Oct 19, 2009 at 9:27 PM


Thanks for your reply.  I went back over the repro steps from the beginning to verify my previous results and strangely enough was able to successfully register the .ocx and generate the activex wrapper.  The only difference in both test regressions was that I did a VS2008 update between the 2 test regressions.  It looks like now I have a c++ debug issue to figure out.  I can now see the registration with OLEView.  I have included the steps from the beginning below:

The original c++ code was developed using the Microsoft compiler 6.0.  Here are the original build settings:

Win32 ANSI Debug Tab C/C++:
  /nologo /MDd /W4 /Gm /Gi /GX /ZI /Od /D "_DEBUG" /D "VC_EXTRALEAN" /D "_WINDOWS" /D "_AFXCTL" /D "_WINDLL" /D "_AFXDLL" /D "_WIN32" /Fr".\Debug/" /Fp".\Debug/Midiio2k.pch" /Yu"stdafx.h" /Fo".\Debug/" /Fd".\Debug/" /FD /c
Win32 ANSI Debug Tab Link:
  winmm.lib /nologo /subsystem:windows /dll /incremental:yes /pdb:".\Debug/midiio2k.pdb" /debug /machine:IX86 /def:".\midiio2k.def" /out:".\Debug\midiio2k.ocx" /implib:".\Debug/midiio2k.lib"
Win32 ANSI Debug Tab Resources:
  /l 0x409 /fo".\Debug/MIDIIO2K.res" /i "$(OUTDIR)" /d "_DEBUG" /d "VC_EXTRALEAN" /d "_WIN32" /d "_AFXDLL"
Win32 ANSI Debug Tab MIDL:
  /nologo /D "_DEBUG" /D "VC_EXTRALEAN" /D "_WIN32" /mktyplib203 /win32
Win32 ANSI Debug Tab Browser:
  /nologo /o".\Debug\midiio2k.bsc"

I opened the project in VS2008 Professional.  Visual Studio converted the  project with conversion wizard.  The conversion was successful with one warning about the solution and these comments:

Conversion Issues - midiio2k.vcproj:
Web deployment to the local IIS server is no longer supported. The Web Deployment build tool has been removed from your project settings.
Project file successfully backed up as 'C:\Audio Recording\MIDI\Librarian\MIDIIO_2.1035\Source\OCX32\midiio2k.vcproj.8.00.old'.
Project upgraded successfully.
This application has been updated to include settings related to the User Account Control (UAC) feature of Windows Vista. By default, when run on Windows Vista with UAC enabled, this application is marked to run with the same privileges as the process that launched it. This marking also disables the application from running with virtualization. You can change UAC related settings from the Property Pages of the project.

When I compiled I got these warnings:

Warning 1 command line warning MIDL1007 : switch specified more than once on command line : mktyplib203 midl midiio2k
Warning 2 command line warning MIDL1007 : switch specified more than once on command line : nologo midl midiio2k
Warning 3 warning C4918: 'a' : invalid character in pragma optimization list c:\audio recording\midi\librarian\midiio_2.1035\source\ocx32\compiler.h 294 midiio2k
Warning 4 warning C4918: 'i' : invalid character in pragma optimization list c:\audio recording\midi\librarian\midiio_2.1035\source\ocx32\compiler.h 294 midiio2k
Warning 5 warning C4918: 'p' : invalid character in pragma optimization list c:\audio recording\midi\librarian\midiio_2.1035\source\ocx32\compiler.h 294 midiio2k
Warning 6 warning C4918: 'w' : invalid character in pragma optimization list c:\audio recording\midi\librarian\midiio_2.1035\source\ocx32\compiler.h 294 midiio2k
Warning 7 warning C4918: 'x' : invalid character in pragma optimization list c:\audio recording\midi\librarian\midiio_2.1035\source\ocx32\compiler.h 295 midiio2k
Warning 8 warning C4535: calling _set_se_translator() requires /EHa c:\audio recording\midi\librarian\midiio_2.1035\source\ocx32\midiictl.cpp 466 midiio2k
Warning 9 warning C4535: calling _set_se_translator() requires /EHa c:\audio recording\midi\librarian\midiio_2.1035\source\ocx32\midioctl.cpp 554 midiio2k
Warning 10 warning LNK4222: exported symbol 'DllCanUnloadNow' should not be assigned an ordinal c:\Audio Recording\MIDI\Librarian\MIDIIO_2.1035\Source\OCX32\midiio2k.def 1 midiio2k
Warning 11 warning LNK4222: exported symbol 'DllGetClassObject' should not be assigned an ordinal c:\Audio Recording\MIDI\Librarian\MIDIIO_2.1035\Source\OCX32\midiio2k.def 1 midiio2k
Warning 12 warning LNK4222: exported symbol 'DllRegisterServer' should not be assigned an ordinal c:\Audio Recording\MIDI\Librarian\MIDIIO_2.1035\Source\OCX32\midiio2k.def 1 midiio2k
Warning 13 warning LNK4222: exported symbol 'DllUnregisterServer' should not be assigned an ordinal c:\Audio Recording\MIDI\Librarian\MIDIIO_2.1035\Source\OCX32\midiio2k.def 1 midiio2k

I removed these additional command switches for the linker:

winmm.lib /nologo /subsystem:windows /dll /incremental:yes /pdb:".\Debug/midiio2k.pdb" /debug /machine:IX86 /def:".\midiio2k.def" /out:".\Debug\midiio2k.ocx" /implib:".\Debug/midiio2k.lib"

I removed these additional command switches for MIDL:

/nologo /D "_DEBUG" /D "VC_EXTRALEAN" /D "_WIN32" /mktyplib203 /win32

I removed these additional command switches for Resources:

/l 0x409 /fo".\Debug/MIDIIO2K.res" /i "$(OUTDIR)" /d "_DEBUG" /d "VC_EXTRALEAN" /d "_WIN32" /d "_AFXDLL"

I removed these additional command switches for Browse Information:

/nologo /o".\Debug\midiio2k.bsc"

The new command switches were:

Win32 ANSI Debug Tab C/C++:
/D "_DEBUG" /D "VC_EXTRALEAN" /D "_WINDOWS" /D "_AFXCTL" /D "_WINDLL" /D "_AFXDLL" /D "_WIN32" /D "_VC80_UPGRADE=0x0600" /Gm /EHa /MDd /Yu"stdafx.h" /Fp".\Debug/midiio2k.pch" /Fo".\Debug/" /Fd".\Debug/" /FR".\Debug/" /W4 /nologo /c /ZI /TP /errorReport:prompt
Win32 ANSI Debug Tab Link:
/OUT:".\Debug\midiio2k.ocx" /INCREMENTAL /NOLOGO /LIBPATH:"winmm.lib" /DLL /MANIFEST /MANIFESTFILE:".\Debug\midiio2k.ocx.intermediate.manifest" /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /DEF:".\midiio2k.def" /DEBUG /PDB:".\Debug/midiio2k.pdb" /SUBSYSTEM:WINDOWS /DYNAMICBASE:NO /IMPLIB:".\Debug/midiio2k.lib" /ERRORREPORT:PROMPT winmm.libWin32 ANSI Debug Tab Resources:
Win32 ANSI Debug Tab MIDL:
/D "_DEBUG" /D "VC_EXTRALEAN" /D "_WIN32" /mktyplib203 /nologo /char signed /env win32  /tlb ".\Debug/midiio2k.tlb"
Win32 ANSI Debug Tab Browser:
/nologo /o ".\Debug\midiio2k.bsc"

When I compiled I got these warnings:

Warning 1 warning C4918: 'a' : invalid character in pragma optimization list c:\audio recording\midi\librarian\midiio_2.1035\source\ocx32\compiler.h 294 midiio2k
Warning 2 warning C4918: 'i' : invalid character in pragma optimization list c:\audio recording\midi\librarian\midiio_2.1035\source\ocx32\compiler.h 294 midiio2k
Warning 3 warning C4918: 'p' : invalid character in pragma optimization list c:\audio recording\midi\librarian\midiio_2.1035\source\ocx32\compiler.h 294 midiio2k
Warning 4 warning C4918: 'w' : invalid character in pragma optimization list c:\audio recording\midi\librarian\midiio_2.1035\source\ocx32\compiler.h 294 midiio2k
Warning 5 warning C4918: 'x' : invalid character in pragma optimization list c:\audio recording\midi\librarian\midiio_2.1035\source\ocx32\compiler.h 295 midiio2k
Warning 6 warning LNK4222: exported symbol 'DllCanUnloadNow' should not be assigned an ordinal c:\Audio Recording\MIDI\Librarian\MIDIIO_2.1035\Source\OCX32\midiio2k.def 1 midiio2k
Warning 7 warning LNK4222: exported symbol 'DllGetClassObject' should not be assigned an ordinal c:\Audio Recording\MIDI\Librarian\MIDIIO_2.1035\Source\OCX32\midiio2k.def 1 midiio2k
Warning 8 warning LNK4222: exported symbol 'DllRegisterServer' should not be assigned an ordinal c:\Audio Recording\MIDI\Librarian\MIDIIO_2.1035\Source\OCX32\midiio2k.def 1 midiio2k
Warning 9 warning LNK4222: exported symbol 'DllUnregisterServer' should not be assigned an ordinal c:\Audio Recording\MIDI\Librarian\MIDIIO_2.1035\Source\OCX32\midiio2k.def 1 midiio2k

I took out 'a', 'i', 'p', 'w', 'x' from the pragma (optimization disabled anyway)

I changed the .DEF file from:

; midiio2k.def : Declares the module parameters.

LIBRARY      MIDIIO2K.OCX

EXPORTS
    DllCanUnloadNow     @1 PRIVATE
    DllGetClassObject   @2 PRIVATE
    DllRegisterServer   @3 PRIVATE
    DllUnregisterServer @4 PRIVATE
;(see 1.20.106)

;EXPORTS
;    DllCanUnloadNow     @1
;    DllGetClassObject   @2
;    DllRegisterServer   @3
;    DllUnregisterServer @4
; generates compile errors in visual c+ 6.0

to:

; midiio2k.def : Declares the module parameters.

LIBRARY      MIDIIO2K.OCX

EXPORTS
    DllCanUnloadNow     PRIVATE
    DllGetClassObject   PRIVATE
    DllRegisterServer   PRIVATE
    DllUnregisterServer PRIVATE
;(see 1.20.106)

;EXPORTS
;    DllCanUnloadNow     @1
;    DllGetClassObject   @2
;    DllRegisterServer   @3
;    DllUnregisterServer @4
; generates compile errors in visual c+ 6.0

When I recompiled I got no warnings and no errors.

The build output was:

1>------ Rebuild All started: Project: midiio2k, Configuration: ANSI Debug Win32 ------
1>Deleting intermediate and output files for project 'midiio2k', configuration 'ANSI Debug|Win32'
1>Creating Type Library...
1>Processing .\midiio2k.odl
1>midiio2k.odl
1>Processing C:\Program Files\Microsoft SDKs\Windows\v6.0A\\include\oaidl.idl
1>oaidl.idl
1>Processing C:\Program Files\Microsoft SDKs\Windows\v6.0A\\include\objidl.idl
1>objidl.idl
1>Processing C:\Program Files\Microsoft SDKs\Windows\v6.0A\\include\unknwn.idl
1>unknwn.idl
1>Processing C:\Program Files\Microsoft SDKs\Windows\v6.0A\\include\wtypes.idl
1>wtypes.idl
1>Processing C:\Program Files\Microsoft SDKs\Windows\v6.0A\\include\basetsd.h
1>basetsd.h
1>Processing C:\Program Files\Microsoft SDKs\Windows\v6.0A\\include\guiddef.h
1>guiddef.h
1>Processing C:\Program Files\Microsoft SDKs\Windows\v6.0A\\include\oaidl.acf
1>oaidl.acf
1>Compiling...
1>STDAFX.CPP
1>
1>----------------------------------------------------------------------
1>COMPILER.H: PROGRAM WARNING 6771, sometimes verify project settings are accurate (see _project settings.txt)
1>COMPILER.H: PROGRAM WARNING 6772, sometimes verify project settings use level 4 warnings. Specify /GX.
1>COMPILER.H: PROGRAM WARNING 6773, sometimes verify project settings uses only certain optimization. (see COMPILER.H).
1>COMPILER.H: PROGRAM WARNING 6780, sometimes Rebuild-All with DEBUGTEST configuration.
1>COMPILER.H: PROGRAM WARNING 6781, sometimes verify code with conditions related to C4706 warnings but are not shown (see PRAGMA.H and 1.20.125)
1>COMPILER.H: PROGRAM WARNING 6782, sometimes verify code does not mix 'false' and 'FALSE' (see 1.20.127)
1>COMPILER.H: PROGRAM WARNING 6783, always fix IDs that class wizard changes (see 2.00.204)
1>COMPILER.H: PROGRAM WARNING 6790, formatted most source code with tabs as 4 spaces in options (or copy tab character and search/replace it)
1>----------------------------------------------------------------------
1> WINVER not defined. Defaulting to 0x0600 (Windows Vista)
1>Compiling...
1>cathelp.cpp
1>midiictl.cpp
1>midiio.cpp
1>midiippg.cpp
1>midiiwnd.cpp
1>midioctl.cpp
1>midioppg.cpp
1>midiownd.cpp
1>queue.cpp
1>Generating Code...
1>Compiling resources...
1>Microsoft (R) Windows (R) Resource Compiler Version 6.0.5724.0
1>Copyright (C) Microsoft Corporation.  All rights reserved.
1>Compiling manifest to resources...
1>Microsoft (R) Windows (R) Resource Compiler Version 6.0.5724.0
1>Copyright (C) Microsoft Corporation.  All rights reserved.
1>Linking...
1>   Creating library .\Debug/midiio2k.lib and object .\Debug/midiio2k.exp
1>Embedding manifest...
1>Microsoft (R) Windows (R) Resource Compiler Version 6.0.5724.0
1>Copyright (C) Microsoft Corporation.  All rights reserved.
1>Creating browse information file...
1>Microsoft Browse Information Maintenance Utility Version 9.00.21022
1>Copyright (C) Microsoft Corporation. All rights reserved.
1>Build log was saved at "file://c:\Audio Recording\MIDI\Librarian\MIDIIO_2.1035\Source\OCX32\Debug\BuildLog.htm"
1>midiio2k - 0 error(s), 0 warning(s)
========== Rebuild All: 1 succeeded, 0 failed, 0 skipped ==========

The output directory was:

 Volume in drive C is SQ004668V05
 Volume Serial Number is 848A-BC85

 Directory of C:\Audio Recording\MIDI\Librarian\MIDIIO_2.1035\Source\OCX32\Debug

10/19/2009  10:06 AM    <DIR>          .
10/19/2009  10:06 AM    <DIR>          ..
10/19/2009  09:57 AM            21,626 BuildLog.htm
10/19/2009  09:56 AM             6,314 cathelp.obj
10/19/2009  09:56 AM                 0 cathelp.sbr
10/19/2009  09:56 AM         1,193,894 midiictl.obj
10/19/2009  09:56 AM                 0 midiictl.sbr
10/19/2009  09:56 AM            29,120 midiio.obj
10/19/2009  09:56 AM                 0 midiio.sbr
10/19/2009  09:57 AM         8,580,096 midiio2k.bsc
10/19/2009  09:57 AM             1,248 midiio2k.exp
10/19/2009  09:57 AM         2,423,088 midiio2k.ilk
10/19/2009  09:57 AM             1,540 midiio2k.lib
10/19/2009  09:57 AM         1,197,568 midiio2k.ocx
10/19/2009  09:57 AM               920 midiio2k.ocx.embed.manifest
10/19/2009  09:57 AM               984 midiio2k.ocx.embed.manifest.res
10/19/2009  09:57 AM               861 midiio2k.ocx.intermediate.manifest
10/19/2009  09:56 AM        27,262,976 midiio2k.pch
10/19/2009  09:57 AM         6,122,496 midiio2k.pdb
10/19/2009  09:57 AM            29,388 MIDIIO2K.res
10/19/2009  09:56 AM            21,176 midiio2k.tlb
10/19/2009  09:56 AM            37,505 midiippg.obj
10/19/2009  09:56 AM                 0 midiippg.sbr
10/19/2009  09:56 AM            21,281 midiiwnd.obj
10/19/2009  09:56 AM                 0 midiiwnd.sbr
10/19/2009  09:56 AM         3,735,008 midioctl.obj
10/19/2009  09:56 AM                 0 midioctl.sbr
10/19/2009  09:56 AM            37,626 midioppg.obj
10/19/2009  09:56 AM                 0 midioppg.sbr
10/19/2009  09:56 AM            38,037 midiownd.obj
10/19/2009  09:56 AM                 0 midiownd.sbr
10/19/2009  09:57 AM                66 mt.dep
10/19/2009  10:06 AM                 0 outtxt.txt
10/19/2009  09:56 AM           144,242 queue.obj
10/19/2009  09:56 AM                 0 queue.sbr
10/19/2009  09:56 AM           467,898 STDAFX.obj
10/19/2009  09:56 AM         3,381,306 STDAFX.sbr
09/28/2006  10:00 PM           887,808 vc80.idb
09/28/2006  10:00 PM           872,448 vc80.pdb
10/19/2009  09:56 AM         1,092,608 vc90.idb
10/19/2009  09:56 AM         2,281,472 vc90.pdb
              39 File(s)     59,890,600 bytes
               2 Dir(s)  115,918,520,320 bytes free

I was able to successfully register midiio2k.ocx in an admistrator shell using regsvr32.exe

I was able to create the axmidiiolib.dll and midiiolib.dll using aximp.exe

When I ran my app and tried tried to open the midi port I received the error:

Microsoft Visual Studio C Runtime Library has detected a fatal error in Kurzweil Librarian Editor.exe.

Press Break to debug the program or Continue to terminate the program.

This was the call stack:
> msvcr90d.dll!_crt_debugger_hook(int _Reserved=2)  Line 62 C
  msvcr90d.dll!_invalid_parameter(const wchar_t * pszExpression=0x1014e700, const wchar_t * pszFunction=0x1014eee8, const wchar_t * pszFile=0x1014e2a0, unsigned int nLine=112, unsigned int pReserved=0)  Line 112 + 0x7 bytes C++
  midiio2k.ocx!std::_Deque_const_iterator<LPQueueStreamMList,std::allocator<LPQueueStreamMList>,1>::operator*()  Line 112 + 0x41 bytes C++
  midiio2k.ocx!std::_Deque_iterator<LPQueueStreamMList,std::allocator<LPQueueStreamMList>,1>::operator*()  Line 387 C++
  midiio2k.ocx!std::deque<LPQueueStreamMList,std::allocator<LPQueueStreamMList> >::operator[](unsigned int _Pos=0)  Line 775 + 0x3d bytes C++
  midiio2k.ocx!CMidiOutCtrl::OnResetStateVars()  Line 948 + 0x10 bytes C++
  midiio2k.ocx!CMidiOutCtrl::CMidiOutCtrl()  Line 619 C++
  midiio2k.ocx!CMidiOutCtrl::CreateObject()  Line 72 + 0x47 bytes C++
  mfc90d.dll!CRuntimeClass::CreateObject()  Line 142 + 0x8 bytes C++
  mfc90d.dll!COleObjectFactory::OnCreateObject()  Line 324 + 0xb bytes C++
  mfc90d.dll!COleObjectFactory::XClassFactory::CreateInstanceLic(IUnknown * pUnkOuter=0x00000000, IUnknown * __formal=0x00000000, const _GUID & riid={...}, wchar_t * bstrKey=0x00000000, void * * ppvObject=0x002fcee0)  Line 547 + 0xd bytes C++
  mfc90d.dll!COleObjectFactory::XClassFactory::CreateInstance(IUnknown * pUnkOuter=0x00000000, const _GUID & riid={...}, void * * ppvObject=0x002fcee0)  Line 464 C++
  ole32.dll!DllGetClassObject()  + 0x14b7 bytes 
  [Frames below may be incorrect and/or missing, no symbols loaded for ole32.dll] 
  ole32.dll!CoGetComCatalog()  + 0xaba bytes 
  ole32.dll!DllGetClassObject()  + 0x15db bytes 
  ole32.dll!DllGetClassObject()  + 0x1550 bytes 
  ole32.dll!DllGetClassObject()  + 0x139a bytes 
  ole32.dll!DllGetClassObject()  + 0x134b bytes 
  ole32.dll!DllGetClassObject()  + 0x163e bytes 
  ole32.dll!CoGetComCatalog()  + 0xaba bytes 
  ole32.dll!CoGetComCatalog()  + 0xb65 bytes 
  ole32.dll!CoGetComCatalog()  + 0xaba bytes 
  ole32.dll!CoGetComCatalog()  + 0x9ba bytes 
  ole32.dll!CoCreateInstanceEx()  + 0xd7 bytes 
  ole32.dll!CoCreateInstanceEx()  + 0x38 bytes 
  ole32.dll!CoCreateInstance()  + 0x34 bytes 
  [Managed to Native Transition] 
  System.Windows.Forms.dll!System.Windows.Forms.AxHost.CreateWithoutLicense(System.Guid clsid) + 0x2e bytes 
  System.Windows.Forms.dll!System.Windows.Forms.AxHost.CreateWithLicense(string license, System.Guid clsid) + 0xb5 bytes 
  System.Windows.Forms.dll!System.Windows.Forms.AxHost.CreateInstanceCore(System.Guid clsid) + 0x29 bytes 
  System.Windows.Forms.dll!System.Windows.Forms.AxHost.CreateInstance() + 0x3f bytes 
  System.Windows.Forms.dll!System.Windows.Forms.AxHost.GetOcxCreate() + 0x16 bytes 
  System.Windows.Forms.dll!System.Windows.Forms.AxHost.TransitionUpTo(int state = 2) + 0xd2 bytes 
  System.Windows.Forms.dll!System.Windows.Forms.AxHost.CreateHandle() + 0x26 bytes 
  System.Windows.Forms.dll!System.Windows.Forms.Control.CreateControl(bool fIgnoreVisible = false) + 0x8a bytes 
  System.Windows.Forms.dll!System.Windows.Forms.Control.CreateControl() + 0x24 bytes 
  System.Windows.Forms.dll!System.Windows.Forms.Control.ControlCollection.Add(System.Windows.Forms.Control value = {AxMidiioLib.AxMIDIOutput}) + 0x147 bytes 
  System.Windows.Forms.dll!System.Windows.Forms.Form.ControlCollection.Add(System.Windows.Forms.Control value) + 0x3b bytes 
  System.Windows.Forms.dll!System.Windows.Forms.Control.ParentInternal.set(System.Windows.Forms.Control value) + 0x29 bytes 
  System.Windows.Forms.dll!System.Windows.Forms.Control.Parent.set(System.Windows.Forms.Control value) + 0xb bytes 
  Kurzweil Librarian Editor.exe!Kurzweil_Librarian_Editor.MIDI_Interface.Get_All_MIDI_Out_Ports(Object sender = {Kurzweil_Librarian_Editor.MIDISysex}) Line 894 + 0x4e bytes Basic
  Kurzweil Librarian Editor.exe!Kurzweil_Librarian_Editor.MIDISysex.ToolStripTextBox4_Click(Object sender = {System.Windows.Forms.ToolStripTextBox}, System.EventArgs e = {X = 317 Y = 4 Button = System.Windows.Forms.MouseButtons.Left}) Line 1375 + 0xe bytes Basic
  System.Windows.Forms.dll!System.Windows.Forms.ToolStripItem.RaiseEvent(object key, System.EventArgs e) + 0x58 bytes 
  System.Windows.Forms.dll!System.Windows.Forms.ToolStripItem.OnClick(System.EventArgs e) + 0x24 bytes 
  System.Windows.Forms.dll!System.Windows.Forms.ToolStripControlHost.HandleClick(object sender, System.EventArgs e) + 0xe bytes 
  System.Windows.Forms.dll!System.Windows.Forms.Control.OnClick(System.EventArgs e) + 0x70 bytes 
  System.Windows.Forms.dll!System.Windows.Forms.TextBoxBase.OnMouseUp(System.Windows.Forms.MouseEventArgs mevent = {X = 317 Y = 4 Button = Left}) + 0x77 bytes 
  System.Windows.Forms.dll!System.Windows.Forms.Control.WmMouseUp(ref System.Windows.Forms.Message m, System.Windows.Forms.MouseButtons button, int clicks) + 0x28f bytes 
  System.Windows.Forms.dll!System.Windows.Forms.Control.WndProc(ref System.Windows.Forms.Message m) + 0x885 bytes 
  System.Windows.Forms.dll!System.Windows.Forms.TextBoxBase.WndProc(ref System.Windows.Forms.Message m) + 0x37 bytes 
  System.Windows.Forms.dll!System.Windows.Forms.TextBox.WndProc(ref System.Windows.Forms.Message m) + 0x93 bytes 
  System.Windows.Forms.dll!System.Windows.Forms.ToolStripTextBox.ToolStripTextBoxControl.WndProc(ref System.Windows.Forms.Message m) + 0x11 bytes 
  System.Windows.Forms.dll!System.Windows.Forms.Control.ControlNativeWindow.OnMessage(ref System.Windows.Forms.Message m) + 0x10 bytes 
  System.Windows.Forms.dll!System.Windows.Forms.Control.ControlNativeWindow.WndProc(ref System.Windows.Forms.Message m) + 0x31 bytes 
  System.Windows.Forms.dll!System.Windows.Forms.NativeWindow.DebuggableCallback(System.IntPtr hWnd, int msg = 514, System.IntPtr wparam, System.IntPtr lparam) + 0x57 bytes 
  [Native to Managed Transition] 
  user32.dll!GetWindowLongW()  + 0x4b3 bytes 
  user32.dll!GetWindowLongW()  + 0x58b bytes 
  user32.dll!GetMessageW()  + 0x296 bytes 
  user32.dll!DispatchMessageW()  + 0xf bytes 
  [Managed to Native Transition] 
  System.Windows.Forms.dll!System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(int dwComponentID, int reason = -1, int pvLoopData = 0) + 0x24e bytes 
  System.Windows.Forms.dll!System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(int reason = -1, System.Windows.Forms.ApplicationContext context = {Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.WinFormsAppContext}) + 0x177 bytes 
  System.Windows.Forms.dll!System.Windows.Forms.Application.ThreadContext.RunMessageLoop(int reason, System.Windows.Forms.ApplicationContext context) + 0x61 bytes 
  System.Windows.Forms.dll!System.Windows.Forms.Application.Run(System.Windows.Forms.ApplicationContext context) + 0x18 bytes 
  Microsoft.VisualBasic.dll!Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun() + 0x81 bytes 
  Microsoft.VisualBasic.dll!Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.DoApplicationModel() + 0xef bytes 
  Microsoft.VisualBasic.dll!Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(string[] commandLine) + 0x68 bytes 
  mscoree.dll!_CorExeMain()  + 0x34 bytes 
  kernel32.dll!BaseThreadInitThunk()  + 0x12 bytes 
  ntdll.dll!RtlInitializeExceptionChain()  + 0x63 bytes 
  ntdll.dll!RtlInitializeExceptionChain()  + 0x36 bytes 

I went through Dependency Walker to check dependencies.  These issues turned up:

MSVCR90D.DLL - Not Found
IESHIMS.DLL - Not Found

c:\windows\system32\IEFRAME.DLL

#160 - Not Bound
#159 - Not Bound
#141 - Not Bound

I believe that MSVCR90D.DLL is the debug run time (Microsoft® C Runtime Library, v. 9.0.30729.1).
It was not in the system32 directory.  I retrived these files and paced them the system32 directory.  I still have the "Not Bound" issues for:

#159
#141
#160
#165
#167
#142