Поделиться через


CComMultiThreadModel::Decrement

This static function calls the Win32 function InterlockedDecrement, which decrements the value of the variable pointed to by p.

static ULONG WINAPI Decrement(
   LPLONG p 
) throw ( );

Параметры

  • p
    [in] Pointer to the variable to be decremented.

Возвращаемое значение

If the result of the decrement is 0, then Decrement returns 0. If the result of the decrement is nonzero, the return value is also nonzero but may not equal the result of the decrement.

Заметки

InterlockedDecrement prevents more than one thread from simultaneously using this variable.

Требования

Header: atlbase.h

См. также

Основные понятия

CComMultiThreadModel Class

CComMultiThreadModel Members

CComMultiThreadModel::Increment