[System.Security.SecurityCritical] // auto-generated
 #endif
 internal SymDocumentWriter(PunkSafeHandle pDocumentWriterSafeHandle)
 {
     m_pDocumentWriterSafeHandle = pDocumentWriterSafeHandle;
     // The handle is actually a pointer to a native ISymUnmanagedDocumentWriter.
     m_pDocWriter = (ISymUnmanagedDocumentWriter *)m_pDocumentWriterSafeHandle.DangerousGetHandle();
     m_vtable = (ISymUnmanagedDocumentWriterVTable)(Marshal.PtrToStructure(m_pDocWriter->m_unmanagedVTable, typeof(ISymUnmanagedDocumentWriterVTable)));
 }
            [System.Security.SecurityCritical] // auto-generated
            #endif
            ISymbolDocumentWriter ISymbolWriter.DefineDocument(String url,
                                                               Guid language,
                                                               Guid languageVendor,
                                                               Guid documentType)
            {
                PunkSafeHandle psymUnmanagedDocumentWriter = new PunkSafeHandle();

                int hr = m_vtable.DefineDocument(m_pWriter, url, ref language, ref languageVendor, ref documentType, out psymUnmanagedDocumentWriter);
                if (hr < 0)
                {
                    throw Marshal.GetExceptionForHR(hr);
                }
                if (psymUnmanagedDocumentWriter.IsInvalid)
                {
                    return null;
                }
                return new SymDocumentWriter(psymUnmanagedDocumentWriter);
            }