Hi Wyatt,
In TF, the callback procedure is being called and executed. But my software crashes right after the procedure end. I don't know why. I will contact the support team of the company to look into that, but this will take time.
I see there is a function called HasLease() but I see no way how to use TF without having to setup the callback function. How can I do that?
If this is not possible, this would be great to have a function that does the contrary of callback: our software will call TF from time to time to get the status: TF_OK, TF_CB_*. So the DLL could receive the TFS events has usual, but instead of calling the callback function, it would simply store the status in memory so that on the next call of HasLease() (with potential return value TF_OK, etc. + all TF_CB_) the good status would be returned.
Then this would be possible to avoid the callback problem by having a simple timer that calls TF dll to get the last status it got from TFS. (So if TFS refresh is every 30 minutes, even if I call TF every seconds, the status would effectively not be updated before 30 minutes - it's not making a status-refresh call, simply reading the last status.)
So could be possible to call RequestLease() without having to call to SetLeaseCallback(). (Or maybe call it with a Null pointer to explicitly tell the DLL : "don't call us, we'll call you". So the DLL would know it is setup properly and ready to call RequestLease() in no-callback mode.)
Thank you for your help,Alexandre Leclerc