Microsoft KB Archive/98342

= Retrieving Group Names from a MM Viewer Title =

Article ID: 98342

Article Last Modified on 10/29/2003

-

APPLIES TO


 * Microsoft Multimedia Viewer Publishing Toolkit 2.0

-



This article was previously published under Q98342



SUMMARY
The names and titles of the groups in a Multimedia Viewer version 2.0 title can be retrieved by using the Viewer function TitleGetInfo with a value of 13 for the iInfoMsg parameter. The lParam2 parameter for TitleGetInfo should be a far pointer to a text buffer to receive the group name and title. TitleGetInfo writes a string of the form .grp&quot;&quot; to this buffer. The LOWORD of lParam1 should specify the maximum number of characters to copy into the buffer supplied in lParam2, including the NULL terminator. The HIWORD of lParam1 should be the number of the group whose name and title should be retrieved. The groups in a title are numbered consecutively, starting at 0. TitleGetInfo returns -1 if it is passed a group number that does not exist in the title.

The following code loops through the groups in a title, and displays a message box with the contents of the buffer returned from TitleGetInfo: #define MAXBUF 255 int icount; char szBuf[MAXBUF]; HANDLE hTitle;

hTitle=TitleOpen(&quot;test&quot;); icount=0; while (TitleGetInfo(hTitle,13,MAKELONG(MAXBUF,icount), (LONG)(LPSTR)szBuf)!=-1L) {      MessageBox(NULL,szBuf,&quot;Groups&quot;,MB_OK); icount++; }

Additional query words: 2.00

Keywords: KB98342

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.