System Programming MCQs with Answers
Practice important System Programming MCQs with answers and explanations.
Multiple Choice Questions
Q1751: Which parameter in DllMain indicates the reason for being called?
- A: hDll
- B: lpReserved
- C: Reason
- D: status
View Answer
C
Q1752: Which value indicates a thread has attached to the DLL?
- A: DLL_PROCESS_ATTACH
- B: DLL_THREAD_ATTACH
- C: DLL_THREAD_DETACH
- D: DLL_PROCESS_DETACH
View Answer
B
Q1753: What does lpReserved == NULL represent in DllMain?
- A: Implicit attachment
- B: Explicit attachment
- C: Thread detachment
- D: DLL error
View Answer
B
Q1754: Which of the following is NOT a valid value for the Reason parameter in DllMain?
- A: DLL_PROCESS_ATTACH
- B: DLL_THREAD_ATTACH
- C: DLL_CALL_INIT
- D: DLL_PROCESS_DETACH
View Answer
C
Q1755: What is the correct return type of DllMain()?
- A: INT
- B: BOOL
- C: VOID
- D: DWORD
View Answer
B
Q1756: All calls to DllMain() are _______ by the system.
- A: ignored
- B: logged
- C: serialized
- D: skipped
View Answer
C
Q1757: Serialization of DllMain is important to avoid _______.
- A: race conditions
- B: memory leaks
- C: system shutdown
- D: syntax errors
View Answer
A
Q1758: Calling LoadLibrary from inside DllMain() can lead to _______.
- A: thread safety
- B: memory optimization
- C: multiple entry calls
- D: security patches
View Answer
C
Q1759: A call to FreeLibrary() causes the DLL to _______.
- A: initialize
- B: load
- C: attach
- D: detach
View Answer
D
Q1760: The DllMain function must not perform _______.
- A: arithmetic operations
- B: thread initialization
- C: blocking or IO calls
- D: console printing
View Answer
C