Upgrading Uniden BC_VUP_V3 to NET 8

 dotPeek
Visual Studio 2022
NET Upgrade assistant VS extension

BC_VUP_V3.csproj add

<PropertyGroup>
  <Nullable>enable</Nullable>
  <LangVersion>8.0</LangVersion>
</PropertyGroup>

  <ItemGroup>
    <PackageReference Include="System.IO.Ports" Version="8.0.0" />
  </ItemGroup>

WritingDialogbox.cs error
Cannot implicitly convert type 'System.IntPtr' to 'int'. An explicit conversion exists (are you missing a cast?)

num3 = num3 + (uint) file[(IntPtr) index] & (uint) ushort.MaxValue;
-->
num3 = num3 + (uint) file[(int)(IntPtr) index] & (uint) ushort.MaxValue; 

 

Usscfile.cs AllowFullAccess modify, comment out try section rows and add FileInfo/FileSecurity 

        //FileSecurity accessControl = File.GetAccessControl(PathName);
        //accessControl.AddAccessRule(new FileSystemAccessRule("Users",         FileSystemRights.FullControl,AccessControlType.Allow));
        //File.SetAccessControl(PathName, accessControl);

-->
        FileInfo fileInfo = new FileInfo(PathName);
        FileSecurity fileSecurity = fileInfo.GetAccessControl();
        fileSecurity.AddAccessRule(new FileSystemAccessRule("Users", FileSystemRights.FullControl, AccessControlType.Allow));
        fileInfo.SetAccessControl(fileSecurity);

 






 


 






Comments

Popular posts from this blog

Mods for SDR# TETRA demod plugin 1.0.14.0 - 2

Modifying old SDR# TETRA demod plug-in