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.
The call returns 0 is no error occurs, otherwise it returns a non-zero value. A value of -1 indicates an error in creating the barcode image. A positive error indicates an error in creating the disk file.
Note that graphic files based on bitmaps should have a target resolution specified by calling SetBitmapScale() before saving the file.
More: