Пример #1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="path"></param>
        /// <returns></returns>
        public static string[] GetInstancesByPath(string path)
        {
            byte[] bytes = FileRecord.GetContentBytes(path);

            if (BitConverter.ToUInt32(bytes, 0x00) == 0xFFEEFFFE)
            {
                List <string> dataList = new List <string>();

                int offset = 0x14;

                while (offset < bytes.Length)
                {
                    int length = BitConverter.ToInt32(bytes, offset);
                    dataList.Add(Encoding.Unicode.GetString(bytes, offset + 0x04, length * 2));
                    offset += (length * 2) + 0x06;
                }

                return(dataList.ToArray());
            }
            else
            {
                throw new Exception("The RecentFileCache.bcf file is invalid.");
            }
        }