CreateProfileFile

 

#include “BlackIceDEVMODE.h”

 

BOOL            CreateProfileFile (LPCTSTR szPrinterName, LPCTSTR szFileName, LPCTSTR szProfileName, LPCTSTR szDescription, BlackIceDEVMODE* pDevmode);

Description

Saves the current printer settings to a new profile file without saving the profile in the printer driver. The profile will not only contain the settings stored in the printer’s BlackIceDEVMODE structure, but registry settings as well. You can get the current BlackIceDEVMODE structure using the LoadBlackIceDEVMODE function. When not needed anymore, free the structure using the ReleaseBlackIceDEVMODE function.

Parameters

LPCTSTR szPrinterName              - name of the Black Ice printer.

LPCTSTR szFileName                   - path of the new profile file to create.

LPCTSTR szProfileName              - name of the new profile. (max 50 characters including terminating zero)

LPCTSTR szDescription                - a short description of the profile. (max 500 characters including terminating zero)

BlackIceDEVMODE* pDevmode   - the BlackIceDEVMODE structure to save in the profile.

Return value

TRUE on success, otherwise FALSE.

Limitations

A 32 bit application that uses the 32 bit BlackIceDEVMODE.dll and ocx, must use the ApplyProfileFile function or method to change the profiles of 64 bit drivers. The rest of the Profile Manager Tab functions can only be used to change or retrieve the profiles of 32 bit drivers from 32 bit applications or to change or retrieve the profiles of 64 bit drivers from 64 bit applications.