2 * Copyright 1997 Bruce Milner
3 * Copyright 1998 Andreas Mohr
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either
8 * version 2.1 of the License, or (at your option) any later version.
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Lesser General Public License for more details.
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this library; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
31 #include "wine/debug.h"
33 WINE_DEFAULT_DEBUG_CHANNEL(aspi
);
36 /*******************************************************************
37 * GetASPI32SupportInfo [WNASPI32.1]
39 * Checks if the ASPI subsystem is initialized correctly.
43 * HIBYTE of LOWORD: status (SS_COMP or SS_FAILED_INIT)
44 * LOBYTE of LOWORD: # of host adapters.
46 DWORD __cdecl
GetASPI32SupportInfo(void)
48 DWORD controllers
= ASPI_GetNumControllers();
51 return SS_NO_ADAPTERS
<< 8;
52 return (SS_COMP
<< 8) | controllers
;
55 /***********************************************************************
56 * SendASPI32Command (WNASPI32.2)
58 DWORD __cdecl
SendASPI32Command(LPSRB lpSRB
)
60 FIXME( "no longer supported, should be ported to DeviceIoControl\n" );
61 return SS_INVALID_SRB
;
65 /***********************************************************************
66 * GetASPI32DLLVersion (WNASPI32.4)
68 DWORD __cdecl
GetASPI32DLLVersion(void)
70 FIXME("Please add SCSI support for your operating system, returning 0\n");
74 /***********************************************************************
75 * GetASPI32Buffer (WNASPI32.8)
76 * Supposed to return a DMA capable large SCSI buffer.
77 * Our implementation does not use those at all, all buffer stuff is
78 * done in the kernel SG device layer. So we just heapalloc the buffer.
80 BOOL __cdecl
GetASPI32Buffer(PASPI32BUFF pab
)
82 pab
->AB_BufPointer
= HeapAlloc(GetProcessHeap(),
83 pab
->AB_ZeroFill
?HEAP_ZERO_MEMORY
:0,
86 if (!pab
->AB_BufPointer
) return FALSE
;
90 /***********************************************************************
91 * FreeASPI32Buffer (WNASPI32.14)
93 BOOL __cdecl
FreeASPI32Buffer(PASPI32BUFF pab
)
95 HeapFree(GetProcessHeap(),0,pab
->AB_BufPointer
);
99 /***********************************************************************
100 * TranslateASPI32Address (WNASPI32.7)
102 BOOL __cdecl
TranslateASPI32Address(LPDWORD pdwPath
, LPDWORD pdwDEVNODE
)
104 FIXME("(%p, %p), stub !\n", pdwPath
, pdwDEVNODE
);