The simplified version (as per the example) would look like this:
LSockAddrIPv6.sin6_scope_id = 4;
Because the index of the interface in question is 4.
I've been working on some "home grown" (i.e. not Indy) code that includes retrieving the local addresses and interface indexes so that they can be used for this kind of thing (amongst others).
The purpose is to have a reliable, functional means of advertising that works on all platforms, using IPv4, IPv6 and works on IPv6 only networks. I've diverged from Indy because I was having to jump through too many hoops in order to make it all work, and to simplify everything.
I plan on publishing the code when it is complete.