I found out that this is usually done with the BI_SRCPREROTATE flag:
A special flag was developed
(BI_SRCPREROTATE) which tells GDI and
the video renderer that the
orientation of the image from the
camera is in the correct orientation
(don't rotate when rendering it). This
is necessary because as you rotate the
shell on the device you also
physically rotate the device. When the
display driver rotates bitmaps to
render the shell and UI it needs to
know that this particular bitmap
shouldn't be rotated. The flag is or'd
into the biCompression field in the
BITMAPINFO structure.
From http://www.tech-archive.net/Archive/PocketPC/microsoft.public.pocketpc.developer/2005-12/msg00850.html
Sample code might look like this:
pVih->bmiHeader.biCompression &= ~BI_SRCPREROTATE;
From http://innovator.samsungmobile.com/bbs/discussion/view.do?parentCategoryId=4&messageId=45549&boardId=224&platformId=2
This method however is not working with the HTC HD2 I am using, but it might work with other devices, so I decided to add this to my question.