title: Reading info from .FRX file (proprietary VB binary format) into Java project?
body: <p>In my job, I am currently working on a massive VB6 to C# application porting project. I am currently completing a designer project in Java to create designer files for the translated VB forms.</p>
  
  <p>An issue I am having is with the pictures and text too large to fit inside VB forms and thus stored in FRX files. I am attempting to find a way to not have to hand code this data in text files, as new forms constantly being added to the VB project need to be processed so it would be impractical to constantly be hand coding text files for them. </p>
  
  <p>I'm aware of the code in VB6 to load pictures from FRX files, and believe that I could write a C# program which uses hex values to get the long text from FRX files, then get Java to load some C++ DLL to wrap the C# code, but that looks pretty tedious.</p>
  
  <p>Much simpler IMO would be to use Java's binary reading methods, however upon attempting to do so it kept returning the wrong bytes. It may be (I think) due to Java using a modified UTF-8 encoding, but I am not entirely sure.</p>
  
  <p><strong>My question is</strong>, is there any other feasible method by which Java could read info from FRX files without need for a more complicated solution? Or has anyone experienced a similar problem and have a more practical solution?</p>
  
  <p>Any help is greatly appreciated!</p>
  
  <hr>
  
  <p><strong><em>Question update</em></strong> </p>
  
  <p>I now have a simple C# program which I believe works successfully, and am attempting to force Java to load a C++ DLL to wrap the code. This may be the easiest solution, but I am leaving the question open as I feel like there must be an easier method. 
  Sample code from C# program :</p>
  
  <pre><code>using System;
  using System.Collections.Generic;
  using System.Text;
  using System.IO;
  
      public class GetFromFRX
      {
          public string getFromFRX(string filename, int pos)
          {
              StringBuilder buffer = new StringBuilder();
              using (BinaryReader b = new BinaryReader(File.Open("frmResidency.frx", FileMode.Open)))
              {
                  try
                  {
                      b.BaseStream.Seek(pos, SeekOrigin.Begin);
                      int length = b.ReadInt32();
  
                      for (int i = 0; i &lt; length; i++)
                      {
                          buffer.Append(b.ReadChar());
                      }
                  }
                  catch (Exception e)
                  {
                      return "Error obtaining resource\n" + e.Message;
                  }
  
              }
              return buffer.ToString();
          }
      }
  </code></pre>