ClassFirst

3.1

  #include <toolhelp.h>    

  BOOL ClassFirst(lpce)    
  CLASSENTRY FAR* lpce; /* address of structure for class info */

The ClassFirst function fills the specified structure with general information about the first class in the Windows class list.

Parameters

lpce

Points to a CLASSENTRY structure that will receive the class information. The CLASSENTRY structure has the following form:

#include <toolhelp.h>

typedef struct tagCLASSENTRY {  /* ce */
    DWORD   dwSize;
    HMODULE hInst;
    char    szClassName[MAX_CLASSNAME + 1];
    WORD    wNext;
} CLASSENTRY;

For a full description of this structure, see the Microsoft Windows Programmer's Reference, Volume 3.

Return Value

The return value is nonzero if the function is successful. Otherwise, it is zero.

Comments

The ClassFirst function can be used to begin a walk through the Windows class list. To examine subsequent items in the class list, an application can use the ClassNext function.

Before calling ClassFirst, an application must initialize the CLASSENTRY structure and specify its size, in bytes, in the dwSize member. An application can examine subsequent entries in the Windows class list by using the ClassNext function.

For more specific information about an individual class, use the GetClassInfo function, specifying the name of the class and instance handle from the CLASSENTRY structure.

See Also

ClassNext, GetClassInfo