Do you think IIT Guwahati certified course can help you in your career?
No
Introduction
Hey Ninjas! Have you ever heard about the word ATL classes? The Active Template Library (ATL) is a set of template-based C++ classes created by Microsoft. These are used to simplify the Running Objects Classes (ROC) and Component Object Model (COM) objects.
In this blog, we will discuss the topic of Running Objects Classes in detail. Let's start.
Running Objects Classes
Only one class supports the Running objects, which is listed below.
IRunnableObjectImpl Class: This class determines if an object is running, forces it to run, or locks it into the given running state. Let's discuss this in detail.
IRunnableObjectImpl Class
This class offers a default implementation of the IRunnableObject interface and implements IUnknown. IRunnableObject allows a container to control the running of its embedded objects. When a local server implements an object, the Run method starts the server's .EXE file. When a Run function is called on an object that was created using an in-process server, the object's .DLL file enters the running state.
Syntax
template<class T>
class IRunnableObjectImpl
Methods
There are five methods in the Running Objects Classes. All methods are listed below.
GetRunningClass
IsRunning
LockRunning
Run
SelectContainedObject
We will now discuss all of the methods one by one.
GetRunningClass
The GetRunningClass retrieves the CLSID of a running object. The syntax is as follows.
HRESULT GetRunningClass(
[out] LPCLSID lpClsid
);
And the parameters are:
[out] lpClsid
Requirements:
Name
Description
Header
objidl.h
Target Platforms
Windows
Return Values
E_INVALIDARG, E_UNEXPECTED, and S_OK.
Minimum Supported Server
Windows 2000 Server [desktop app only]
Minimum Supported Client
Windows 2000 Professional [desktop app only]
IsRunning
The IsRunning method decides whether an object is currently in the running state. The syntax is as follows.
BOOL IsRunning();
Requirements:
Name
Description
Header
objidl.h
Target Platforms
Windows
Return Values
If the object is in the running state, the return value is TRUE. Else, it is FALSE.
Minimum Supported Server
Windows 2000 Server [desktop app only]
Minimum Supported Client
Windows 2000 Professional [desktop app only]
LockRunning
LockRunning either unlocks an object from its running state or locks one that is already running into that state. The syntax is as follows.
There are two parameters in LockRunning Objects Classes.
[in] fLock
[in] fLastUnlockCloses
Requirements:
Name
Description
Header
objidl.h
Target Platforms
Windows
Return Values
E_INVALIDARG, E_OUTOFMEMORY, E_UNEXPECTED, E_FAIL, and S_OK.
Minimum Supported Server
Windows 2000 Server [desktop app only]
Minimum Supported Client
Windows 2000 Professional [desktop app only]
Run
The Run method forces an object to run. The syntax is as follows.
HRESULT Run( [in] LPBINDCTX pbc );
There is only one parameter for the Run method: [in] pbc.
Requirements:
Name
Description
Header
objidl.h
Target Platforms
Windows
Return Values
E_INVALIDARG, E_UNEXPECTED, and S_OK
Minimum Supported Server
Windows 2000 Server [desktop app only]
Minimum Supported Client
Windows 2000 Professional [desktop app only]
SetContainedObject
The SetContainedObject method tells an object that it is embedded in an OLE container. This ensures that reference counting is done perfectly for containers that support links to embedded objects.
There is only one parameter for the Run method: [in] fContained.
Requirements:
Name
Description
Header
objidl.h
Target Platforms
Windows
Return Values
E_INVALIDARG, E_OUTOFMEMORY, E_UNEXPECTED, and S_OK.
Minimum Supported Server
Windows 2000 Server [desktop app only]
Minimum Supported Client
Windows 2000 Professional [desktop app only]
Frequently Asked Questions
What are classes in ATL?
Classes in Active Template Library(ATL) contain important data to display in different directions like metafile, printer, or ActiveX control. Class instance data in the ATL windowing code.
What is an IUnknown Interface in Running Objects Classes?
An IUnknown interface that contains a pointer to a virtual method table has a list of pointers to the functions. Now, this implements the functions declared in the interface in the same order that they are declared in the interface.
What are the applications of ATL?
ActiveX controls are often created using the Active Template Library (ATL), a wrapper library that makes COM development easier. MFC or ATL apps may be produced with Visual Studio Community Edition or higher.
What does Active Template Library (ATL) mean?
The Active Template Library is a set of Microsoft C++ template classes (program routines) that are specially made to make it easier to code and develop for the Component Object Model (COM) and ActiveX.
What is System Registry in Running Objects Classes?
The system registry is a database of information, options, settings, and other values for software and hardware installed on all editions of the Microsoft Windows operating system.
Conclusion
This article discusses the topic of Running Objects Classes. In detail, we have seen the definition of Running Objects Classes and IRunnableObjectImpl classes. Along with this, we have seen a brief explanation of all five types of methods.
We hope this blog has helped you enhance your knowledge of Running Objects Classes. If you want to learn more, then check out our articles.
But suppose you have just started your learning process and are looking for questions from tech giants like Amazon, Microsoft, Uber, etc. In that case, you must look at the problems, interview experiences, and interview bundles for placement preparations.
However, you may consider our paid courses to give your career an edge over others!
Happy Learning!
Live masterclass
Top GenAI Skills to crack 30 LPA+ roles at Amazon & Google
by Sumit Shukla
02 Feb, 2026
03:00 PM
Python + AI Skills to ace 30L+ CTC Data roles at Amazon
by Prerita Agarwal
01 Feb, 2026
06:30 AM
Top 5 GenAI Projects to Crack 25 LPA+ Roles in 2026
by Shantanu Shubham
01 Feb, 2026
08:30 AM
Zero to Data Analyst: Amazon Analyst Roadmap for 30L+ CTC
by Abhishek Soni
02 Feb, 2026
01:30 PM
Top GenAI Skills to crack 30 LPA+ roles at Amazon & Google
by Sumit Shukla
02 Feb, 2026
03:00 PM
Python + AI Skills to ace 30L+ CTC Data roles at Amazon