The CSystemClock class implements a system clock that provides time information and timing signals to an application. It uses the CBaseReferenceClock base class to provide most of that functionality, adding persistence.
CSystemClock implements the IPersist interface. For more implementation information, see "OLE Programmers Reference (Vol. 1): Structured Storage Overview."
Member Functions
Name | Description |
CreateInstance | Creates an instance of a system clock. |
CSystemClock | Constructs a CSystemClock object. |
Implemented IPersist Methods
Name | Description |
GetClassID | Returns the class identifier for this clock (CLSID_SystemClock). |
Implemented INonDelegatingUnknown Methods
Name | Description |
NonDelegatingQueryInterface | Passes out pointers to IID_IPersist, and calls the base clock for other interface queries. |
Creates a new instance when placed in the factory template table.
static CUnknown * WINAPI CreateInstance(
LPUNKNOWN pUnk,
HRESULT *phr
);
Returns a pointer to a new Component Object Model (COM) object.
This member function is required to create objects using the class factory. It calls the class constructor.
The phr parameter will be modified only if a failure occurs. If it is a failure code on input, construction can be terminated, but in any case the destructor will be called by the creator when the HRESULT error is detected.
Constructs a CSystemClock object.
CSystemClock(
TCHAR *pName,
LPUNKNOWN pUnk,
HRESULT *phr
);
No return value.
If phr points to something other than S_OK upon entry, the object will not be constructed. If an error occurs during construction, this variable will be set; otherwise, its contents will not be altered.
Retrieves the class identifier for this clock.
HRESULT GetClassID(
CLSID *pClsID
);
Returns an HRESULT value.
Returns an interface and increments the reference count.
HRESULT NonDelegatingQueryInterface(
REFIID riid,
void ** ppv
);
Returns a pointer to the interface.
This member function implements the INonDelegatingUnknown::NonDelegatingQueryInterface method and passes out references to the IReferenceClock, IPersist, and IUnknown interfaces.
© 1997 Microsoft Corporation. All rights reserved. Terms of Use.