winapi
Copy RTF Text to Clipboard
Add and delete custom printer forms
To distribute applications that use reports with custom paper size you have to create custom printer forms on every destination PC that runs Windows 2000 or later. The MS KB article Q157172 explains how it can be done manually. However there's a way to do that programmatically using Windows API.
Enumerating printer forms
Enumerating of printer forms can be done with Windows API EnumForms function.
Get number of jobs in print queue
The number of jobs in print queue can be retrieved by simplified version of Enumerating jobs in print queue
Enumerating jobs in print queue
Enumerating jobs in print queue can be done with
- WMI Win32_PrintJob class
- Windows API EnumJobs function.
How to delete all Print Jobs from a print queue
All jobs from a print queue can be deleted with
- WMI Win32_Printer class and CancelAllJobs method
- Windows API SetPrinter function.
Is user a member of the Administrators group
Sometimes it's important to know if application is running under account that is a member of the Administrators group. There're a few ways to accomplish that.
Obtaining DLL-specific version information
Most Windows Shell and common controls DLLs implement DllGetVersion function. It allows applications to obtain DLL-specific version information to make sure that required functionality in a DLL is implemented.
The Windows API support class is used to handle Windows API structures.
Generate GUID
UDF below generates 128-bit GUID and returns it as a string in the format 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'.
MSDN:
Creating directory preserving name case
MSDN:
- CreateDirectory function - Creates a new directory one level at a time
- SHCreateDirectory function - Creates a new directory including all intermediate folders, if necessary
- CreateFolder Method - WSH
- NewFolder Method - Shell
Recent comments
2 weeks 1 day ago
2 weeks 2 days ago
2 weeks 2 days ago
5 weeks 1 day ago
9 weeks 6 days ago
9 weeks 6 days ago
10 weeks 5 days ago
11 weeks 4 days ago
12 weeks 6 days ago
12 weeks 6 days ago