Skip to main content

System Programming MCQs with Answers

Practice important System Programming MCQs with answers and explanations.

Chapter: 85
Q1761:
A thread detach is notified to DllMain when _______.
A. thread ends
B. thread is created
C. thread is paused
D. process exits
Correct Answer: A
Chapter: 85
Q1762:
Which function disables thread attach/detach notifications in a DLL?
A. ExitThread()
B. DisableThreadAttach()
C. DisableThreadLibraryCalls()
D. BlockDllNotify()
Correct Answer: C
Chapter: 85
Q1763:
Calling another DLL from inside DllMain() is _______.
A. recommended
B. unsafe
C. perfectly valid
D. necessary
Correct Answer: B
Chapter: 85
Q1764:
DllMain is the function where a DLL should perform _______.
A. code compilation
B. user interaction
C. resource initialization
D. thread scheduling
Correct Answer: C
Chapter: 85
Q1765:
LoadLibrary() must not be called inside DllMain() because it can _______.
A. optimize performance
B. trigger other entry points
C. start other processes
D. fix memory
Correct Answer: B
Chapter: 85
Q1766:
The value of lpReserved in DllMain indicates _______.
A. handle of DLL
B. reason code
C. type of attachment
D. return value
Correct Answer: C
Chapter: 85
Q1767:
All parameters to DllMain must be in a specific order.
A. A
B. B
Correct Answer: A
Chapter: 85
Q1768:
LoadLibraryEx() provides more options than LoadLibrary().
A. A
B. B
Correct Answer: A
Chapter: 85
Q1769:
DllMain should avoid calling functions that might block execution.
A. A
B. B
Correct Answer: A
Chapter: 85
Q1770:
FreeLibrary() must be called to detach DLLs in explicit linking.
A. A
B. B
Correct Answer: A
Chapter: 85
Q1771:
The system ensures all DllMain calls are serialized.
A. A
B. B
Correct Answer: A
Chapter: 85
Q1772:
DisableThreadLibraryCalls() helps reduce overhead for thread attach/detach.
A. A
B. B
Correct Answer: A
Chapter: 85
Q1773:
The Reason parameter in DllMain helps decide the operation to perform.
A. A
B. B
Correct Answer: A
Chapter: 85
Q1774:
DllMain can receive notifications for both thread and process events.
A. A
B. B
Correct Answer: A
Chapter: 85
Q1775:
DllMain must not call LoadLibrary or LoadLibraryEx.
A. A
B. B
Correct Answer: A
Chapter: 85
Q1776:
If lpReserved is not NULL, the attachment was implicit.
A. A
B. B
Correct Answer: A
Chapter: 85
Q1777:
The value DLL_PROCESS_DETACH is passed to DllMain when _______.
A. a new thread starts
B. a process ends
C. a DLL is loaded
D. a file is created
Correct Answer: B
Chapter: 85
Q1778:
The BOOL return from DllMain indicates whether initialization _______.
A. failed or succeeded
B. has started
C. needs delay
D. is skipped
Correct Answer: A
Chapter: 85
Q1779:
The operating system directly invokes _______ during DLL attach/detach.
A. DllMain()
B. main()
C. LoadFunction()
D. winMain()
Correct Answer: A
Chapter: 85
Q1780:
DllMain should not include _______ to prevent thread blocking.
A. wait functions
B. integer loops
C. casting
D. statements
Correct Answer: A

Test Your Knowledge

Take a timed quiz on System Programming

🚀 Start Quiz Now