According to the HELP for IMG_ImageLoad
Return Values
If the function succeeds, the return value is DI_OK.
If the function fails, the return value is an error code.
In the img_errors.h DI_OK is defined as DS_OK. This is not defined in any headers that come with Image X-Change. Knowing that you use this library in your PDF XChange product, which I also use, I found it in the DS_ERROR_MAKER.H.
// Common Errors and Success codes
#define DS_OK 0
If a positive number is valid then you may want to change your documentation. All other library functions that I am using in my application return 0 when successful.
My development environment is Clarion but use the API calls an NO template code. (Completely hand written)
This is a routine that opens the file
- Code: Select all
e# = IMG_ImageCreateEmpty(Address(L:FileHandle))
if ~e#
i# = IMG_ImageLoad(L:FileHandle, L:InFileName, 1)
if ~i#
exit
end
end
ErrorLog('BATCHENG_Process - Picture Open File error = '&e# &' - '& i#)
L:Generating = GEN:DONE
exit
Prototypes used:
<B>IMG_ImageCreateEmpty(LONG),LONG,PASCAL,RAW
IMG_ImageLoad(IMAGE_HANDLE,*CSTRING,ULONG),HRESULT,PASCAL,RAW,Name('IMG_ImageLoadA')
</B>
I will try the application and check for negatives only and post the results here.