NS_IMETHODIMP nsProfile::GetCurrentProfile(char **profileName)
nsProfile::GetCurrentProfile(char **profileName)
NS_IMETHODIMP nsProfile::GetCurrentProfile(char **profileName){	nsresult rv = NS_OK;  #if defined(DEBUG_profile) 	printf("ProfileManager : GetCurrentProfile\n");#endif    rv = OpenRegistry();    if (NS_FAILED(rv)) return rv;        nsIRegistry::Key key;    rv = m_reg->GetSubtree(nsIRegistry::Common, REGISTRY_PROFILE_SUBTREE_STRING, &key);        if (NS_SUCCEEDED(rv))        {                        rv = m_reg->GetString( key, REGISTRY_CURRENT_PROFILE_STRING, profileName );                        // if fails to get the current profile set the value to null            if (NS_FAILED(rv))				{		            profileName = '\0';                    #if defined(DEBUG_profile)                    printf("Profiles:Can't get Current Profile value.\n" );#endif				}        }    else        {#if defined(DEBUG_profile)            printf("Registry : Couldn't get Profiles subtree.\n");#endif        }    	return rv;}