[Last Call] Learn how to a build a cloud-first strategyRegister Now


cannot run (without crashing) an originally 32-bit application in 64-bit environment

Posted on 2010-01-08
Medium Priority
Last Modified: 2013-12-17
The Visual Studio 2008 Visual C sharp project was created in a 32-bit version of Vista Premim no problem.

Have upgraded the o/s to Windows 7 64-bit.

The issue appears to be the .ocx libarary.  This is a 32-bit 3rd party compile / build.

In order to have VS2008 compile -- I needed to install the .ocx a slightly different way in order to have registered in memory (see by VS2008 referencing libarary).

cd \windows\syswow64
regsvr32 C:\my3rdPartyOCX.ocx

(get a registered ok prompt box confirming registerd ok)

i..e. force an initial register (on my development system) to utilise the wow64 compatibility for setting up .ocx libraries.

The original Windows WinForm project compiles -- just that when I run the application ... and get to the WinForm that use the .ocx library, the system crashes and indicates that the library is not registered.

Have changed within VS2008 the Compile configuration settings from any cpu to x86 -- including the installer project build configs.

Any further thoughts on a solution to this are very much apprieated :-)
Question by:amillyard
  • 3
  • 2
LVL 11

Expert Comment

ID: 26208192

Author Comment

ID: 26208235
have applied and double-checked that links recommendations -- am getting the same expetion error as follows:

COMException was unhandled
Class not registered (Exception from HRESULT:0x80040154 (REGDB_E_CLASSNOTREG))

When this happens, the debugger stops at the .ocx registration scripting in code -- have to then press stop debugging in order to get back into VS 2008 editor.
LVL 11

Accepted Solution

rajvja earned 2000 total points
ID: 26208327
Have you set the platform target in vs 2008 project?

Author Comment

ID: 26208357
rajvja: just got to work now :-)))

I think I updated the same place you are referring too above ... the properties tab ... Platform Target was still set to any CPU ... although had manually and saved all the other places in project to x86 as indicated.

Author Closing Comment

ID: 31674461
awesome response  timing (within 2 minutes or writing question).

excellent 'spot on' solution

and apprieated the follow up to confirm configuration.

well done rajvja :-))

Featured Post

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A theme is a collection of property settings that allow you to define the look of pages and controls, and then apply the look consistently across pages in an application. Themes can be made up of a set of elements: skins, style sheets, images, and o…
A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …

825 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question