怎样 import 这个函数
方法:
MT_RESULT MTGetAdapterInfo(const BOARD nboard,PMTADAPTER_INFO const pBoardInfo,PULONG const pLength);
参数说明:
nboard :board number
pBoardInfo :pointer to MTADAPTER_INFO structure
pLength :Set by the user application, this is a pointer to the size of the given buffer
for the MTADAPTER_INFO structure.
Structure定义说明:
MTADAPTER_INFO structure is defined as follows:
public struct MTADAPTER_INFO
{
ulong Status; // Status value of BOARD_OK, etc.
ulong BoardNumber; // Board index in SDK, i.e. SystemIndex
MT_VERSION FWVersion; // On board firmware version
ulong BaseAddress; // I/O base address
ulong Interrupt; // Interrupt number
ulong StartChannel; // Logical # of the 1st on board channel
ulong Channels; // Number of channels on the board
ulong Option1; // Basic Board option
// option 1
// bit 0 WAV
// bit 1 MVIP
// bit 2 Volume/Pitch
// bit 3 MF
// bit 4 Silence Compression
ulong Option2; // Extended Board option
// option 2
// bit 0 Caller ID
// bit 1 Conference
// bit 2 Call Logging
// bit 4 FAX
// bit 6 Pulse detection
ulong Digirate; // Digitizing rate
ulong Bandwidth; // Channel bandwidth
ulong PCISlot;
ulong PCIBusNumber;
ulong BoardType; // Board Type of DUAL_T1_PASSIVE_HI_CARD, etc.
UCHAR BusType; // MUX_H100, MUX_MVIP, or MUX_NONE
UCHAR MasterMode; // Board Master Mode of the following:
// 0 slave board
// 1 MVIP master, or H100 Master A
// 2 H100 Master B
UCHAR MasterClock; // Master clock source reference value
// of CLOCK_SOURCE_OSC, and etc.
UCHAR Sec8kNetrefClock; // MVIP Sec8K or H100 Netref clock output
// 0 Disabled, output tri-stated
// 1, 3 - 4 Type of clock reference of
// CLOCK_SOURCE_OSC, etc.
UCHAR NumSummations; // Number of summation resource on board, if any
UCHAR StartSummation; // Index of the first on board summation resource
UCHAR NumAudios; // Number of audio jack resource on board, if any
UCHAR StartAudio; // Index of the first on board audio jack resource
UCHAR TDMSignaling; // CT TDM bus signaling: 0 for u-law, 1 for A-law
UCHAR ConfigurationId; // Adapter Configuration Index (i.e. SwitchIndex)
UCHAR res[2];
MT_VERSION FWVersionExpected; // Expected on board firmware version
}
函数返回值:
MT_RET_OK No error
MT_RET_INVALID_PARAM Invalid argument passed to function
MT_RET_INVALID_BOARD Board number is out of range
MT_RET_NOT_AVAILABLE Driver is not loaded
我想知道的问题是:
1,他的返回值是自定的key值(.h中的定义之一:#define MT_RET_INVALID_PARAM 0xE0002012L),我应该用什么托管类型来与之对应?
2,他所有的自定义类型我都必须建立与之对应的托管版本么?
3,”a pointer to the size of the given buffer“ 这个buffer我应该用什么托管类型代替?
4,哪里有专题的非托管到托管类型包装的的讨论?
谢谢