Calls to Barcodef create the barcode image and saves it as a graphics file to a named disk file.
int WINAPI BarCodef(HMODULE hInstance, LPRECT lpRectIn, LPLOGFONT lpLogFontIn, LPBAR bc, LPSTR szFilename)
where
hInstance is the instance handle of the calling application or 0.
lpRectIn is a long pointer to a rectangle that is the destination rectangle for the barcode image (with coordinates in units of 0.01 mm).
lpLogFontIn is a long pointer to a LOGFONT structure filled with information about the font with which any text will be displayed on the barcode. The font height will be treated as Points and treated as positive.
bc is a BARCODE structure - the LPBAR cast is required.
szFilename is a long pointer to a string containing the fully qualified name of a file to receive the image. If the file exists it will be overwritten; if the file does not exist it will be created. However, the directory specified must exist or an error will be returned.
Bitmap based images are generated at the current default resolutions that may be set using SetDpi(). Bitmap images are monochrome (1 bit per pixel) images, so graphic formats that permit colour information in monochrome bitmaps (BMP and GIF) will be in colour; others will be in black and white.
The call returns -1 if no error occurs, otherwise it returns 0. The value of the error member of the barcode structure indicates the error code.
More: