ReactOS Fundraising Campaign 2012
 
€ 4,410 / € 30,000

Information | Donate

Home | Info | Community | Development | myReactOS | Contact Us

  1. Home
  2. Community
  3. Development
  4. myReactOS
  5. Fundraiser 2012

  1. Main Page
  2. Alphabetical List
  3. Data Structures
  4. Directories
  5. File List
  6. Data Fields
  7. Globals
  8. Related Pages

ReactOS Development > Doxygen

port.cpp
Go to the documentation of this file.
00001 /*
00002  * COPYRIGHT:       See COPYING in the top level directory
00003  * PROJECT:         ReactOS Kernel Streaming
00004  * FILE:            drivers/wdm/audio/backpln/portcls/port.cpp
00005  * PURPOSE:         Port construction API
00006  * PROGRAMMER:      Johannes Anderwald
00007  *                  Andrew Greenwood
00008  */
00009 
00010 #include "private.hpp"
00011 
00012 
00013 
00014 NTSTATUS
00015 NTAPI
00016 PcNewPort(
00017     OUT PPORT* OutPort,
00018     IN  REFCLSID ClassId)
00019 {
00020     NTSTATUS Status;
00021     UNICODE_STRING GuidString;
00022 
00023     DPRINT("PcNewPort entered\n");
00024 
00025     PC_ASSERT_IRQL_EQUAL(PASSIVE_LEVEL);
00026 
00027     if (!OutPort)
00028     {
00029         DPRINT("PcNewPort was supplied a NULL OutPort parameter\n");
00030         return STATUS_INVALID_PARAMETER;
00031     }
00032 
00033     if (IsEqualGUIDAligned(ClassId, CLSID_PortMidi))
00034         Status = NewPortDMus(OutPort);
00035     else if (IsEqualGUIDAligned(ClassId, CLSID_PortDMus))
00036         Status = NewPortDMus(OutPort);
00037     else if (IsEqualGUIDAligned(ClassId, CLSID_PortTopology))
00038         Status = NewPortTopology(OutPort);
00039     else if (IsEqualGUIDAligned(ClassId, CLSID_PortWaveCyclic))
00040         Status = NewPortWaveCyclic(OutPort);
00041     else if (IsEqualGUIDAligned(ClassId, CLSID_PortWavePci))
00042         Status = NewPortWavePci(OutPort);
00043     else if (IsEqualGUIDAligned(ClassId, CLSID_PortWaveRT))
00044         Status = NewPortWaveRT(OutPort);
00045     else
00046     {
00047 
00048         if (RtlStringFromGUID(ClassId, &GuidString) == STATUS_SUCCESS)
00049         {
00050             DPRINT("unknown interface %S\n", GuidString.Buffer);
00051             RtlFreeUnicodeString(&GuidString);
00052         }
00053 
00054         Status = STATUS_NOT_SUPPORTED;
00055         return Status;
00056      }
00057     DPRINT("PcNewPort Status %lx\n", Status);
00058 
00059     return Status;
00060 }

Generated on Sun May 27 2012 04:28:35 for ReactOS by doxygen 1.7.6.1

ReactOS is a registered trademark or a trademark of ReactOS Foundation in the United States and other countries.