Home Forums ActiveX components Other ActiveX components want some examples for using Xceed Binary Encoding Library

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • User (Old forums)
    Member
    Post count: 23064
    #43113 |

    Hey,

    I’m using Xceed Binary Encoding Library 1.1, to encode a Macintosh file to HQX format before sharing it through Email. I have a MAC file which has got the DataFork and resource fork as different streams in the same file(AppleShare File).  I am able to encode the file, retaining the datafork and resouce fork. But still the type and creator is lost. I found few properties to be set before calling the Processfile method for encoding. The properties are

    encodingFormat.HeaderCreator

    encodingFormat.HeaderType

    encodingFormat.HeaderFlags

     

    I found no documentation to set these properties. When i try to set these properties there is a error as below

    Property, indexer, or event ‘HeaderCreator’ is not supported by the language; try directly calling accessor methods ‘XceedBinaryEncodingLib.XceedBinHexEncodingFormatClass.get_HeaderCreator()’ or ‘XceedBinaryEncodingLib.XceedBinHexEncodingFormatClass.set_HeaderCreator(ref object)’

    and it fails to compile. I want some help on how to identify the Creator and Type from the <fileName>:AFP_Afpinfo stream and set it in these properties. If you provide some code to set these properties in C# it would be very helpful.

     

    Thanks,

    Bala Rajesh.
     

     

    Imported from legacy forums. Posted by Bala (had 3894 views)

    User (Old forums)
    Member
    Post count: 23064

    Here is an example on how to do this. 

          XceedBinaryEncodingLib.XceedBinHexEncodingFormatClass format = new XceedBinaryEncodingLib.XceedBinHexEncodingFormatClass();

          // The assignment below is by ref, but the content of “creator” and “type” will not be modified and
          // we will take the first 4 byte and copy it in another byte array.
          object creator = new byte[] { 1, 0, 0, 0 };
          object type = new byte[] { 1, 0, 0, 0 };
          format.set_HeaderCreator( ref creator );
          format.set_HeaderType( ref type );
          format.HeaderFlags = 1;

          axXceedBinaryEncoding1.EncodingFormat = format;

          // For some none official information on Creator, Type :
          // http://en.wikipedia.org/wiki/Creator_code
          // http://en.wikipedia.org/wiki/Type_code

    Use the get_ methods to get the value back.

     e.g.:

    object headerObject = encodingFormat.get_HeaderCreator();

    byte[] headerCreator = ( byte[] ) headerObject;

    Imported from legacy forums. Posted by André (had 4908 views)

    User (Old forums)
    Member
    Post count: 23064

    hello i need a help

    Imported from legacy forums. Posted by Loqowi (had 2211 views)

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.