/*++ Copyright (c) 1995 Microsoft Corporation Module Name: strtmenu.c Abstract: Routines to manipulate menu groups and items. Entry points: Author: Ted Miller (tedm) 5-Apr-1995 Jaime Sasson (jaimes) 9-Aug-1995 Revision History: Based on various other code that has been rewritten/modified many times by many people. --*/ #include "setupp.h" #pragma hdrstop #if 0 #define DDEDBG #ifdef DDEDBG #define DBGOUT(x) DbgOut x VOID DbgOut( IN PCSTR FormatString, ... ) { CHAR Str[256]; va_list arglist; wsprintfA(Str,"SETUP (%u): ",GetTickCount()); OutputDebugStringA(Str); va_start(arglist,FormatString); wvsprintfA(Str,FormatString,arglist); va_end(arglist); OutputDebugStringA(Str); OutputDebugStringA("\n"); } #else #define DBGOUT(x) #endif #endif BOOL RemoveMenuGroup( IN PCWSTR Group, IN BOOL CommonGroup ) { return( DeleteGroup( Group, CommonGroup ) ); } BOOL RemoveMenuItem( IN PCWSTR Group, IN PCWSTR Item, IN BOOL CommonGroup ) { return( DeleteItem( Group, CommonGroup, Item, TRUE ) ); } VOID DeleteMenuGroupsAndItems( IN HINF InfHandle ) { INFCONTEXT InfContext; UINT LineCount,LineNo; PCWSTR SectionName = L"StartMenu.ObjectsToDelete"; PCWSTR ObjectType; PCWSTR ObjectName; PCWSTR ObjectPath; PCWSTR GroupAttribute; BOOL CommonGroup; BOOL IsMenuItem; // // Get the number of lines in the section that contains the objects to // be deleted. The section may be empty or non-existant; this is not an // error condition. // LineCount = (UINT)SetupGetLineCount(InfHandle,SectionName); if((LONG)LineCount <= 0) { return; } for(LineNo=0; LineNo