Question Get catalog file information

ur00361883

New member
Joined
Aug 17, 2015
Messages
3
Programming Experience
3-5
I need to check whether a driver catalog file is created for x86 or x64.
So, I loaded the libraries of inf2cat.exe.
I am able to create a catalog file with it.
But I am not able to get any info about the existing catalog file.

I tried below but it is creating empty collection for CatalogAttributeInfo.

C#:
bool iscat = Microsoft.Whos.Shared.IO.Catalogs.CatalogInfo.IsCatalog(@"C:\Users\Admin\Desktop\akshasp.cat");
            Console.WriteLine("Is catalog file: "+iscat);
            CatalogFileInfo catalogfile = new CatalogFileInfo(@"C:\Users\Admin\Desktop\akshasp.cat");
            FileInfo fi = catalogfile.FileInfo;
            CatalogInfo ci = CatalogInfo.Create(@"C:\Users\Admin\Desktop\akshasp.cat");
            Collection<CatalogAttributeInfo> fac = ci.Attributes;//catalogfile.Attributes;
            System.Console.WriteLine("Writing Attribute Values with count." + fac.Count);
            foreach (CatalogAttributeInfo c in fac)
            {
                    System.Console.WriteLine("Writing Attribute Values.");
                    if (c != null)
                    System.Console.WriteLine("Id + Type + Value " + c.GetType() + c.Id + c.Type + c.Value);
                    else
                    System.Console.WriteLine("List element has null value.");
            }
 

Latest posts

Back
Top Bottom