Products Downloads


French version


 


This function returns the Mime type of data contained in an IMAGE variable. NB: it is not a function completely validating the content of the variable.


In Windows, this function only detects a limited number of Mime types supported as standard.


Context

  • Windows client

  • Windows server

  • Java server

  • Java client
  • Adelia Web Client

  • Adelia Cloud client

  • Event Adelia client


Parameters

IMAGE

Image

Image variable containing binary data.

ALPHA(n)

MimeType

Variable which must contain the Mime type.

NUM_BIN_4 MimeTypeLg

Length of the MimeType variable.

If the Mime type length is over MimeTypeLg, the function fails and returns a -2 error code and the required length in MimeTypeLg.

NUM_BIN_2

ReturnCode

Return code for the operation:

0    Operation completed successfully. 

-1    An error occurred.

-2    The MimeType variable is not long enough.


Example

IMAGE      Image

ALPHA(250) MimeType

NUM_BIN_4  MimeTypeLg

NUM_BIN_2  ReturnCode

...


CALL_DLL 'VATOOLBX.DLL' 'VaToolBxFileToImage' 'c:\temp\document.docx' Image ReturnCode


LgTypeMime = 250

CALL_DLL 'VATOOLBX.DLL' 'VaToolBxGuessMimeTypeData' Image MimeType MimeTypeLg ReturnCode

* => The value of MimeType is "application/vnd.openxmlformats-officedocument.wordprocessingml.document"


List of VaToolBx DLL functions by topic

↑ Top of page






  • Aucune étiquette