Click here to Skip to main content
15,916,318 members
Home / Discussions / C#
   

C#

 
GeneralRe: is C# in .Net 3.5 slower than C# in .Net 1.1 Pin
RugbyLeague10-Sep-10 5:55
RugbyLeague10-Sep-10 5:55 
GeneralRe: is C# in .Net 3.5 slower than C# in .Net 1.1 Pin
Luc Pattyn10-Sep-10 6:02
sitebuilderLuc Pattyn10-Sep-10 6:02 
Questionchar[] to string conversion Pin
Chesnokov Yuriy10-Sep-10 1:57
professionalChesnokov Yuriy10-Sep-10 1:57 
AnswerRe: char[] to string conversion Pin
Kubajzz10-Sep-10 2:04
Kubajzz10-Sep-10 2:04 
AnswerRe: char[] to string conversion Pin
OriginalGriff10-Sep-10 2:31
mveOriginalGriff10-Sep-10 2:31 
QuestionHow to call the function in cellcore.dll? Pin
whiteclouds9-Sep-10 22:52
whiteclouds9-Sep-10 22:52 
AnswerRe: How to call the function in cellcore.dll? Pin
DaveyM699-Sep-10 23:42
professionalDaveyM699-Sep-10 23:42 
GeneralRe: How to call the function in cellcore.dll? Pin
whiteclouds10-Sep-10 0:09
whiteclouds10-Sep-10 0:09 
GeneralRe: How to call the function in cellcore.dll? Pin
DaveyM6910-Sep-10 0:20
professionalDaveyM6910-Sep-10 0:20 
GeneralRe: How to call the function in cellcore.dll? Pin
Luc Pattyn10-Sep-10 1:26
sitebuilderLuc Pattyn10-Sep-10 1:26 
GeneralRe: How to call the function in cellcore.dll? Pin
DaveyM6910-Sep-10 1:41
professionalDaveyM6910-Sep-10 1:41 
GeneralRe: How to call the function in cellcore.dll? Pin
Luc Pattyn10-Sep-10 1:59
sitebuilderLuc Pattyn10-Sep-10 1:59 
GeneralRe: How to call the function in cellcore.dll? Pin
DaveyM6910-Sep-10 2:09
professionalDaveyM6910-Sep-10 2:09 
GeneralRe: How to call the function in cellcore.dll? Pin
Luc Pattyn10-Sep-10 2:17
sitebuilderLuc Pattyn10-Sep-10 2:17 
GeneralRe: How to call the function in cellcore.dll? Pin
DaveyM6910-Sep-10 2:19
professionalDaveyM6910-Sep-10 2:19 
GeneralRe: How to call the function in cellcore.dll? Pin
DaveyM6910-Sep-10 0:28
professionalDaveyM6910-Sep-10 0:28 
GeneralRe: How to call the function in cellcore.dll? Pin
whiteclouds10-Sep-10 0:33
whiteclouds10-Sep-10 0:33 
GeneralRe: How to call the function in cellcore.dll? Pin
DaveyM6911-Sep-10 22:25
professionalDaveyM6911-Sep-10 22:25 
GeneralRe: How to call the function in cellcore.dll? [modified] Pin
whiteclouds12-Sep-10 17:45
whiteclouds12-Sep-10 17:45 
GeneralRe: How to call the function in cellcore.dll? Pin
DaveyM6913-Sep-10 12:52
professionalDaveyM6913-Sep-10 12:52 
GeneralRe: How to call the function in cellcore.dll? Pin
whiteclouds13-Sep-10 15:33
whiteclouds13-Sep-10 15:33 
GeneralRe: How to call the function in cellcore.dll? Pin
DaveyM6914-Sep-10 8:25
professionalDaveyM6914-Sep-10 8:25 
GeneralRe: How to call the function in cellcore.dll? Pin
whiteclouds14-Sep-10 17:00
whiteclouds14-Sep-10 17:00 
GeneralRe: How to call the function in cellcore.dll? Pin
DaveyM6914-Sep-10 21:41
professionalDaveyM6914-Sep-10 21:41 
GeneralRe: How to call the function in cellcore.dll? Pin
whiteclouds16-Sep-10 23:53
whiteclouds16-Sep-10 23:53 
public bool OpenLine()
{
    UInt32 dwDevNum = 0;//count the devices
    UInt32 dwApiVerSion = TAPI_CURRENT_VERSION;
    LINEINITIALIZEEXPARAMS dtParams = new LINEINITIALIZEEXPARAMS();
    dtParams.dwTotalSize = (UInt32)Marshal.SizeOf(dtParams);
    dtParams.dwOptions = 1;
    IntPtr handles = new IntPtr(0);

    IntPtr hInstance = IntPtr.Zero;//new IntPtr(GetModuleHandle(new IntPtr(0)).ToInt32());
    unsafe
    {
        fixed(IntPtr *hLineApp = &m_hLineApp)
        {
            long lResult = lineInitializeEx(hLineApp, hInstance, new IntPtr(0), new IntPtr(0),
                new IntPtr(&dwDevNum), new IntPtr(&dwApiVerSion), new IntPtr(&dtParams));
            if (lResult == 0)
            {
                return true;
            }
        }
        return false;
    }
}
[StructLayout(LayoutKind.Sequential)]
private struct LINEINITIALIZEEXPARAMS
{
    public uint dwTotalSize;
    public uint dwNeededSize;
    public uint dwUsedSize;
    public uint dwOptions;
    public IntPtr hMultiUse;
    public uint dwCompletionKey;
}
[DllImport("coredll.dll", SetLastError = true)]
unsafe private static extern uint lineInitializeEx(
    IntPtr *lphLineApp,
    IntPtr hInstance,
    IntPtr pfnCallback,//lineCallbackFunc lpfnCallback,
    IntPtr FriendAppName,//StringBuilder lpszFriendlyAppName,
    IntPtr pNumDevs,//out uint lpdwNumDevs,
    IntPtr pAPIVersion,//out uint lpdwAPIVersion,
    IntPtr pLineInitializeExParams);//ref LINEINITIALIZEEXPARAMS lpLineInitializeExParams);

There is some white cloud floating on the blue sky. That's the landscape I like.

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.