To be accurate, the Carriage Return and Line Feed are followed by a
16-bit integer before "LVINLBVW".
Further, I think LLBs differ from VIs (in these first few bytes) only
in that "LVIN" becomes "LVAR".
Brian
"Greg McKaskle" wrote in message
news:3ECA29E8.9060503@austin.rr.com...
> > I'm often using the command "file" (on a linux box) to dertermine the
> > type of a file.
> > Ok, LabView vis are easy to find because of the file-extension (if there
> > wasn't some moron changing it).
> > Is there a magic number (or a magig-file) which contains a definition
> > for LabView vis, so they would be known by "file"?
> >
> > Or, if there isn't such a finished file... how can one see by the conten
> > of the file (not by it's name) if
it's a LabView vi?
> >
>
> I don't remember the "file" command, or how magic numbers work off the
> top of my head, and apparently OSX doesn't have a "file" command. But,
> the first four chars of a VI are 'RSRC' and I believe the next two
> should be 'cr' and 'lf' followed by 'LVIN' and 'LBVW'. The cr/lf is
> useful to detect when someone didn't do a binary transfer of the file.
> You might write a small LV program to look at the front of a VI if it
> seems like I'm a bit off. The file is very binary, and many of the
> contents are relocatable, but there is a standard header, I just don't
> know for certain where the cr/lf is relative to the other four character
> constants.
>
> Greg McKaskle
>