andrew4582

UuidCreateSequential

Nov 10th, 2010
436
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.44 KB | None | 0 0
  1.         [DllImport("rpcrt4.dll",SetLastError = true)]
  2.         static extern int UuidCreateSequential(out Guid guid);
  3.  
  4.         static Guid UuidCreateSequential() {
  5.             const int RPC_S_OK = 0;
  6.             Guid g;
  7.             int hr = UuidCreateSequential(out g);
  8.             if(hr != RPC_S_OK)
  9.                 throw new ApplicationException
  10.                   ("UuidCreateSequential failed: " + hr);
  11.             return g;
  12.         }
Advertisement
Add Comment
Please, Sign In to add comment