title: Creating digital persona fingerprint template from serialized data
body: <p><i>This is a very specific question which will probably earn me the tumbleweed badge, but please answer if you can</i></p>
  
  <p>I've imported DigitalPersona sdk dll's as type libraries into Delphi and am trying to verify fingerprints which I've stored as serialized data in a database, it's working very awesomely.  Enrollment seems to work fine, but I can't turn the binary data from the finger prints back into DPFPTemplate objects. I keep getting an OLEException every time I try to used the defaultinterface property of a TDPFPTemplate object.  </p>
  
  <p>What I'm wondering is how Digital Persona expects you to use their SDK to recreate fingerprints. This is what their instructions say:</p>
  
  <pre>
  1. *Retrieve serialized fingerprint template data from a fingerprint data storage subsystem.
  2. Deserialize a DPFPTemplate object by calling the Deserialize method (VB page 40, C++
  page 83).
  3. Return a DPFPTemplate object.
  </pre>
  
  <p>All the ways of making a DPFPTemplate seem to only include using the fingerprint reader itself.  </p>
  
  <p>Here's one way that doesn't work</p>
  
  <pre><code> Result := CreateOleObject('DPFPShrX.DPFPTemplate.1') as IDPFPTemplate;
   Result.Deserialize(string(AUserFinRecPtr.FingerBuffer));
  </code></pre>
  
  <p>and here's another</p>
  
  <pre><code>DPFPTemplate := TDPFPTemplate.Create(nil);
  DPFPTemplate.DefaultInterface.Deserialize(String(AUserFinREcPtr.FingerBuffer));
  </code></pre>