The HrGetProgManGroups function obtains the names of the program groups.
HRESULT HrGetProgManGroups( LPDWORD lpIdInst, LPSTR * lppszGroups );
See Return Values.