Troubles with ApOpenDBaseFile()

I have some troubles with the photon function “ApOpenDBaseFile”. I
have a few bitmaps inside a “wgtp” file.

For some reason (which is what I would like to know), sometimes an error
occur when opening the wgtp file. But, when that happens, the
function is not returning the NULL value described in the

What happens is that the program continue to run normaly and when I
call “ApGetImageRes” to get the bitmaps, the function SOMETIMES
returns NULL (so I don’t get that bitmap). But some bitmaps are still
opening correctly.

What is weird is that as long as I don’t re-open the wgtp file, the
bitmaps that returned NULL will continue to do so at each call of
“ApGetImageRes” and the ones that are OK will always load. When I
re-open the wgtp file, bitmaps may be all OK, OR some may be NULL
but they could be different bitmaps than the previous missing ones .

I don’t belive the wgtp file to be corrupted for most of the time
(99,9%), the ApOpenDBaseFile works fine with the same wgtp file.


Simon Bélanger

What version of Photon are you using? Not that I think it is the problem, but I suppose an early enough version might have had problems.

Off the top of my head, the two guesses I would come up with are 1. Bad hardware - or perhaps DMA problems with the drive and 2. you have a bug which is corrupting the open database data causing semi random results.


Photon 1.14 patch C
QNX 4.25 patch G

So I doubt it is a bug in Photon.