Hello Miguel, This might be a longshot, but are you remembering to properly dispose of all your resources when you close the form? In particular, do you call CameraLibPreviewStop() and CameraLibClose()?
Adrien. Monday, April 11, 2005, 10:56:51 PM, you wrote: MASH> I hope someone can help me find out why I'm facing this problem, maybe MASH> someone who understand how camera lib and windows work. Maybe I'm MASH> missing something. MASH> I added camera support to an existing application for treo 600. I MASH> initialize the camera by doing the following: MASH> - setting the screen mode to 16 bit depth. MASH> - SysLibFind then SysLibLoad (camera library) MASH> - CameraLibOpen MASH> There is no error so far under any circumstance. Then I do the following: MASH> - Load and draw the form MASH> - Then: CameraLibPreviewStart(gCamLibRefNum, WinGetDrawWindow(), 0, 20); MASH> - and some other stuff MASH> Only when I load the form (FrmGotoForm) the first time, it works (I can MASH> see the image in my form because if the MASH> CameraLibPreviewStart) but if I MASH> switch to another form and I go back to the camera preview form it MASH> doesn't work anymore. I get the error 0x0010 when I call MASH> CameraLibPreviewStart (any problem with MASH> WinGetDrawWindow() after being MASH> loaded for the first time?) instead and I don't see any image from the MASH> camera. If I want to capture an image (with CameraLibPreview) I get the MASH> error code: 0x95FE. None of these error codes are documented and these MASH> functions are supposed to return other error codes than these ones. And MASH> of course, I didn't find anything in the plugged in forum (does anyone MASH> find real answers?). MASH> It works when I load the form for the first time but when I switch to MASH> another form and switch back to this form it doesn't work anymore. And MASH> It doesn't work at all if I load this form with FrmPopupForm (not even MASH> the first time). MASH> Because the error code I get is not the one I'm supposed to get from the MASH> function I don't know how to solve this. MASH> I'm using palome sdk 4.2. MASH> Any Ideas? MASH> Thanks in advance -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
