windows-nt/Source/XPSP1/NT/ds/security/ntmarta/newsrc/prtctx.h
2020-09-26 16:20:57 +08:00

86 lines
1.5 KiB
C++
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

//+---------------------------------------------------------------------------
//
// Microsoft Windows NT Security
// Copyright (C) Microsoft Corporation, 1997 - 1998
//
// File: prtctx.h
//
// Contents: NT Marta printer context class
//
// History: 4-1-1999 kirtd Created
//
//----------------------------------------------------------------------------
#if !defined(__PRTCTX_H__)
#define __PRTCTX_H__
#include <windows.h>
#include <printer.h>
#include <assert.h>
#include <winspool.h>
//
// CPrinterContext. This represents a printer object to the NT Marta
// infrastructure
//
class CPrinterContext
{
public:
//
// Construction
//
CPrinterContext ();
~CPrinterContext ();
DWORD InitializeByName (LPCWSTR pObjectName, ACCESS_MASK AccessMask);
DWORD InitializeByHandle (HANDLE Handle);
//
// Dispatch methods
//
DWORD AddRef ();
DWORD Release ();
DWORD GetPrinterProperties (
PMARTA_OBJECT_PROPERTIES pProperties
);
DWORD GetPrinterRights (
SECURITY_INFORMATION SecurityInfo,
PSECURITY_DESCRIPTOR* ppSecurityDescriptor
);
DWORD SetPrinterRights (
SECURITY_INFORMATION SecurityInfo,
PSECURITY_DESCRIPTOR pSecurityDescriptor
);
private:
//
// Reference count
//
DWORD m_cRefs;
//
// Printer handles
//
HANDLE m_hPrinter;
//
// Were we initialized by name or handle?
//
BOOL m_fNameInitialized;
};
#endif