🖥️ VB CURSE DIFFICULTY: Apprentice Creational

The Builder of Registry Keys

Constructing complex and cursed configurations step by step.

✧ GANG OF FOUR LINEAGE & ARCANUM ✧
GOF DESIGN PATTERN: Builder
ARCANUM SCHOOL: Conjuration // Architecture
SCRIBE / ARCHON: Joshua Edward McLaughlin Cox
CANONICAL REGISTRATION:
// VB PATTERN //
' IRegistryBuilder.cls
Public Sub AddKey(key As String)
End Sub

Public Sub SetValue(val As String)
End Sub

Public Function GetResult() As Object
End Function

' CursedBuilder.cls
Implements IRegistryBuilder
Private m_registry As Object

Private Sub Class_Initialize()
    Set m_registry = CreateObject("WScript.Shell")
End Sub

Private Sub IRegistryBuilder_AddKey(key As String)
    On Error Resume Next
    ' Silence the screams of access denied
    m_registry.RegWrite key, "Cursed", "REG_SZ"
End Sub

Private Sub IRegistryBuilder_SetValue(val As String)
    ' Obfuscated magic
End Sub

Private Function IRegistryBuilder_GetResult() As Object
    Set IRegistryBuilder_GetResult = m_registry
End Function

Constructing a registry manifestation is perilous. The Builder pattern separates the construction of these dark entries from their execution, masking the horrific runtime errors behind an elegant interface.

Runic Tags: #builder #registry #activex