This commit is contained in:
Manohar 2006-03-06 09:14:26 +00:00
parent 2fb2da98a9
commit d01ef968e0

View File

@ -35,14 +35,23 @@ public class Host
public IntPtr hostName;
public IntPtr hostElement;
public IntPtr next;
public Host()
/*public Host()
//NOT NEEDED SINCE WE GET THIS FILLED FROM NATIVE WHEN
//WE MARSHAL PTR TO STRUCTURE
{
hostName = Marshal.AllocHGlobal(128);
}
~Host()
{
try
{
Marshal.FreeHGlobal(hostName);
}
catch (Exception e)
{
Console.WriteLine("FireFox:Marshal FreeHGlobal Exception for Host:");
}
}*/
};
@ -53,16 +62,23 @@ public class HostElement
public IntPtr value;
public int isPassword;
public IntPtr next;
public HostElement()
/*public HostElement()
{
name = Marshal.AllocHGlobal(128);
value = Marshal.AllocHGlobal(128);
}
~HostElement()
{
try
{
Marshal.FreeHGlobal(name);
Marshal.FreeHGlobal(value);
}
catch (Exception e)
{
Console.WriteLine("FireFox:Marshal FreeHGlobal Exception for HostElement:");
}
}*/
};
@ -218,7 +234,8 @@ public class HostElement
//--------------------------------------------------------------
public static Host GetProfileData(string profileName)
{
Host hostList = new Host();
Host hostList; // = new Host(); - NOT NEEDED SINCE WE GET THIS FILLED FROM NATIVE WHEN
// WE MARSHAL PTR TO STRUCTURE
int methodStatusCode=-1;
//Console.WriteLine("FireFox:Initializing the Profile "+profileName);
@ -294,10 +311,10 @@ public class HostElement
//Console.WriteLine("FireFox:UninitProfile for "+profileName);
methodStatusCode=-1;
methodStatusCode = FPM_FirefoxProfileExit(profileName);
if( 1 != methodStatusCode )
/*if( 1 != methodStatusCode )
{
Console.WriteLine("FireFox:UninitProfile Failed with error "+methodStatusCode);
}
} */
return methodStatusCode;
}