title: OPC items not getting created in server
body: <p>I am trying to create an opc client which connects to ofs opc server.</p>
  
  <p>The code for client is below.</p>
  
  <p>This code successfully creates a group in the server but fails to create any items and gives no error.</p>
  
  <pre><code>    hr = CoCreateInstance(clsid, NULL, CLSCTX_ALL, IID_IUnknown, (LPVOID*)&amp;pUnkn);
  
      if(SUCCEEDED(hr))
      {
          hr = pUnkn-&gt;QueryInterface(IID_IOPCServer, (LPVOID*)&amp;m_pOpcServer);
          hr = pUnkn-&gt;QueryInterface(IID_IOPCBrowseServerAddressSpace,       (LPVOID*)&amp;m_pOpcBrowse);   
          hr = m_pOpcServer-&gt;QueryInterface(IID_IConnectionPointContainer, (void**)&amp;pCPC);
  
          OPCHANDLE hClientGroup = 0;
          DWORD dwUpdateRate = 0;
          hr = m_pOpcServer-&gt;AddGroup(L"Group1", true, dwUpdateRate, hClientGroup, 0,0, 0, &amp;hClientGroup, &amp;dwUpdateRate, IID_IOPCGroupStateMgt, (IUnknown**)&amp;pInterface);
  
  
          OPCITEMDEF idef[1] = {{ /*szAccessPath*/ L"",
                                  /*szItemID*/ ITEM_ID,
                                  /*bActive*/ FALSE,
                                  /*hClient*/ 1,
                                  /*dwBlobSize*/ 0,
                                  /*pBlob*/ NULL,
                                  /*vtRequestedDataType*/ VT,
                                  /*wReserved*/0
                               }};
  
          hr=0;
          hr = pInterface-&gt;QueryInterface(IID_IOPCItemMgt,  reinterpret_cast&lt;LPVOID*&gt;(&amp;ptrItMgm));
          if(SUCCEEDED(hr))
          {
              hr = ptrItMgm-&gt;AddItems(1, idef, &amp;pResults, &amp;pErrors);
          }
  </code></pre>
  
  <p>'''</p>