I have several VCL classes that I have developed that allow me to create a software state machine running in it's own thread. I now want to use this code in an Android App. But I can't find the FireMonkey equivalent of a VCL TCriticalSection. In particular I have a header for a thread lock wrapper class that compiles fine under VCL but gives an error E2303 "Type Name Expected" at the line *TCritical Section TheLock when I try to compile it using FMX
The complete header file contents is:
//---------------------------------------------------------------------------
class TThreadSafeLock
{
private:
TCriticalSection *TheLock;
public:
void ClearLock(void);
void SetLock(void); // will hold up processing until the Lock is achieved
TThreadSafeLock(void);
~TThreadSafeLock();
};
Is there a header file that I need to include that defines TCriticalSection for FireMonkey - or does FireMonkey have a different name for an identical class?