This commit is contained in:
parent
2fb2da98a9
commit
d01ef968e0
@ -35,14 +35,23 @@ public class Host
|
|||||||
public IntPtr hostName;
|
public IntPtr hostName;
|
||||||
public IntPtr hostElement;
|
public IntPtr hostElement;
|
||||||
public IntPtr next;
|
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);
|
hostName = Marshal.AllocHGlobal(128);
|
||||||
}
|
}
|
||||||
~Host()
|
~Host()
|
||||||
{
|
{
|
||||||
Marshal.FreeHGlobal(hostName);
|
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 IntPtr value;
|
||||||
public int isPassword;
|
public int isPassword;
|
||||||
public IntPtr next;
|
public IntPtr next;
|
||||||
public HostElement()
|
/*public HostElement()
|
||||||
{
|
{
|
||||||
name = Marshal.AllocHGlobal(128);
|
name = Marshal.AllocHGlobal(128);
|
||||||
value = Marshal.AllocHGlobal(128);
|
value = Marshal.AllocHGlobal(128);
|
||||||
}
|
}
|
||||||
~HostElement()
|
~HostElement()
|
||||||
{
|
{
|
||||||
Marshal.FreeHGlobal(name);
|
try
|
||||||
Marshal.FreeHGlobal(value);
|
{
|
||||||
}
|
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)
|
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;
|
int methodStatusCode=-1;
|
||||||
|
|
||||||
//Console.WriteLine("FireFox:Initializing the Profile "+profileName);
|
//Console.WriteLine("FireFox:Initializing the Profile "+profileName);
|
||||||
@ -294,10 +311,10 @@ public class HostElement
|
|||||||
//Console.WriteLine("FireFox:UninitProfile for "+profileName);
|
//Console.WriteLine("FireFox:UninitProfile for "+profileName);
|
||||||
methodStatusCode=-1;
|
methodStatusCode=-1;
|
||||||
methodStatusCode = FPM_FirefoxProfileExit(profileName);
|
methodStatusCode = FPM_FirefoxProfileExit(profileName);
|
||||||
if( 1 != methodStatusCode )
|
/*if( 1 != methodStatusCode )
|
||||||
{
|
{
|
||||||
Console.WriteLine("FireFox:UninitProfile Failed with error "+methodStatusCode);
|
Console.WriteLine("FireFox:UninitProfile Failed with error "+methodStatusCode);
|
||||||
}
|
} */
|
||||||
|
|
||||||
return methodStatusCode;
|
return methodStatusCode;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user