Foxit PDF SDK

Classes
fx_process.h File Reference

Header file for Process & thread related definitions and classes. More...

Go to the source code of this file.

## Classes
struct | FX_HTHREAD
| Type definition of mutex handle. More...
class | CFX_RWLock
| Under non-threading mode, defines as empty implementation. More...
class | CFX_SpinLock
| Under non-threading mode, defines as empty implementation. More...
struct | FX_SYSTEMTIME
| Structure of system time. More...
struct | FX_THREADHANDLER
| Thread handler for application extension. More...
struct | FXCRT_DATETIMEZONE
| Structure for date and time. More...

## Typedefs
Type for process ID
typedef FX_DWORD | FX_PROCESSID
| Process ID.

## Functions
Time
FX_DWORD | FX_Time_GetClock ()
| Get the clock ticks elapsed by calling process. More...
void | FX_Time_GetLocalTime (FX_SYSTEMTIME *pSystemTime)
| Retrieve the current local date and time. More...
void | FX_Time_GetSystemTime (FX_SYSTEMTIME *pSystemTime)
| Retrieve the current system date and time. More...
FX_DWORD | FX_Time_Sleep (FX_DWORD dwMilliseconds)
| Delay the current running for specified milliseconds. More...
void | FXCRT_GetCurrentSystemTime (FXCRT_DATETIMEZONE &dt)
| Get current system date,time and timezone information. More...
Process management
void | FX_Process_Finalize ()
| Finalize process. More...
CFX_ProcessContext * | FX_Process_GetContext ()
| Retrieve process context. More...
FX_PROCESSID | FX_Process_GetID ()
| Get the current process ID. More...
FX_LPVOID | FX_Process_GetPrivateData (FX_LPVOID key)
| Get private data in the current process. More...
void | FX_Process_Initialize ()
| Initialize process. More...
void | FX_Process_RemovePrivateData (FX_LPVOID key)
| Remove private data in the current process. More...
void | FX_Process_SetPrivateData (FX_LPVOID key, FX_LPVOID data, PD_CALLBACK_FREEDATA callback)
| Set private data in the current process. More...
Thread handler
FX_THREADHANDLER * | FX_Thread_GetHandler ()
| Get the current thread handler. More...
void | FX_Thread_SetHandler (FX_THREADHANDLER *pThreadHandler)
| Set the current thread handler. More...
Thread functions
FX_HTHREAD | FX_Thread_Create (FX_INT32 nPriority, size_t szStack, FX_CALLBACK_ThreadProc threadProc, FX_LPVOID param)
| Create a new thread. More...
void | FX_Thread_Exit ()
| Exit from the current thread. More...
FX_HTHREAD | FX_Thread_GetHandle ()
| Get the current thread handle. More...
FX_INT32 | FX_Thread_GetLastError ()
| Get the last error code in the current thread. More...
FX_INT32 | FX_Thread_GetPriority (FX_HTHREAD hThread)
| Get thread priority. More...
FX_LPVOID | FX_Thread_GetPrivateData (FX_LPVOID key)
| Get private data in the current thread. More...
void | FX_Thread_RemovePrivateData (FX_LPVOID key)
| Remove private data in the current thread. More...
void | FX_Thread_SetLastError (FX_INT32 nErr)
| Set the last error code in the current thread. More...
void | FX_Thread_SetPriority (FX_HTHREAD hThread, FX_INT32 nPriority)
| Set thread priority. More...
void | FX_Thread_SetPrivateData (FX_LPVOID key, FX_LPVOID data, PD_CALLBACK_FREEDATA callback)
| Set private data in the current thread. More...
FX_INT32 | FX_Thread_WaitForMultipleThreads (const FX_HTHREAD *pThreads, FX_INT32 nCount)
| Wait for termination of multiple threads. More...
FX_INT32 | FX_Thread_WaitForSingleThread (FX_HTHREAD hThread)
| Wait for termination of a single thread. More...
void | FX_Thread_Yield ()
| Yield the processor to another thread. More...
Context access
CFX_ThreadContext * | FX_Thread_GetContext ()
| Get the current thread context. More...
CFX_ExceptionContext * | FX_Thread_GetExceptionContext ()
| Get the current thread exception context. More...
Mutex
Note Mutex is disabled under single-thread mode or FPDFAPI_MT isn't defined, do not call the following functions under this condition. Mutex supports recursive calls in same thread.
void | FX_Mutex_Destroy (FX_MUTEX *pMutex)
| Destroy a mutex. More...
FX_BOOL | FX_Mutex_Initialize (FX_MUTEX *pMutex)
| Initialize a mutex. More...
void | FX_Mutex_Lock (FX_MUTEX *pMutex)
| Lock a mutex. More...
FX_BOOL | FX_Mutex_TryLock (FX_MUTEX *pMutex)
| Try to lock a mutex. More...
void | FX_Mutex_Unlock (FX_MUTEX *pMutex)
| Unlock a mutex. More...
Atomic Count
Note Atomic Count provides an atomic mechanism to access integer value between multiple threads. Following functions also work under single-thread mode.
FX_INT32 | FX_Atom_Add32 (volatile FX_INT32 *pAddend, FX_INT32 nIncrement)
| Increase 32-bits integer value. More...
FX_INT64 | FX_Atom_Add64 (volatile FX_INT64 *pAddend, FX_INT64 nIncrement)
| Increase 64-bits integer value. More...
FX_INT32 | FX_Atom_Subtract32 (volatile FX_INT32 *pAddend, FX_INT32 nDecrement)
| Decrease 32-bits integer value. More...
FX_INT64 | FX_Atom_Subtract64 (volatile FX_INT64 *pAddend, FX_INT64 nDecrement)
| Decrease 64-bits integer value. More...

## Flags for thread priorities
typedef FX_ThreadResult(WINAPI * | FX_CALLBACK_ThreadProc) (FX_LPVOID param)
| Callback function of thread procedure. More...
typedef FX_ThreadResult(WINAPI * | FX_CALLBACK_ThreadProxyProc) (FX_CALLBACK_ThreadProc threadProc, FX_LPVOID param)
| Callback function of thread proxy procedure. More...
#define | FX_THREADPRIORITY_Higher 1
| Higher priority.
#define | FX_THREADPRIORITY_Highest 2
| Highest priority.
#define | FX_THREADPRIORITY_Lower -1
| Lower priority.
#define | FX_THREADPRIORITY_Lowest -2
| Lowest priority.
#define | FX_THREADPRIORITY_Normal 0
| Normal priority.
typedef DWORD | FX_ThreadResult
#define | THREAD_CALL_CONVENTION WINAPI

## Spin Lock
Note Spin Lock is disabled under single-thread mode or FPDFAPI_MT isn't defined, do not call the following functions under this condition. Spin Lock is a light-weight cocurrency mechanism for synchronizing access. Spin Lock doesn't support recursive calls in same thread.
void | FX_SpinLock_Destroy (FX_SPINLOCK *pSpinLock)
| Destroy a spin lock. More...
FX_BOOL | FX_SpinLock_Initialize (FX_SPINLOCK *pSpinLock)
| Initialize a spin lock. More...
FX_BOOL | FX_SpinLock_IsLocked (FX_SPINLOCK *pSpinLock)
| Determine whether specified spin lock is locked or not. More...
void | FX_SpinLock_Lock (FX_SPINLOCK *pSpinLock)
| Lock a spin lock. More...
FX_BOOL | FX_SpinLock_TryLock (FX_SPINLOCK *pSpinLock)
| Try to lock a spin lock. More...
void | FX_SpinLock_Unlock (FX_SPINLOCK *pSpinLock)
| Unlock a spin lock. More...
#define | FXMT_SPLOCK_OBJ(lock)
#define | FXMT_SPLOCK_THIS

## Read-Write lock
Note Read-Write Lock is disabled under single-thread mode or FPDFAPI_MT isn't defined, do not call the following functions under this condition.
void | FX_RWLock_Destroy (FX_RWLOCK *pRWLock)
| Destroy a read-write lock. More...
FX_BOOL | FX_RWLock_Initialize (FX_RWLOCK *pRWLock)
| Initialize a read-write lock. More...
void | FX_RWLock_ReadLock (FX_RWLOCK *pRWLock)
| Lock for share read. More...
void | FX_RWLock_ReadUnlock (FX_RWLOCK *pRWLock)
| Unlock for share read. More...
FX_BOOL | FX_RWLock_TryReadLock (FX_RWLOCK *pRWLock)
| Try to lock for share read. More...
FX_BOOL | FX_RWLock_TryWriteLock (FX_RWLOCK *pRWLock)
| Try to lock for exclusive write. More...
void | FX_RWLock_WriteLock (FX_RWLOCK *pRWLock)
| Lock for exclusive write. More...
void | FX_RWLock_WriteUnlock (FX_RWLOCK *pRWLock)
| Unlock for exclusive write. More...
#define | FXMT_RWLOCK_DEFINEOBJ(rwLock, lock, s)
#define | FXMT_RWLOCK_OBJ(lock, s)
#define | FXMT_RWLOCK_THIS
#define | FXMT_RWLOCKOBJECT_DEFINE(rwLockObj)
#define | FXMT_RWLOCKOBJECT_READLOCK(lockObj)
#define | FXMT_RWLOCKOBJECT_READUNLOCK(lockObj)
#define | FXMT_RWLOCKOBJECT_TRYREADLOCK(lockObj)
#define | FXMT_RWLOCKOBJECT_TRYREADLOCK_IF(lockObj)
#define | FXMT_RWLOCKOBJECT_TRYWRITELOCK(lockObj)
#define | FXMT_RWLOCKOBJECT_TRYWRITELOCK_IF(lockObj)
#define | FXMT_RWLOCKOBJECT_WRITELOCK(lockObj)
#define | FXMT_RWLOCKOBJECT_WRITEUNLOCK(lockObj)

## Detailed Description

Header file for Process & thread related definitions and classes.

Copyright (C) 2003-2026, Foxit Software Inc.. All Rights Reserved.

http://www.foxitsoftware.com

The following code is copyrighted and is the proprietary of Foxit Software Inc.. It is not allowed to distribute any parts of Foxit PDF SDK to third party or public without permission unless an agreement is signed between Foxit Software Inc. and customers to explicitly grant customers permissions.