DVP_GetFileInfoFile(
HWND:hWnd,
LPTSTR:lpszName,
LPVIEWERPLUGINFILEINFO:lpVPFileInfo,
LPDVPFILEINFOHEADER:lpFIH,
HANDLE:hAbortEvent
)
→ BOOL
Arguments
hWnd
This parameter specifies a parent window handle in case you need to display any dialogs.
lpszName
This parameter provides the name of the file, including the full path.
lpVPFileInfo
This parameter points to a
VIEWERPLUGINFILEINFO structure that contains the information that you returned in the
DVP_IdentifyFile function, including the
dwPrivateData field. This allows you to preserve your own data between the calls to
DVP_IdentifyFile and
DVP_GetFileInfoFile.
lpFIH
This points to a
DVPFILEINFOHEADER structure, which is a header to a larger structure (described below).
hAbortEvent
Specifies an event handle that you can use to determine if the user wishes to abort the file info extraction.
Return value
You should return
TRUE if file information was successfully retrieved, or
FALSE on failure.
Description
The DVP_GetFileInfoFile function is called to get information about a file.
| DVPMajorType_Sound | DVPFILEINFOMUSIC |
| DVPMajorType_Movie | DVPFILEINFOMOVIE |
As described above, the uiMajorType field in the DVPFILEINFOHEADER structure determines the real type of the information structure passed.
If the uiMajorType value is DVPMajorType_Sound, the structure is a DVPFILEINFOMUSIC structure, which has the following fields:
[in] DVPFILEINFOHEADER hdr
The file info header structure, defined above.
[out] LPTSTR lpszAlbum / [in] UINT cchAlbumMax
Points to a buffer into which you should copy a text string describing the 'Album' property for this file. cchAlbumMax defines the maximum size of this buffer in characters.
[out] LPTSTR lpszArtist / [in] UINT cchArtistMax
A buffer to store the 'Artist' property for this file, and the maximum size of the buffer in characters.
[out] LPTSTR lpszTitle / [in] UINT cchTitleMax
A buffer to store the 'Title' property for this file, and the maximum size of the buffer.
[out] LPTSTR lpszGenre / [in] UINT cchGenreMax
A buffer to store the 'Genre' property for this file, and the maximum size of the buffer.
[out] LPTSTR lpszComment / [in] UINT cchCommentMax
A buffer to store the 'Comment' property and the maximum size of the buffer.
[out] LPTSTR lpszFormat / [in] UINT cchFormatMax
A buffer to store the 'Format' property and the maximum size of the buffer.
[out] LPTSTR lpszEncoder / [in] UINT cchEncoderMax
A buffer to store the 'Encoder' property and the maximum size of the buffer.
[out] DWORD dwBitRate, dwSampleRate
The bit rate (in bits per second) and sample rate (in cycles per second) of the sound file.
[out] DWORD dwDuration
The duration (length) of the sound file in seconds.
[out] int iTrackNum
The track number property of the sound file.
[out] int iYear
The year property of the sound file (normally year recorded.)
[out] int iNumChannels
The number of distinct channels in the sound file.
[out] DWORD dwMusicFlags
Flags field. Currently defined flags are:
DVPMusicFlag_VBR Set this flag if the sound file has a 'variable bit rate' and therefore reported duration is only an approximation.
DVPMusicFlag_VBRAccurate Set this flag if the sound file has a 'variable bit rate', but the reported duration is accurate.
DVPMusicFlag_JointStereo Set this flag if the sound file is 'joint stereo'
[out] LPTSTR lpszCodec / [in] UINT cchCodecMax
A buffer to store the 'Codec' property for the sound file and the maximum size of the buffer in characters.
If the uiMajorType value is DVPMajorType_Movie, the structure is a DVPFILEINFOMOVIE structure, which has the following fields:
[in] DVPFILEINFOHEADER hdr
The file info header structure, defined above.
[out] SIZE szVideoSize
The dimensions of the video component of the movie, in pixels.
[out] int iNumBits
The pixel depth of the video component of the movie.
[out] DWORD dwDuration, dwFrames
The duration of the movie in seconds and the total number of frames in the movie.
[out] double flFrameRate
The normal frame rate of the movie, in frames per second.
[out] DWORD dwDataRate
The data rate of the video component of the movie, in bits per second.
[out] POINT ptAspectRatio
The aspect ratio of the movie (as a ratio X:Y)
[out] DWORD dwAudioBitRate, dwAudioSampleRate
The bit rate in bytes per second and sample rate in cycles per second of the audio component of the movie.
[out] int iNumChannels
The number of distinct audio channels.
[out] LPTSTR lpszVideoCodec / [in] UINT cchVideoCodecMax
A buffer to store the name of the video codec, and the maximum size of the buffer in characters.
[out] LPTSTR lpszAudioCodec / [in] UINT cchAudioCodecMax
A buffer to store the name of the audio codec, and the maximum size of the buffer in characters.