title: Initialise a GUID variable: How?
body: <p>I am attempting to initialise a <a href="http://msdn.microsoft.com/en-us/library/windows/desktop/aa373931%28v=vs.85%29.aspx" rel="noreferrer">GUID</a> variable but I not sure this is how you are meant to do it. What I am especially confused about is how to store the last 12 hexadecimal digits in the char array(do I include the "-" character?)</p>
  
  <p><strong>How do I define/initialise a GUID variable?</strong></p>
  
  <pre><code>bool TVManager::isMonitorDevice(GUID id)
  {
      // Class GUID for a Monitor is: {4d36e96e-e325-11ce-bfc1-08002be10318}
  
      GUID monitorClassGuid;
      char* a                = "bfc1-08002be10318"; // do I store the "-" character?
      monitorClassGuid.Data1 = 0x4d36e96e;
      monitorClassGuid.Data2 = 0xe325;
      monitorClassGuid.Data3 = 0x11ce;
      monitorClassGuid.Data4 = a;
  
      return (bool(id == monitorClassGuid));
  }
  </code></pre>