Thursday, March 3, 2011

Rhino 5.0 x64 Moving To Visual Studio 2010


The 64-bit edition of Rhino 5.0 will soon be built with Visual Studio 2010. You need to update your C++ plug-ins to use Visual Studio 2010.

Here's what to do now:Please start now so we can fix any bugs you encounter, and help with any unexpected problems.

Expect frequent (weekly, or perhaps more frequent) updates to Rhino 5.0 and the SDK this month. They will be downloaded automatically, but you must start Rhino using the shortcut we install to see them.

Thursday, October 8, 2009

Saving Data Files in Vista and Windows 7

Your plug-in runs in Rhino 4.0, which runs on Windows Vista and Windows 7. Both of these operating systems deny write access to the Program Files folder by default.

If your plug-in tries to save data to the Program Files folder when it is running in Rhino 4.0 SR6 or newer, it will fail. Details...

The best place to save user-specific data is in AppData. You can get the path to this folder using the ShGetSpecialFolderPath function and passing CSIDL_APPDATA in the third argument.

Monday, August 3, 2009

Rhino 4.0 SR6 changes for Vista and Windows 7

Rhino 4.0 SR6 has been changed to operate differently when running in Windows Vista with User Account Control (UAC) enabled. These changes may result in problems with third-party plug-ins.

The change was made because of a growing number of reports of Rhino failing to start when User Account Control is enabled.

Unfortunately, it also changes how plug-ins interact with the system.

Symptoms:
Rhino 4.0 prior to SR6:
  • Rhino 4.0 SR5b and older crashes during startup on Vista With UAC enabled.
  • Rhino 4.0 SR5b and older fails to start, displaying the "Unable to communicated with license manager" error. Following instructions to enable the license manager does not help.

Cause:
Rhino 4.0 was originally written prior to the release of Windows Vista, and is compiled with Visual Studio 2005. This causes Windows Vista to detect Rhino 4.0 as a "Legacy Application" and to enable virtualization of some parts of the Windows registry and file system. To understand more about how User Account Control works, read http://technet.microsoft.com/en-us/magazine/2007.06.uac.aspx - be sure to read about file system and registry virtualization - they're keys to understanding what follows in this article.

We received a growing number of reports of problems starting Rhino 4.0 on Vista with UAC enabled. After many weeks evaluating these problems, we concluded that there were occasionally problems with both registry and file system virtualization in UAC. The problems were frequent enough that we decided to update Rhino to be Vista Aware, and thereby disable virtualization.

Solution:
In order to disable virtualization in Windows Vista, we added information to the manifest that is embedded in the Rhino 4.0 executable. Details on how we did this are outlined on MSDN: http://msdn.microsoft.com/en-us/library/bb756929.aspx

This makes it so that Rhino 4.0 SR6 is no longer running with virtualization of the file system or of the registry. This change has also been made to current Rhino 5.0 WIP releases.

Unfortunately, disabling registry virtualization broke several third-party plug-ins. We're working with the developers of each one to understand and fix the problems.

Side Effects:
Disabling virtualization means that Rhino 4.0 SR6 and all Plug-ins running under UAC:
  • Cannot write to C:\Program Files
  • Files written with previous service releases into the C:\Progam Files folder are now inaccessible because they were saved in the virtual store: C:\Users\\AppData\Local\VirtualStore\Program Files\
  • Cannot write to HKEY_LOCAL_MACHINE\Software registry hive.
  • Keys written with previous service releases cannot be read because they were saved in the virtual store: HKEY_ CURRENT_USER\Software\Classes\VirtualStore\MACHINE\Software
If your code does not handle the failure gracefully, it may cause unexpected results or crash.

Update 10/8/2009: For details on where your plug-in should save data, read Saving Data Files in Vista and Windows 7.

Support:
If you need help solving any problems related to this change, please contact developer support: http://www.rhino3d.com/developer.htm

Rhino 4.0 Plug-ins and Microsoft KB 971090 and KB 973923

Overview:
Plug-ins compiled for Rhino 4.0 after 7/28/2009 may not load on customer machines, displaying the error "Side-by-Side configuration information contains errors".

Description:
Microsoft released two service packs related to several ATL vulnerabilities the week of July 28th 2009. The vulnerabilites described in the articles do not affect Rhino, and likely do not affect third party plug-ins, as exploitation of these vulerabilities seem to be done through Internet Explorer.

However, the patches themselves will cause troubles for any third-party developer that releases a new build of a plug-in compiled with Visual Studio 2005 that has been patched with KB 971090 (http://support.microsoft.com/jb/971090).

Microsoft released an end-user patch described, KB 973923 (http://support.microsoft.com/jb/973923), that deploys updated versions of ATL DLLs to end-user computers. Microsoft failed to release updated versions of MFC, the C-Runtime, and other shared DLLs that are patched on development machines by KB 971090.

Problems for Rhino Developers:
If your development computer or automated build machine has Visual Studio 2005 (which it must to build Rhino 4.0 plug-ins), and it has Windows Update set to do automatic updates, you probably already have KB 971090 installed.

New builds of your plug-ins are linked against updated MFC (mfc80.dll), CRT (msvcr80.dll), and ATL (if you use it).

If you send this plug-in to a user with a current release of Rhino 4.0 SR6 installed, the plug-in will fail to load, displaying the error "Side-by-Side configuration information contains errors". This is because the user's system will not contain the appropriate MFC, CRT, and ATL dlls.

Solutions:
Do one of the following:
  1. Wait for the next service release of Rhino 4.0 to be released, and then compile your plug-in with the corresponding SDK, and update your installer to require that build of Rhino. This will ensure that the correct runtimes are installed. We expect for a new service release and SDK supporting these DLLs in August 2009.
  2. Deploy the updated MFC, CRT, and ATL (if you use it) with your plug-in installation. See http://social.msdn.microsoft.com/Forums/en-US/vcgeneral/thread/793f1dc8-bdd5-429f-8d42-589116cb0061 for details.
  3. Tell your customers to download and install the C-Runtimes from http://s3.amazonaws.com/mcneel/rhino/4.0/misc/vcredist_x86.exe - this is probably the worst option, given that you need to manually support your customers.

Support:
If you need help with any of this, please contact McNeel Developer Support: http://www.rhino3d.com/developer.htm

Wednesday, July 22, 2009

Rhino 4.0 SR6 SDK Released

Along with the release of Rhino 4.0 SR6 comes the release of Rhino 4.0 SR6 SDK.

Developers should upgrade their SDK for all future releases of Rhino 4.0 plug-ins. To download, visit http://download.rhino3d.com/download_rel.asp?rel=551

Friday, April 17, 2009

Rhino 5.0 Work-in-Progress SDK released

Developers interested in writing plug-ins for Rhino 5.0 (especially for the 64-bit platform) are encouraged to download the Rhino 5.0 WIP SDK.

Plug-ins compiled for Rhino 4.0 will load and run in the Rhino 5.0 32-bit edition. If you encounter problems with this, we want to know about it so that they can be fixed before Rhino 5.0 is released.

Tuesday, February 3, 2009

Rhino 4.0 SR5 SDK Released

Along with the release of Rhino 4.0 SR5 comes the release of Rhino 4.0 SR5 SDK. Developers should upgrade their SDK for all future releases of Rhino 4.0 plug-ins.

To download, visit http://download.mcneel.com/download_rel.asp?rel=454