Click here to Skip to main content
15,891,033 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: USB Drive Pin
Iain Clarke, Warrior Programmer3-Apr-09 23:29
Iain Clarke, Warrior Programmer3-Apr-09 23:29 
QuestionHow can i call a function with a CString variable ? Pin
SNArruda3-Apr-09 16:57
SNArruda3-Apr-09 16:57 
AnswerRe: How can i call a function with a CString variable ? Pin
Divyang Mithaiwala3-Apr-09 21:16
Divyang Mithaiwala3-Apr-09 21:16 
AnswerRe: How can i call a function with a CString variable ? Pin
Iain Clarke, Warrior Programmer3-Apr-09 23:41
Iain Clarke, Warrior Programmer3-Apr-09 23:41 
Question_beginthreadex() conversion error Pin
Killiconn3-Apr-09 15:42
Killiconn3-Apr-09 15:42 
AnswerRe: _beginthreadex() conversion error Pin
sashoalm4-Apr-09 2:17
sashoalm4-Apr-09 2:17 
AnswerRe: _beginthreadex() conversion error Pin
Stuart Dootson4-Apr-09 2:48
professionalStuart Dootson4-Apr-09 2:48 
QuestionStrategy Question Pin
Parker M cCauley3-Apr-09 13:40
Parker M cCauley3-Apr-09 13:40 
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?
AnswerRe: Strategy Question Pin
Iain Clarke, Warrior Programmer3-Apr-09 22:58
Iain Clarke, Warrior Programmer3-Apr-09 22:58 
QuestionRe: Strategy Question Pin
Parker M cCauley4-Apr-09 13:04
Parker M cCauley4-Apr-09 13:04 
AnswerRe: Strategy Question Pin
Iain Clarke, Warrior Programmer5-Apr-09 22:37
Iain Clarke, Warrior Programmer5-Apr-09 22:37 
GeneralRe: Strategy Question Pin
Parker M cCauley6-Apr-09 2:05
Parker M cCauley6-Apr-09 2:05 
GeneralRe: Strategy Question Pin
Iain Clarke, Warrior Programmer6-Apr-09 2:25
Iain Clarke, Warrior Programmer6-Apr-09 2:25 
GeneralRe: Strategy Question Pin
Parker M cCauley6-Apr-09 2:35
Parker M cCauley6-Apr-09 2:35 
Questiongetting nested groups from AD with win32 API Pin
Jasmine Pomelo3-Apr-09 9:03
Jasmine Pomelo3-Apr-09 9:03 
AnswerRe: getting nested groups from AD with win32 API Pin
David Crow3-Apr-09 10:47
David Crow3-Apr-09 10:47 
GeneralRe: getting nested groups from AD with win32 API Pin
led mike3-Apr-09 11:42
led mike3-Apr-09 11:42 
QuestionUnion Pin
_80863-Apr-09 7:39
_80863-Apr-09 7:39 
AnswerRe: Union Pin
David Crow3-Apr-09 8:10
David Crow3-Apr-09 8:10 
GeneralRe: Union Pin
_80863-Apr-09 8:20
_80863-Apr-09 8:20 
AnswerRe: Union Pin
CPallini3-Apr-09 8:19
mveCPallini3-Apr-09 8:19 
GeneralRe: Union Pin
_80863-Apr-09 8:23
_80863-Apr-09 8:23 
GeneralRe: Union Pin
led mike3-Apr-09 8:27
led mike3-Apr-09 8:27 
GeneralRe: Union Pin
_80863-Apr-09 8:35
_80863-Apr-09 8:35 
AnswerRe: Union Pin
Iain Clarke, Warrior Programmer3-Apr-09 23:59
Iain Clarke, Warrior Programmer3-Apr-09 23:59 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.