=== modified file 'Jokosher/PlatformUtils/Windows.py' --- Jokosher/PlatformUtils/Windows.py 2009-03-19 23:39:14 +0000 +++ Jokosher/PlatformUtils/Windows.py 2010-06-06 14:55:37 +0000 @@ -1,11 +1,18 @@ -import urllib +import ctypes, urllib def getFullName(): - #TODO: Work out how to get the fullname in windows - return "" + GetUserNameEx = ctypes.windll.secur32.GetUserNameExW + NameDisplay = 3 + + size = ctypes.pointer(ctypes.c_uint32(0)) + GetUserNameEx(NameDisplay, None, size) + + nameBuffer = ctypes.create_unicode_buffer(size.contents.value) + GetUserNameEx(NameDisplay, nameBuffer, size) + return nameBuffer.value def samefile(path1, path2): return path1 == path2