VB Migration Partner

KNOWLEDGE BASE - General


Previous | Index | Next 

[INFO] Converted .NET applications target 32-bit CPUs by default

By default, VB Migration Partner creates .NET applications that target the 32-bit platform. This setting is necessary because it ensures that the application works correctly even if it uses one or more 32-bit ActiveX controls – including the wrapped ActiveX controls included in CodeArchitects.VBLibraryOCX.dll or those created by the AxWrapperGen tool.

Notice that the VB6Library DLL has been compiled with the “AnyCPU” option and can therefore work with both 32- and 64-bit applications. However, this DLL fails if you use one of the ActiveX controls that it wraps, namely INet, MAPIMessages, MAPISession, MSComm, ScriptControl, and Winsock.

If you are sure that your VB6 application doesn’t rely on any ActiveX control – either wrapped or not – you can enable the “AnyCPU” option for the converted .NET application in the Advanced Compiler Settings dialog box, which you reach from the Compiler page in the My Project designer (if converting to .NET) or in the Build page (if converting to C#).

If you mistakenly use the AnyCpu setting for an application that runs on a 64-bit platform, then the application will crash with the following error:

    An error occurred creating the form. See Exception.InnerException for details.  
    The error is: Retrieving the COM class factory for component with CLSID {...} 
    failed due to the following error: 80040154.

where the actual CLSID is the identifier of the ActiveX control that the application attempted to create.

 

Previous | Index | Next 




Follow Francesco Balena on VB6 migration’s group on

LinkedIn





Read Microsoft Corp’s official case study of a VB6 conversion using VB Migration Partner.




Code Architects and its partners offers remote and onsite migration services.

More details




Subscribe to our free newsletter for useful VB6 migration tips and techniques.

newsletter



To learn more about your VB6 applications, run VB6 Analyzer on your source code and send us the generated text file. You will receive a detailed report about your VB6 applications and how VB Migration Partner can help you to quickly and effectively migrate it to .NET.

Get free advice



A fully-working, time-limited Trial Edition of VB Migration Partner allows you to test it against your actual code

Get the Trial




The price of VB Migration Partner depends on the size of the VB6 application, the type of license, and other factors

Request a quote




Migrating a VB6 application in 10 easy steps

Comparing VB Migration Partner with Upgrade Wizard

Migration tools: Feature Comparison Table

All whitepapers