VPF Info Reader - Reference


Object: Reader
Version 1.0
DLL: VPFInfo.dll
 
See also: Collection Object, Data Object  
 

 

METHODS

 
LoadFromFile
    IData ** LoadFromFile(BSTR bstrFile)
 
LoadFromStream
    IData ** LoadFromStream(IUnknown *pUnkDataStream)
 
LoadFontCollectionFromFile
    ICollection ** LoadFontCollectionFromFile(BSTR bstrFile)
 
 

 
   
LoadFromFile
 
Name LoadFromFile
   
Description Loads info from a single .vpf file

This method use default font folder location specified in the register settings.
Use the VPF Register Console to change the location.
   
Type Method
   
Interface
IData ** LoadFromFile (  
  BSTR bstrFile
)  
   
Parameters
bstrFile Specifies the path and the filename to the file
   
Returning value Returns pointer to DataObject if all info could be retrieved from the file
   
Example JScript:

var readobj = Server.CreateObject("VPFInfo.Reader ");

// Load font from a specified folder location
var dataobj = readobj.LoadFromFile(“c:\\myfont.vpf”);

// Load font from the default font folder location
var dataobj = readobj.LoadFromFile(“myfont.vpf”);

VBScript:

readobj = Server.CreateObject("VPFInfo.Reader ")

' Load font from a specified folder location
Set dataobj = readobj.LoadFromFile(“c:\myfont.vpf”)

' Load font from the default font folder location
Set dataobj = readobj.LoadFromFile(“myfont.vpf”)
 

goto top  
LoadFromStream
 
Name LoadFromStream
   
Description Loads info from a stream
   
Type Method
   
Interface
IData ** LoadFromStream (  
  IUnknown *pUnkDataStream
)  
   
Parameters
*pUnkDataStream Specifies an object that supports the interface IStream.
   
Returning value Returns pointer to DataObject if all info could be retrieved from the stream
   
Example JScript:

// Create Stream object
var FS = Server.CreateObject("ADODB.Stream");
var readobj = Server.CreateObject("VPFInfo.Reader");

// Set type as binary
FS.Type = 1;
FS.Open();

FS.LoadFromFile("c:\\myfont.vpf");

var dataobj = readobj.LoadFromStream(FS);

VBScript:

Dim FS
Dim dataobj
Dim readobj

' Create Stream object
Set FS = Server.CreateObject("ADODB.Stream")
Set readobj = Server.CreateObject("VPFInfo.Reader")

// Set type as binary
FS.Type = 1
FS.Open

FS.LoadFromFile "c:\image.bmp"

Set dataobj = readobj.LoadFromStream(FS)

 

goto top  
LoadFontCollectionFromFile
 
Name LoadFontCollectionFromFile
   
Description Loads a collection object from a path

This method use default font folder location specified in the register settings.
Use the VPF Register Console to change the location.
   
Type Method
   
Interface
ICollection ** LoadFontCollectionFromFile (  
  BSTR bstrFile
)  
   
Parameters
bstrFile Path to folder with .vpf files
   
Returning value Returns pointer to CollectionObject containing DataObject
   
Example JScript:

var readobj = Server.CreateObject("VPFInfo.Reader");

// Load collection from a specified folder location
var collection = readobj.LoadFontCollectionFromFile("C:\\MyFonts\\");

// Load collection from the default folder location
var collection = readobj.LoadFontCollectionFromFile("");

VBScript:

readobj = Server.CreateObject("VPFInfo.Reader")

' Load collection from a specified folder location
Set collection = readobj.LoadFontCollectionFromFile("C:\MyFonts\")

' Load collection from the default folder location
Set collection = readobj.LoadFontCollectionFromFile("")

 

goto top