Hi Dan,
I've been recently dealing with this same issue and here's the resolution
I've come to:
1. You can ONLY use Integers, Longs and Strings to represent your data in
InfoPath. I tried stdOLE.Picture, Variant, Byte() and they all won't bind by
default (or at all after many hours of recompiling to test). Why you ask?,
InfoPath is storing the data in an XML document file as node data
(<node>datadatadatadata</node>). Most types of data are using illegal
characters in this context and utf-8 or iso-8859-1 encoding won't solve the
problem. The simple resolution to storing ANY form of binary data is to
Base64 encode the data and return it as a String. Just to be fair here, after
talking with Microsoft about this using Visual Studio .NET and creating a
custom InfoPath form with the SDK should allow for binary data, however the
reason some of us are using ActiveX controls for data representation is
because not everyone working with InfoPath is a programmer, which is what is
expected when using .NET. This process is futher complicated by having to
create custom data schemas for InfoPath in VS .NET. Again, the simple
resolution to storing ANY form of binary data is to Base64 encode the data
and return it as a String.
2. Even though some of the examples lead you to believe that you can have
your own Public Property names, InfoPath's default schema only recognizes
ENABLED and VALUE (just as the examples show, but don't clearly state this as
a condition), so you may have to adjust your code to expose those names, or
use the InfoPath SDK and extend the default schema to accomodate your public
properties.
Hope this helps,
Cliff.