I got it!
It was a lot work, but it works pretty well, here you can see how I did it:
That’s the content of my applet class:
// After the object has been created - initialize the external 'C' application.
// Create() will then call the OnCreate() method.
// Set the timer for the update routine
this.ProgressTimer.Period = 100;
// When the object is disposed - destroy the embedded application
// Destroy() will then call the OnDestroy() method.
// This method initialize the external application in general.
// For this specific example a device class is in use which
// provides a function to initialize a camera.
aPosition; // Dummy expresion to avoid Chora warnings.
return Camera::Device.CameraInit( aSize );
// This method calls the device class function for the deinitalisazin.
Camera::Device.CameraDeinit( aHandle );
// OnProgress() is called, to give the external 'C' application a chance for some
// background processing, animations, etc. aTime contains the current time in
aTime; // Dummy expresion to avoid Chora warnings.
Camera::Device.CameraProgress( aHandle );
// No idle processing required. Wait for the next timer expiration. When 'true'
// is returned, OnProgress() is invoked as soon as possible.
// Here, the external application can perform screen updates.
// In our example the camera uses two buffer areas to update the screen.
// The first area is for permanent saving the data that the camera sends
// and the second one is for supporting an complete camera view after the first buffer
// has be written completely.
if ( Camera::Device.CameraUpdate( aHandle ) )
// No update needed
// Here, the bitmap used internally by the external application to store its visible
// content is determined.
return Camera::Device.CameraGetBitmap( aHandle );