Пример #1
0
        private STRING_DATA Read_StringData(BinaryReader br)
        {
            STRING_DATA sdata = new STRING_DATA();

            if (lnk.header.linkFlags.hasName)
            {
                sdata.nameString = new NAME_STRING();
                sdata.nameString.countCharacters = br.ReadUInt16();
                sdata.nameString.value           = Get_String(br, sdata.nameString.countCharacters, true);
            }
            if (lnk.header.linkFlags.hasRelativePath)
            {
                sdata.relativePath = new RELATIVE_PATH();
                sdata.relativePath.countCharacters = br.ReadUInt16();
                sdata.relativePath.value           = Get_String(br, sdata.relativePath.countCharacters, true);
            }
            if (lnk.header.linkFlags.hasWorkingDir)
            {
                sdata.workingDir = new WORKING_DIR();
                sdata.workingDir.countCharacters = br.ReadUInt16();
                sdata.workingDir.value           = Get_String(br, sdata.workingDir.countCharacters, true);
            }
            if (lnk.header.linkFlags.hasArguments)
            {
                sdata.commandLineArgs = new COMMAND_LINE_ARGUMENTS();
                sdata.commandLineArgs.countCharacters = br.ReadUInt16();
                sdata.commandLineArgs.value           = Get_String(br, sdata.commandLineArgs.countCharacters, true);
            }
            if (lnk.header.linkFlags.hasIconLocation)
            {
                sdata.iconLocation = new ICON_LOCATION();
                sdata.iconLocation.countCharacters = br.ReadUInt16();
                sdata.iconLocation.value           = Get_String(br, sdata.iconLocation.countCharacters, true);
            }

            return(sdata);
        }
Пример #2
0
        private STRING_DATA Read_StringData(BinaryReader br)
        {
            STRING_DATA sdata = new STRING_DATA();

            if (lnk.header.linkFlags.hasName)
            {
                sdata.nameString = new NAME_STRING();
                sdata.nameString.countCharacters = br.ReadUInt16();
                sdata.nameString.value = Get_String(br, sdata.nameString.countCharacters, true);
            }
            if (lnk.header.linkFlags.hasRelativePath)
            {
                sdata.relativePath = new RELATIVE_PATH();
                sdata.relativePath.countCharacters = br.ReadUInt16();
                sdata.relativePath.value = Get_String(br, sdata.relativePath.countCharacters, true);
            }
            if (lnk.header.linkFlags.hasWorkingDir)
            {
                sdata.workingDir = new WORKING_DIR();
                sdata.workingDir.countCharacters = br.ReadUInt16();
                sdata.workingDir.value = Get_String(br, sdata.workingDir.countCharacters, true);
            }
            if (lnk.header.linkFlags.hasArguments)
            {
                sdata.commandLineArgs = new COMMAND_LINE_ARGUMENTS();
                sdata.commandLineArgs.countCharacters = br.ReadUInt16();
                sdata.commandLineArgs.value = Get_String(br, sdata.commandLineArgs.countCharacters, true);
            }
            if (lnk.header.linkFlags.hasIconLocation)
            {
                sdata.iconLocation = new ICON_LOCATION();
                sdata.iconLocation.countCharacters = br.ReadUInt16();
                sdata.iconLocation.value = Get_String(br, sdata.iconLocation.countCharacters, true);
            }

            return sdata;
        }