Skip to content

Instantly share code, notes, and snippets.

View viewpointsa's full-sized avatar

viewpointsa

  • ViewPoint
  • Lyon - France
View GitHub Profile
s = "0e59f1d5-1fbe-11d0-8ff2-00a0d10038bc"
#DEFINE_GUID(IID_IScriptControl, 0x8b167d60, 0x8605, 0x11d0,
# 0xab, 0xcb, 0x00, 0xa0, 0xc9, 0x0f, 0xff, 0xc0);
#"0x%s, 0x%s, 0x%s, 0x%s, 0x%s, 0x%s, 0x%s, 0x%s, 0x%s, 0x%s, 0x%s" % ( s[0:8], s[9:13], s[14:18], s[19:21]
arr = [8,4,4,2,2,2,2,2,2,2,2]
print "DEFINE_GUID(IID_IXXX," + ','.join( map( lambda kv: '0x' + s.replace('-','')[ sum(arr[:kv[0]]) : sum(arr[:kv[0]]) + kv[1] ], enumerate(arr) ) ) + ");"
find . -type f | egrep '[0-9a-f]{8}-([0-9a-f]{4}-){3}[0-9a-f]{8}' | xargs rm