Binary File problem

Discussion in 'Questions (Windows Mobile)' started by Ianmac, Aug 7, 2007.

  1. Ianmac

    Ianmac Member Licensed User

    I am trying to set up a binary file system, which shouldn't be too difficult as you provide a perfectly good example, however, when I copy and paste this into Basic4ppc on trying to run it I get an error message 'bin is not a known control or object' and when I compile I get this error and another 'Object reference is not set to an instance of an object'.
    A correctly named binary file appears in the right column under 'Objects'.
    I thought the problem might lie in the set up I have where the working folder is on my desktop and the .dll file appears here and not with the Basic4ppc executable, but copying it to the programs folder made no difference.
    All help gratefully received.
  2. Erel

    Erel Administrator Staff Member Licensed User

    The dll files should be in the same folder of your source code.
    Basic4ppc automatically copies the dll files when you add them to your project.
    Can you upload your source code file?
  3. agraham

    agraham Expert Licensed User

    I have tried to reproduce your error by cutting and pasting erels' example BinaryFile code into a new project, adding a BinaryFile component and adding a BinaryFile object called "bin".

    If BinaryFile.dll is not in the same folder as the source code I get a " Could not load file or assembly 'file:///C:\Temp\BinaryFile.dll ..." error. This happens whether or not any BinaryFile objects have been added. So if you can start B4PPC and load the saved source without error then the dll has been found.

    If the dll has been found then the only way to get your error is to not have a BinaryFile object called "bin" added. Are you sure that you don't have an extraneous character in the name of your "bin" object? e.g an object called "bin " (note the extra space) looks right but causes the error you are seeing as " bin" also does.
  4. Ianmac

    Ianmac Member Licensed User

    Can't see the wood for the trees

    OK, problem solved, I didn't take the first first line comment as literally as it was intended.
    I just created a file called 'test' of type bin, not a file called 'bin' - of type bin.
    Sometimes the blindingly obvious just passes me by.

    Thanks for the help.:sign0161:
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice