The GetDIBits function retrieves the bits of the specified compatible bitmap and copies them into a buffer as a DIB using the specified format.
HDC hdc, // handle to DC
HBITMAP hbmp, // handle to bitmap
UINT uStartScan, // first scan line to set
UINT cScanLines, // number of scan lines to copy
LPVOID lpvBits, // array for bitmap bits
LPBITMAPINFO lpbi, // bitmap data buffer
UINT uUsage // RGB or palette index
Actually i am writing code to diaply image read by an imagescanner device.
In this i need to support all formats of images. So, i need to display an image which is in byte array format. How to do that?
_Application::CreateDispatch() returns a BOOL.
The _Application class derives from COleDispatchDriver.
You should provide a pointer to a COleException in the call to CreateDispatch() to get hold of the error.
I'm using Visual Studio 2005 Professional Edition.
I created a project on .NET Framework (Windows Embedded CE 6.0).
When i run my project in DEBUG mode on my emulator, i get an error read as :
Application MyProject.exe encountered a serious error and
Please advise how to resolve this.
I have no such problem when I run my application in RELEASE mode.
No - it can cause problems. If the header file is included in more than one source file (i.e. a body file) then the linker will complain about szTempFile being multiply defined (actual error will depend on your actual compiler). Effectively each body file gets its own variable with global scope called szTempFile. When the linker comes along it sees multiple versions of the variable and causes the error
The rule is that a variable name can be declared more than once but only defined once. The above line is a definition. Definitions should always live in the body files. If you want to share the variable between multiple body files then you need to include a declaration of the variable in the header file. You do this by putting the keyword extern in front of the declaration as follows
extern TCHAR szTempFile[MAX_PATH];
Librarians rule, Ook!
Last Visit: 31-Dec-99 18:00 Last Update: 25-Sep-23 0:39