GetPerformanceParameters Method - intrepidcs API
C/C++ declare -
VB declare - VB.NET declare
- C# declare - Parameters - Return
Values - Remarks - C/C++ example
- VB example - VB.NET
example - C# example
This method returns values indicating the performance of the DLL and/or device.
int _stdcall icsneoGetPerformanceParameters(int hObject, int * iBufferCount, int * iBufferMax, int * iOverFlowCount, int * iReserved1, int * iReserved2,int * iReserved3,int * iReserved4,int * iReserved5)
Private Declare Function icsneoGetPerformanceParameters Lib "icsneo40.dll" (ByVal hObject As Long, ByRef iBufferCount As Long, ByRef iBufferMax As Long, ByRef iOverFlowCount As Long, ByRef iReserved1 As Long, ByRef iReserved2 As Long, ByRef iReserved3 As Long, ByRef iReserved4 As Long, ByRef iReserved5 As Long) As Long
[DllImport("icsneo40.dll")]
public static
extern int
icsneoGetPerformanceParameters(int
hObject,ref
int iBufferCount, ref
int iBufferMax,
ref int
iOverFlowCount , ref
int iReserved1,
ref int
iReserved2 , ref
int iReserved3,
ref int
iReserved4 ,ref
int iReserved5);
hObject
[in] Specifies the driver object created with the OpenPort method.
iBufferCount
[out] Specifies the driver object created with the OpenPort method.
IBufferMax
[out] Specifies the size of the buffer.
iOverFlowCount
[out] Indicates the
the number of overflows that have occurred since
the last successful OpenPort
method was called.
iReserved1
[out] Reserved. Set to 0.
iReserved2
[out] Reserved. Set to 0.
iReserved3
[out] Reserved. Set to 0.
iReserved4
[out] Reserved. Set to 0.
iReserved5
[out] Reserved. Set to 0.
This function returns the 1 when successful. 0 if otherwise.
XX.
Examples
Visual Basic Example
lResult =
icsneoGetPerformanceParameters(m_hObject, iBufferCount, iBufferMax,
iOverFlowCount, iReserved1, iReserved2, iReserved3, iReserved4, iReserved5)
If CBool(lResult) Then
txtBufferCount.Text = iBufferCount
txtBufferMax.Text = iBufferMax
txtOverFlow.Text = iOverFlowCount
End If
icsneoGetPerformanceParameters(m_hObject, &iBufferCount, &iBufferMax, &iOverFlowCount, &iReserved1, &iReserved2, &iReserved3, &iReserved4, &iReserved5);
lResult = icsneoGetPerformanceParameters(m_hObject, iBufferCount, iBufferMax, iOverFlowCount, iReserved1, iReserved2, iReserved3, iReserved4, iReserved5)
If
CBool(lResult)
Then
txtBufferCount.Text =
iBufferCount
txtBufferMax.Text = iBufferMax
txtOverflowCount.Text = iOverFlowCount
End If
C# Example
lResult =
icsNeoDll.icsneoGetPerformanceParameters(m_hObject,
ref iBufferCount,
ref iBufferMax,
ref iOverFlowCount,
ref iReserved1,
ref iReserved2,
ref iReserved3,
ref iReserved4,
ref iReserved5);
if(lResult=1)
{
txtBufferCount.Text = Convert.ToString(iBufferCount);
txtBufferMax.Text = Convert.ToString(iBufferMax);
txtOverflowCount.Text = Convert.ToString(iOverFlowCount);
}
| intrepidcs API Documentation - (C) Copyright 2000-2005 Intrepid Control Systems, Inc. (www.intrepidcs.com) |
Last Updated : Thursday, April 26, 2007 Wednesday, April 20, 2005