UUID fixes
Mark G. Adams
mgadams at sympatico.ca
Sat Jan 5 15:18:13 CST 2002
This patch fixes two problems with current UUID support, and adds a new
function from Windows 2000.
1) UuidCreate() determines the machine's ethernet hardware (MAC) address, and
saves it in an array. It then sets a static local variable stating that the
address has been found. However, since the array wasn't also declared static,
it contained garbage on all subsequent calls. Thus, the final part of the
UUID (which some programs use to get HW ID) was changing every call while it
should be constant. That array's now static.
2) UuidToStringA() was adding {}'s around the UUID. That does not match its
behaviour on Windows, and confuses programs which try to parse it. The braces
have been removed.
3) Windows 2000 added a new function called UuidCreateSequential(), which
behaves exactly like UuidCreate() on earlier OS's. This is because on Windows
2000 (and later?), UuidCreate() is no longer supposed to use the MAC address.
Since ours does, UuidCreateSequential() just calls UuidCreate().
//Mark
ChangeLog:
* dlls/rpcrt4/rpcrt4.spec, dlls/rpcrt4/rpcrt4_main.c:
Mark G. Adams <mgadams at sympatico.ca>
Fix UuidCreate() to not forget MAC address.
Remove {}'s from UuidToStringA() output.
Add UuidCreateSequential() function from Windows 2000.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: uuid.diff
Type: text/x-diff
Size: 2131 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-patches/attachments/20020105/82d1bc0d/uuid.bin
More information about the wine-patches
mailing list