|
|
|
IExtractImage2 Interface |
|
IID_IExtractImage2 |
{BB2E617C-0920-11d1-9A0B-00C04FC2D6C1} |
|
The IExtractImage2 interface extends the capabilities of IExtractImage.
Remarks
Implement IExtractImage2 to provide date stamps for your thumbnail images.
You do not call this interface directly. IExtractImage2 is used by the operating system only when it has confirmed that your application is aware of this interface.
IExtractImage2 implements all the IExtractImage methods as well as IUnknown. The listed method is specific to IExtractImage2.
|
|
Methods in VTable order |
|
|
IUnknown Methods |
Description |
|
QueryInterface |
Returns pointers to supported interfaces. |
|
AddRef |
Increments reference count. |
|
Release |
Decrements reference count. |
|
IExtractImage Methods |
Description |
|
GetLocation |
Used to request the path description of an image and specify how the image should be rendered. |
|
Extract |
Used to request an image from an object, such as an item in a Shell folder. |
|
IExtractImage2 Method |
Description |
|
GetDateStamp |
Used to request the date the image was last modified. This method allows the Shell to determine whether or not cached images are out-of-date. |
|
IExtractImage2 interface implementation |
$IID_IExtractImage2 = GUID$("{953BB1EE-93B4-11d1-98A3-00C04FB687DA}")
' ****************************************************************************************
' IExtractImage interface
' ****************************************************************************************
TYPE IExtractImageVtbl
' IUnknown methods
pQueryInterface AS DWORD ' // QueryInterface method
pAddRef AS DWORD ' // AddRef method
pRelease AS DWORD ' // Release method
' IExtractImage members
pGetLocation AS DWORD ' // GetLocation method
pExtract AS DWORD ' // Extract method
pGetDateStamp AS DWORD ' // GetDateStamp method
' Custom data
pVtblAddr AS DWORD ' // Address of the virtual table
cRef AS DWORD ' // Reference count
END TYPE
' ****************************************************************************************
' ****************************************************************************************
' Builds the IExtractImage Virtual Table
' Returns a cookie that is a pointer to a IExtractImageVtbl structure.
' ****************************************************************************************
FUNCTION IExtractImage_BuildVtbl () AS DWORD
LOCAL pVtbl AS IExtractImageVtbl PTR
LOCAL pUnk AS IExtractImageVtbl PTR
pVtbl = HeapAlloc(GetProcessHeap(), %HEAP_ZERO_MEMORY, SIZEOF(@pVtbl))
IF pVtbl = 0 THEN EXIT FUNCTION
@pVtbl.pQueryInterface = CODEPTR(IExtractImage_QueryInterface)
@pVtbl.pAddRef = CODEPTR(IExtractImage_AddRef)
@pVtbl.pRelease = CODEPTR(IExtractImage_Release)
@pVtbl.pGetLocation = CODEPTR(IExtractImage_GetLocation)
@pVtbl.pExtract = CODEPTR(IExtractImage_Extract)
@pVtbl.pGetDateStamp = CODEPTR(IExtractImage_GetDateStamp)
@pVtbl.pVtblAddr = pVtbl
@pVtbl.cRef = 1
pUnk = VARPTR(@pVtbl.pVtblAddr)
FUNCTION = pUnk
END FUNCTION
' ****************************************************************************************
' ****************************************************************************************
' IExtractImage_QueryInterface method
' Returns the IUnknown of our class and increments the reference counter.
' ****************************************************************************************
FUNCTION IExtractImage_QueryInterface (BYVAL pCookie AS IExtractImageVtbl PTR, BYREF riid AS GUID, BYREF ppvObj AS DWORD) AS LONG
IF riid = $IID_IExtractImage THEN
ppvObj = pCookie
INCR @@pCookie.cRef
FUNCTION = %S_OK
ELSE
FUNCTION = %E_NOINTERFACE
END IF
END FUNCTION
' ****************************************************************************************
' ****************************************************************************************
' IExtractImage_AddRef method
' Increments the reference counter.
' ****************************************************************************************
FUNCTION IExtractImage_AddRef (BYVAL pCookie AS IExtractImageVtbl PTR) AS DWORD
INCR @@pCookie.cRef
FUNCTION = @@pCookie.cRef
END FUNCTION
' ****************************************************************************************
' ****************************************************************************************
' IExtractImage_Release method
' Releases our class if there is only a reference to him and decrements the reference counter.
' ****************************************************************************************
FUNCTION IExtractImage_Release (BYVAL pCookie AS IExtractImageVtbl PTR) AS DWORD
DECR @@pCookie.cRef
FUNCTION = @@pCookie.cRef
IF @@pCookie.cRef = 0 THEN
IF ISTRUE @@pCookie.pVtblAddr THEN
HeapFree(GetProcessHeap(), 0, BYVAL @@pCookie.pVtblAddr)
END IF
END IF
END FUNCTION
' ****************************************************************************************
' ****************************************************************************************
' Used to request the path description of an image and specify how the image should be rendered.
' ****************************************************************************************
FUNCTION IExtractImage_GetLocation (BYVAL pCookie AS IExtractImageVtbl PTR, BYREF pszPathBuffer AS DWORD, BYVAL cch AS DWORD, BYREF pdwPriority AS DWORD, BYREF prgSize AS APISIZE, BYVAL dwRecClrDepth AS DWORD, BYREF pdwFlags AS DWORD) AS LONG
' Put your code here
END FUNCTION
' ****************************************************************************************
' ****************************************************************************************
' Used to request an image from an object, such as an item in a Shell folder.
' ****************************************************************************************
FUNCTION IExtractImage_Extract (BYVAL pCookie AS IExtractImageVtbl PTR, BYVAL pszDeviceID AS DWORD, BYVAL pszAltDeviceID AS DWORD, BYREF phBmpThumbnail AS DWORD) AS LONG
' Put your code here
END FUNCTION
' ****************************************************************************************
' ****************************************************************************************
' Used to request the date the image was last modified. This method allows the Shell to
' determine whether or not cached images are out-of-date.
' ****************************************************************************************
FUNCTION IExtractImage_GetDateStamp (BYVAL pCookie AS IExtractImageVtbl PTR, BYVAL pszDeviceID AS DWORD, BYVAL pszAltDeviceID AS DWORD, BYREF pDateStamp AS FILETIME) AS LONG
' Put your code here
END FUNCTION
' ****************************************************************************************
|
Page last updated on Monday, 03 April 2006 20:39:49 +0200