TIFF and LibTiff Mail List Archive

2005.04.02 05:02 "[Tiff] What is the 'real' variable type of thandle_t?", by Katrina Maramba

Im a little puzzled on the variable type of thandle_t...

I found this in tiffio.h:

#if defined(USE_WIN32_FILEIO)
# include <windows.h>
# ifdef __WIN32__
DECLARE_HANDLE(thandle_t); /* Win32 file handle */
extern TIFF* TIFFOpenW(const wchar_t*, const char*);
# else
typedef HFILE thandle_t; /* client data handle */
# endif /* __WIN32__ */
typedef void* thandle_t; /* client data handle */
#endif /* USE_WIN32_FILEIO */

This is my code:

void* pBufRet;
char Array[8];
char temp[8];

pBufRet = malloc(sizeof(char)*8);
temp = (char)pInputData[0];
Array[0] = (temp[0]) >>24;
printf("buf0 %x", Array[0]);

This is the error message I get when building:

error C2440: 'type cast' : cannot convert from 'struct thandle_t__ ' to 'unsigned char '

What should I do to eliminate this problem? Pls help. Thanks!