## Monitor::TryEnter(const SharedPtr\<Object\>\&) method


尝试获取对指定对象的独占锁（未实现）。

```cpp
static bool System::Threading::Monitor::TryEnter(const SharedPtr<Object> &obj)
```


## 另见

* Typedef [SharedPtr](../../../system/sharedptr/)
* Class [Object](../../../system/object/)
* Class [Monitor](../)
* Namespace [System::Threading](../../)
* Library [Aspose.Font for C++](../../../)
## Monitor::TryEnter(const SharedPtr\<Object\>\&, int32_t) method


尝试在指定的毫秒数内获取对指定对象的独占锁（未实现）。

```cpp
static bool System::Threading::Monitor::TryEnter(const SharedPtr<Object> &obj, int32_t millisecondsTimeout)
```


## 另见

* Typedef [SharedPtr](../../../system/sharedptr/)
* Class [Object](../../../system/object/)
* Class [Monitor](../)
* Namespace [System::Threading](../../)
* Library [Aspose.Font for C++](../../../)
## Monitor::TryEnter(const SharedPtr\<Object\>\&, TimeSpan) method


尝试在指定的时间内获取对指定对象的独占锁（未实现）。

```cpp
static bool System::Threading::Monitor::TryEnter(const SharedPtr<Object> &obj, TimeSpan timeout)
```


## 另见

* Typedef [SharedPtr](../../../system/sharedptr/)
* Class [Object](../../../system/object/)
* Class [TimeSpan](../../../system/timespan/)
* Class [Monitor](../)
* Namespace [System::Threading](../../)
* Library [Aspose.Font for C++](../../../)
## Monitor::TryEnter(const System::SharedPtr\<Object\>\&, bool\&) method


尝试获取对指定对象的独占锁，并原子性地设置一个指示锁是否已获取的值。

```cpp
static void System::Threading::Monitor::TryEnter(const System::SharedPtr<Object> &obj, bool &lockTaken)
```

## 另见

* Typedef [SharedPtr](../../../system/sharedptr/)
* Class [Object](../../../system/object/)
* Class [Monitor](../)
* Namespace [System::Threading](../../)
* Library [Aspose.Font for C++](../../../)
## Monitor::TryEnter(const System::SharedPtr\<Object\>\&, int32_t, bool\&) method


尝试在指定的时间内获取对指定对象的独占锁，并原子性地设置一个指示锁是否已获取的值。

```cpp
static void System::Threading::Monitor::TryEnter(const System::SharedPtr<Object> &obj, int32_t millisecondsTimeout, bool &lockTaken)
```

## 另见

* Typedef [SharedPtr](../../../system/sharedptr/)
* Class [Object](../../../system/object/)
* Class [Monitor](../)
* Namespace [System::Threading](../../)
* Library [Aspose.Font for C++](../../../)
## Monitor::TryEnter(const System::SharedPtr\<Object\>\&, TimeSpan, bool\&) method


尝试在指定的时间内获取对指定对象的独占锁，并原子性地设置一个指示锁是否已获取的值。

```cpp
static void System::Threading::Monitor::TryEnter(const System::SharedPtr<Object> &obj, TimeSpan timeout, bool &lockTaken)
```

## 另见

* Typedef [SharedPtr](../../../system/sharedptr/)
* Class [Object](../../../system/object/)
* Class [TimeSpan](../../../system/timespan/)
* Class [Monitor](../)
* Namespace [System::Threading](../../)
* Library [Aspose.Font for C++](../../../)
