From 00fe4a2b2849abf0ffe43cf1cfb12804277196cb Mon Sep 17 00:00:00 2001 From: "mkaply%us.ibm.com" Date: Thu, 20 Feb 2003 23:10:28 +0000 Subject: [PATCH] #174366 r=pedemont, sr=blizzard (platform specific), a=asa OS/2 only - make Mozilla the default browser after install git-svn-id: svn://10.0.0.236/trunk@138050 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/xpinstall/wizard/os2/setup/ifuncns.c | 63 ++++++++++++++++++-- 1 file changed, 57 insertions(+), 6 deletions(-) diff --git a/mozilla/xpinstall/wizard/os2/setup/ifuncns.c b/mozilla/xpinstall/wizard/os2/setup/ifuncns.c index 1c5af83c59e..60ee75b7b34 100644 --- a/mozilla/xpinstall/wizard/os2/setup/ifuncns.c +++ b/mozilla/xpinstall/wizard/os2/setup/ifuncns.c @@ -1341,6 +1341,38 @@ HRESULT ProcessOS2INI(ULONG ulTiming, char *szSectionPrefix) return(FO_SUCCESS); } +/* Helper function that moves a given hobject to the front of */ +/* an association string in OS2.INI */ + +void MoveHOBJToFront(HOBJECT hobject, char* szApp, char* szKey) +{ + CHAR szhobj[CCHMAXPATH]; + CHAR *szOrigBuffer, *szNewBuffer, *szCurrNew, *szCurrOrig; + ULONG ulSize; + int i; + + sprintf(szhobj, "%d\0", hobject); + PrfQueryProfileSize(HINI_USERPROFILE, szApp, szKey, &ulSize ); + szOrigBuffer = (char*)malloc(sizeof(char)*ulSize); + szNewBuffer = (char*)malloc(sizeof(char)*ulSize); + PrfQueryProfileData(HINI_USERPROFILE, szApp, szKey, szOrigBuffer, &ulSize); + szCurrOrig = szOrigBuffer; + szCurrNew = szNewBuffer; + strncpy(szCurrNew, szhobj, 7); + szCurrNew +=7; + for (i=0; i