CopySettingsForAllUsers

 

#include “BlackIceDEVMODE.h”

 

BOOL CopySettingsForAllUsers (LPTSTR szPrinterName);

Description

Copies the current user’s printer settings to every user on the system. Requires administrator privileges.

Parameters

LPCTSTR szPrinterName:

The name of the Black Ice Printer that should be copied.

Return value

TRUE on success, otherwise FALSE.

Programming Notes

None

Code Example

// create a DEVMODE structure
BlackIceDEVMODE* pDevMode = CreateDefaultSettings(szPrinterName);

// change the settings
SetPaperSize(dwPaperCode, pDevMode);

...

// save the settings for the current user and release the structure
SaveBlackIceDEVMODE(szPrinterName, pDevMode);
ReleaseBlackIceDEVMODE(pDevMode);

// copy the current user's settings to all users on the system
CopySettingsForAllUsers(szPrinterName);