Win32 port

Tor Lillqvist tml at iki.fi
Sun Jun 25 14:34:49 PDT 2006


Havoc Pennington writes:
 > Is this done in a dbus-specific hash table or by the Windows API?

In the dbus code.

 > If we're keeping a dbus hash table anyway, then we could do it
 > _exactly_ like GQuark ... which would give us an integer that could
 > simply be stuffed in dbus_uid_t as it stands, without having to
 > change anything.

Bingo. Why didn't I think of that ;)

One possible reason why this might not be a good idea is if such
integer representations of SIDs need to be consistent across running
processes, or between invocations of a program? But, at least if it's
enough that the mapping is consistent and persistent until the next
reboot, one could use Windows own "quarks", GlobalAddAtom().

 > Any idea what the windows API calls involved are here so I can read the 
 > docs on those?

For systemwide persistent string->integer mapping, see
GlobalAddAtom. For string form of SIDs, see ConvertSidToStringSid and
SID.

--tml



More information about the dbus mailing list