title: Using GUIDFromString requries including Shell32.dll: How do I do that
body: <p>I am attempting to use the WinAPI function <code>GUIDFromString()</code> but it requires some finagling to include it in my project. </p>
  
  <p>According to the <a href="http://msdn.microsoft.com/en-us/library/windows/desktop/bb776431%28v=vs.85%29.aspx" rel="nofollow">msdn</a> documentation:</p>
  
  <blockquote>
    <p>This function is not declared in a header or exported by name from a
    .dll file. It must be loaded from Shell32.dll as ordinal 703 for
    GUIDFromStringA and ordinal 704 for GUIDFromStringW.</p>
    
    <p>It can also be accessed from Shlwapi.dll as ordinal 269 for
    GUIDFromStringA and ordinal 270 for GUIDFromStringW.</p>
  </blockquote>
  
  <p>I have never loaded a DLL before so I am not sure what I should do and I am unsure if loading the DLL is enough, do I also have to include an 'ordinal' with the number 703? Would anyone be able to provide any advice on what I need to do to use this function and even an example?</p>
  
  <p>My attempt below does not work(I am using VC++ 2010 Express):</p>
  
  <pre><code>#pragma comment(lib, "shell32.lib") // if I am including the dll do I need to include the lib aswell?
  
  // I've heard that the dll location differs across versions of windows
  // Does anyone know of a Cross-Windows-Version way to include Shell32.dll no matter where it is? Maybe use a keyword like "%SYSTEM%/Shell32.dll"
  HINSTANCE shell32DLL = LoadLibary("C:/System/Shell32.dll"); 
  
  // Now do I include 'Ordinal 703' as described in msdn? And how do I do that?
  </code></pre>