Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Commit

Permalink
Merge pull request #128 from microsoft/iid-debug
Browse files Browse the repository at this point in the history
Debug for iid
  • Loading branch information
rylev authored Feb 20, 2020
2 parents 466e079 + 7a984bf commit 25f2e2e
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions src/sys.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,26 @@ pub struct IID {
pub data4: [u8; 8],
}

impl std::fmt::Debug for IID {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(
f,
"{:08X?}-{:04X?}-{:04X?}-{:02X?}{:02X?}-{:02X?}{:02X?}{:02X?}{:02X?}{:02X?}{:02X?}",
self.data1,
self.data2,
self.data3,
self.data4[0],
self.data4[1],
self.data4[2],
self.data4[3],
self.data4[4],
self.data4[5],
self.data4[6],
self.data4[7]
)
}
}

#[link(name = "ole32")]
extern "system" {
pub fn RegCreateKeyExA(
Expand Down

0 comments on commit 25f2e2e

Please sign in to comment.