Click here to Skip to main content
15,881,092 members

Comments by link111 (Top 6 by date)

link111 27-Apr-18 16:21pm View    
this is what works:
Fmd obj;
byte[] bytes;
IFormatter formatter = new BinaryFormatter();
using (MemoryStream stream = new MemoryStream())
{
formatter.Serialize(stream, obj);
bytes = stream.ToArray();
}
link111 27-Apr-18 16:18pm View    
here is the answer from the documentation:
Serialization The .NET API provides the ability to convert an FMD or FID into a format that can be read serially. Serialization allows you to easily transmit and store data as byte strings, streams or XML. This allows you to transmit the data or save it to standard file systems. The XML format can be used within HTML for building browser-based applications. To return the data to its original format, deserialization is also provided. Note that serialized FMDs and FIDs include the version number of the .NET wrapper was used for the serialization. If you attempt to deserialize with an older version of the wrapper, the results may not be correct. So when deserializing, the .NET wrapper will throw an SDKException if the serialization was done using a later version of the wrapper. Serialization in the .NET Wrapper occurs using the default System.Xml.Serialization.XmlSerializer. The name of the root element of the generated XML is the same as the object type. Each public member of the object is represented as an XML element. Raw byte data is encoded as a Base-64 string by XmlSerializer. Deserialization uses the same XmlSerializer. The XML that was serialized is fed into XmlSerializer where the elements with values become object members with values of the same name as the element.
link111 27-Apr-18 16:09pm View    
Deleted
I will never understand why people are so smug and elitist in their answers on this forum. That said Nareen, it looks like the pertinent part of the FMD structure is the bytes. From what i gather, so long as you dont change the "format" , "version" , and "encoding" for the data from the defaults, you dont need to store them. I'm working also with this, very common and well known and industry standard digital persona distributed API by the way "dick MacCutchan"... And it appears that all you need to care about storing is the "bytes" field, even though the document does not describe how to reassemble the FMD object correctly when it has so much other information in it and provides no method for doing so other than using the provided "deserialize" method. Good luck and I'll post back when i figure it out, i figured i'd try to save some time if someone else already had.
link111 27-Apr-18 16:08pm View    
Deleted
I will never understand why people are so smug and elitist in their answers on this forum. That said Nareen, it looks like the pertinent part of the FMD structure is the bytes. From what i gather, so long as you dont change the "format" , "version" , and "encoding" for the data from the defaults, you dont need to store them. I'm working also with this, very common and well known and industry standard digital persona distributed API by the way "dick MacCutchan"... And it appears that all you need to care about storing is the "bytes" field, even though the document does not describe how to reassemble the FMD object correctly when it has so much other information in it and provides no method for doing so other than using the provided "deserialize" method. Good luck and I'll post back when i figure it out, i figured i'd try to save some time if someone else already had.
link111 8-Jul-14 10:28am View    
Deleted
That a week of searching only turns up people with the same problem. I'm looking for someone that has used this API before successfully. The A.P.I. seems to be working with the exception of that function. The syntax and usage are correct. This was a last ditch effort to find a solution.