Author: jgardou Date: Sun Dec 22 15:26:17 2013 New Revision: 61331
URL: http://svn.reactos.org/svn/reactos?rev=61331&view=rev Log: [CMIPCI] - Use correct calling convention for some callbacks - Actually use DriverEntry as entry point CORE-7094 CORE-7668 #Comment Please retest after r61331
Modified: trunk/reactos/drivers/wdm/audio/drivers/CMIDriver/CMakeLists.txt trunk/reactos/drivers/wdm/audio/drivers/CMIDriver/adapter.cpp trunk/reactos/drivers/wdm/audio/drivers/CMIDriver/adapter.hpp
Modified: trunk/reactos/drivers/wdm/audio/drivers/CMIDriver/CMakeLists.txt URL: http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/wdm/audio/drivers/C... ============================================================================== --- trunk/reactos/drivers/wdm/audio/drivers/CMIDriver/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/drivers/wdm/audio/drivers/CMIDriver/CMakeLists.txt [iso-8859-1] Sun Dec 22 15:26:17 2013 @@ -20,7 +20,7 @@
target_link_libraries(cmipci stdunk libcntpr)
-set_module_type(cmipci wdmdriver UNICODE ENTRYPOINT 0) +set_module_type(cmipci wdmdriver UNICODE)
add_importlibs(cmipci portcls hal ntoskrnl)
Modified: trunk/reactos/drivers/wdm/audio/drivers/CMIDriver/adapter.cpp URL: http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/wdm/audio/drivers/C... ============================================================================== --- trunk/reactos/drivers/wdm/audio/drivers/CMIDriver/adapter.cpp [iso-8859-1] (original) +++ trunk/reactos/drivers/wdm/audio/drivers/CMIDriver/adapter.cpp [iso-8859-1] Sun Dec 22 15:26:17 2013 @@ -33,7 +33,9 @@ #pragma code_seg("PAGE") #endif
-NTSTATUS InstallSubdevice(PDEVICE_OBJECT DeviceObject, PIRP Irp, PWCHAR Name, REFGUID PortClassId, REFGUID MiniportClassId, PFNCREATEINSTANCE MiniportCreate, PUNKNOWN UnknownAdapter, PRESOURCELIST ResourceList, REFGUID PortInterfaceId, PUNKNOWN* OutPortUnknown) +static +NTSTATUS +InstallSubdevice(PDEVICE_OBJECT DeviceObject, PIRP Irp, PWCHAR Name, REFGUID PortClassId, REFGUID MiniportClassId, PFNCREATEINSTANCE MiniportCreate, PUNKNOWN UnknownAdapter, PRESOURCELIST ResourceList, REFGUID PortInterfaceId, PUNKNOWN* OutPortUnknown) { PAGED_CODE(); DBGPRINT(("InstallSubdevice()")); @@ -76,8 +78,9 @@ return ntStatus; }
- -NTSTATUS ProcessResources(PRESOURCELIST ResourceList, PRESOURCELIST* UartResourceList) +static +NTSTATUS +ProcessResources(PRESOURCELIST ResourceList, PRESOURCELIST* UartResourceList) { PAGED_CODE(); ASSERT(ResourceList); @@ -107,7 +110,9 @@ }
-NTSTATUS StartDevice(PDEVICE_OBJECT DeviceObject, PIRP Irp, PRESOURCELIST ResourceList) +NTSTATUS +NTAPI +StartDevice(PDEVICE_OBJECT DeviceObject, PIRP Irp, PRESOURCELIST ResourceList) { PAGED_CODE(); ASSERT(DeviceObject); @@ -256,10 +261,12 @@ PAGED_CODE(); DBGPRINT(("AddDevice()"));
- return PcAddAdapterDevice(DriverObject, PhysicalDeviceObject, (PCPFNSTARTDEVICE)StartDevice, MAX_MINIPORTS, 0); -} - -bool CopyResourceDescriptor(PIO_RESOURCE_DESCRIPTOR pInResDescriptor, PIO_RESOURCE_DESCRIPTOR pOutResDescriptor) + return PcAddAdapterDevice(DriverObject, PhysicalDeviceObject, StartDevice, MAX_MINIPORTS, 0); +} + +static +bool +CopyResourceDescriptor(PIO_RESOURCE_DESCRIPTOR pInResDescriptor, PIO_RESOURCE_DESCRIPTOR pOutResDescriptor) { PAGED_CODE(); ASSERT(pInResDescriptor); @@ -302,7 +309,7 @@ #endif }
-extern "C" NTSTATUS AdapterDispatchPnp(PDEVICE_OBJECT pDeviceObject, PIRP pIrp) +extern "C" NTSTATUS NTAPI AdapterDispatchPnp(PDEVICE_OBJECT pDeviceObject, PIRP pIrp) { PAGED_CODE(); ASSERT(pDeviceObject); @@ -390,7 +397,10 @@ return ntStatus; }
-extern "C" NTSTATUS DriverEntry(PDRIVER_OBJECT DriverObject, PUNICODE_STRING RegistryPathName) +extern "C" +NTSTATUS +NTAPI +DriverEntry(PDRIVER_OBJECT DriverObject, PUNICODE_STRING RegistryPathName) { PAGED_CODE(); DBGPRINT(("DriverEntry()"));
Modified: trunk/reactos/drivers/wdm/audio/drivers/CMIDriver/adapter.hpp URL: http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/wdm/audio/drivers/C... ============================================================================== --- trunk/reactos/drivers/wdm/audio/drivers/CMIDriver/adapter.hpp [iso-8859-1] (original) +++ trunk/reactos/drivers/wdm/audio/drivers/CMIDriver/adapter.hpp [iso-8859-1] Sun Dec 22 15:26:17 2013 @@ -62,7 +62,7 @@ IN POOL_TYPE PoolType );
-extern "C" NTSTATUS AdapterDispatchPnp +extern "C" NTSTATUS NTAPI AdapterDispatchPnp ( IN PDEVICE_OBJECT pDeviceObject, IN PIRP pIrp