J
José Achig
Hello
I want to change this code example wrote in C# to VC++ .NET, please give me
a translation
namespace MyNamespace
{
public class MyObject : MarshalByRefObject{
public override Object InitializeLifetimeService()
{
// This lease never expires.
return null;
// Use following code to define the exact lease time.
ILease lease = (ILease)base.InitializeLifetimeService();
if (lease.CurrentState == LeaseState.Initial)
{
lease.InitialLeaseTime =
TimeSpan.FromSeconds(5);
lease.SponsorshipTimeout =
TimeSpan.FromSeconds(0);
lease.RenewOnCallTime = TimeSpan.FromSeconds(5);
}
return lease;
}
}
}
Thanks in advance!!!
I want to change this code example wrote in C# to VC++ .NET, please give me
a translation
namespace MyNamespace
{
public class MyObject : MarshalByRefObject{
public override Object InitializeLifetimeService()
{
// This lease never expires.
return null;
// Use following code to define the exact lease time.
ILease lease = (ILease)base.InitializeLifetimeService();
if (lease.CurrentState == LeaseState.Initial)
{
lease.InitialLeaseTime =
TimeSpan.FromSeconds(5);
lease.SponsorshipTimeout =
TimeSpan.FromSeconds(0);
lease.RenewOnCallTime = TimeSpan.FromSeconds(5);
}
return lease;
}
}
}
Thanks in advance!!!