IDataObject.DAdvise(IntPtr, Int32, IntPtr, Int32) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
建立實作介面 IDataObject 資料物件與呼叫物件之間的通知連線,讓呼叫者能收到資料物件變更的通知。
public:
int DAdvise(IntPtr a, int b, IntPtr c, int % d);
public int DAdvise(IntPtr a, int b, IntPtr c, ref int d);
abstract member DAdvise : nativeint * int * nativeint * int -> int
Public Function DAdvise (a As IntPtr, b As Integer, c As IntPtr, ByRef d As Integer) As Integer
參數
- c
-
IntPtr
nativeint
指向呼叫者物件上的指標 IAdviseSink 。
- d
- Int32
透過此呼叫 DAdvise 方法建立的連線指標。
傳回
DAdvise 方法支援標準返回值 E_INVALIDARG、E_UNEXPECTED 和 E_OUTOFMEMORY,以及以下返回值:
| 返回值 | Description |
|---|---|
| S_OK | DAdvise 方法成功建立了該連線。 |
| E_NOTIMPL | 資料物件並未實作 DAdvise 方法。 |
| DV_E_LINDEX | Lindex 不成立。 |
| DV_E_FORMATETC | 資料指標的值不成立。 |
| OLE_E_ADVISENOTSUPPORTED | 該物件不支援變更通知。 |
備註
欲了解更多關於使用 IDataObject 介面及 Microsoft Management Console(MMC)程式設計的資訊,請參閱 MMC 程式設計師指南。