Welcome to the Xceed Community | Help
Community Search  
More Search Options

want some examples for using Xceed Binary Encoding Library

Sort Posts: Previous Next
  •  06-20-2008, 9:41 AM Post no. 13107

    want some examples for using Xceed Binary Encoding Library

    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.
     

     

  •  07-01-2008, 5:35 PM Post no. 13348 in reply to 13107

    Re: want some examples for using Xceed Binary Encoding Library

    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;


    André
    Software Developer
    Xceed Software Inc.
  •  03-11-2013, 12:49 PM Post no. 33172 in reply to 13348

    • Loqowi is not online. Last active: 03-11-2013, 12:49 PM Loqowi
    • Not Ranked
    • Joined on 03-11-2013
    • 1230 Peachtree Street NE 19th Floor Atlanta, GA 30
    • Posts 1

    Re: want some examples for using Xceed Binary Encoding Library

    hello i need a help
View as RSS news feed in XML
Contact | Site Map | Reviews | Legal Terms of Use | Trademarks | Privacy Statement Copyright 2011 Xceed Software Inc.