End Google Ads 201810 - BS.net 01 --> OK, I have had my head in the sand.... I use VS 6 SP5 MFC. I maintain a legacy application which Vista has broken.

Currently I am using Codejocks Extreme toolkit Automatically linking with ToolkitPro1010vc60SD.lib

I have upgragrated to the latest, but not yet tried a build (too much other stuff going on).

My SDK libs are probably old. I understand the issues with UAC and MS's Stupid vituraliztion scheme unless you have a manifest entry telling them you know about UAC. I also understand their renaming the directory stuctures.

Years ago when they were pushing their com tecnology I bought in and split my program (500k+ lines of code) into several different EXEs which communicate with each other via COM.

Big mistake. Anyway, I won't rant. Back then they preached that you should write to the registry all the time (each time you started to make sure it hadn't gotten corrupted, so all my exe's have something like this in them)

//-----------------------------------------------------------------------------
//Check to make sure we have write permissions to the registry. If we don't, don't
//attempt to register. We won't have write permissions if we are running on
//Windows 200 or XP as a limited user.
LONG lResult = ::RegCreateKeyEx(HKEY_CLASSES_ROOT,sDocClass, 0, "", REG_OPTION_NON_VOLATILE,KEY_ALL_ACCESS, NULL,&hTestKey, NULL);
if ((ERROR_SUCCESS == lResult) && (hTestKey != NULL))
{
g_bLimitedUser = FALSE;
//-------------------------------------------------------------------------------------
// It's ok to call UpdateRegistry
m_server.UpdateRegistry(OAT_DISPATCH_OBJECT);
COleObjectFactory::UpdateRegistryAll();
//-------------------------------------------------------------------------------------
BOOL bResult = AfxOleRegisterTypeLib(m_hInstance, LIBID_NTUExplorer);

if (bResult == 0)
{
AfxMessageBox("AfxOleRegisterTypeLib Failed");
}
//-------------------------------------------------------------------------------------
if (RegisterComponents() == FALSE)
{
CString sCaption = BuildVerString2() + "Unrecoverable Error";
CString sError = "Unable to Register Components. Aborting Launch!!!";
SafeUserNotification(sError,sCaption);
if (g_pMainFrame)
g_pMainFrame->PrepareToClose();
return FALSE;
}
}
OK, so Vista comes along and
//Windows 200 or XP as a limited user.
LONG lResult = ::RegCreateKeyEx(HKEY_CLASSES_ROOT,sDocClass, 0, "", REG_OPTION_NON_VOLATILE,KEY_ALL_ACCESS, NULL,&hTestKey, NULL);


succeeds but

BOOL bResult = AfxOleRegisterTypeLib(m_hInstance, LIBID_NTUExplorer);


Fails. I hesitate to update the SDK because I am running VS 6 and things are very stable... Who knows what might crop up.

SO, as I see it, I have a couple of options...

Move all my registration to the install program as they now suggest (contratry to previous suggestions) add the manifest entry, dink with my directory structure and things will probably work, although VS 6 doesn't officially run on Vista (I have gotten it installed and it seems to run OK)

or

Bite the bullet, move to VS2008, regen my skeleton apps. Populate them with my code and Deal with the ansi compiler issues and hope for the best....

Any thoughts on what you would do? I have tried .net, 2003, 2005, and pitched them all in favor VS6. If you are a MFC developer there is little reason to move to those platforms... What about VS 2008?