IVsTaskItem.ImageListIndex(Int32) 方法

定义

返回由提供程序维护的图像列表中的索引。

public:
 int ImageListIndex([Runtime::InteropServices::Out] int % pIndex);
int ImageListIndex([Runtime::InteropServices::Out] int & pIndex);
public int ImageListIndex (out int pIndex);
abstract member ImageListIndex : int -> int
Public Function ImageListIndex (ByRef pIndex As Integer) As Integer

参数

pIndex
Int32

[out,retval]指向图像列表中的索引的指针。

返回

Int32

如果该方法成功,则它会返回 S_OK。 如果该方法失败,则会返回错误代码。

注解

COM 签名

从 vsshell:

HRESULT IVsTaskItem::ImageListIndex(  
   [out,retval] long *pIndex  
);  

如果您提供了一个用于表示类别或子类别的自定义图像列表,则向其返回正确的索引。 每个任务提供程序都可以使用提供一个图像列表 ImageList 。 然后,每个任务项可以使用方法指定此列表中的图像 ImageListIndex 。 否则,返回一个枚举器 _vstaskbitmap 以使用默认位图之一。

适用于