Novell Home

Example of FEGetEntryVersion()

From Developer Community

This code shows how to get the file entry version. It has a hardcoded filename in it, SYS:VOLDATA.TDF, feel free to change it to anything else.

Sample Code

#include <nwfileng.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/stat.h>

int main( void) {
  struct stat st;
  WORD vers;
  if ( stat( "SYS:\\VOLDATA.TDF", &st) == 0) {
    if ( FEGetEntryVersion( st.st_dev, ( LONG) st.st_ino, 0, 0, &vers) == 0) {
      printf( "vers = %u\n", vers);
    }
  }
  return EXIT_SUCCESS;
}

--Dmitry Mityugov

Novell® Making IT Work As One

© 2009 Novell, Inc. All Rights Reserved.