lineInitializeEx (coredll)
Last changed: -92.55.88.24

.
Summary
Initializes the application's use of TAPI and returns the number of line devices available to the application.

C# Signature:

[DllImport("coreDll.dll")]
public static extern uint lineInitializeEx(out IntPtr lpm_hLineApp, IntPtr hInstance, IntPtr lpfnCallback, string lpszFriendlyAppName, out int lpdwNumDevs, ref int lpdwAPIVersion, ref LINEINITIALIZEEXPARAMS lpLineInitializeExParams);

User-Defined Types:

[StructLayout(LayoutKind.Sequential)]
struct LINEINITIALIZEEXPARAMS
{
     public uint dwTotalSize;
     public uint dwNeededSize;
     public uint dwUsedSize;
     public uint dwOptions;
     public IntPtr hEvent;
     public IntPtr hCompletionPort;
     public uint dwCompletionKey;
}

Alternative Managed API:

Do you know one? Please contribute it!

Notes:

According to MSDN, line methods return LONG, which translates to Int32 in the .NET world. The possible error results, however, go over the capacity of a 32-bit integer. The header files show them as positive, but MSDN pages suggest that they are negative, which further suggests that perhaps they are meant to overflow. Because having variables overflow on purpose isn't very .NET-like, and C++ examples show that the result of this method is often assigned to a DWORD which translates to a UInt32 in .NET, it's safe to assume that we can have uint as the return type for this pinvoke.

Tips & Tricks:

Please add some!

Sample Code:

Please add some!

Documentation