Calls to Bar2Df are similar to those to Bar2Dm except that the image created is saved to the file specified as the final parameter. If the file exists it will be overwritten. If the file does not exist it will be created. This is useful for creating barcode images in files.
Int WINAPI Bar2Df(HANDLE hModule, LPRECT lpRectIn, LPBAR2D bc, LPSTR szFileName)
where
hModule is the Module handle of the calling application.
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).
bc is a BARCODE2D structure - the LPBAR2D cast is required.
SzFileName is a long pointer to a string containing the fully qualified filename that will receive the graphics image. If the file exists it will be overwritten. If the file does not exist it will be created. If the path does not exist the function will fail.
The type of image saved is determined by the extension of the filename. .WMF saves the image as a Windows metafile. .BMP saves the image as a Windows bitmap. .PCX saves the image as a Paintbrush picture, and .EPS saves as an encapsulated PostScript bitmap image.
Note that the image is removed from memory before the call returns and so is not available for use.
More: