AllocNativeInitParams() private method

private AllocNativeInitParams ( IntPtr aCallbackPtr ) : IntPtr
aCallbackPtr System.IntPtr
return System.IntPtr
コード例 #1
0
ファイル: OhNet.cs プロジェクト: broonie/ohNet
        private void Initialise(InitParams aParams)
        {
            iLogOutput                     = aParams.LogOutput;
            iFatalErrorHandler             = aParams.FatalErrorHandler;
            iAsyncBeginHandler             = aParams.AsyncBeginHandler;
            iAsyncEndHandler               = aParams.AsyncEndHandler;
            iAsyncErrorHandler             = aParams.AsyncErrorHandler;
            iSubnetListChangedListener     = aParams.SubnetListChangedListener;
            iSubnetAddedListener           = aParams.SubnetAddedListener;
            iSubnetRemovedListener         = aParams.SubnetRemovedListener;
            iNetworkAdapterChangedListener = aParams.NetworkAdapterChangedListener;
            IntPtr nativeInitParams = aParams.AllocNativeInitParams(IntPtr.Zero);

            OhNetInitParamsSetFreeExternalCallback(nativeInitParams, FreeMemory);
            if (0 != OhNetLibraryInitialise(nativeInitParams))
            {
                InitParams.FreeNativeInitParams(nativeInitParams);
                throw new LibraryException();
            }
        }
コード例 #2
0
ファイル: OhNet.cs プロジェクト: chinshou/ohNet
 private void Initialise(InitParams aParams)
 {
     iLogOutput = aParams.LogOutput;
     iFatalErrorHandler = aParams.FatalErrorHandler;
     iAsyncBeginHandler = aParams.AsyncBeginHandler;
     iAsyncEndHandler = aParams.AsyncEndHandler;
     iAsyncErrorHandler = aParams.AsyncErrorHandler;
     iSubnetListChangedListener = aParams.SubnetListChangedListener;
     iSubnetAddedListener = aParams.SubnetAddedListener;
     iSubnetRemovedListener = aParams.SubnetRemovedListener;
     iNetworkAdapterChangedListener = aParams.NetworkAdapterChangedListener;
     IntPtr nativeInitParams = aParams.AllocNativeInitParams(IntPtr.Zero);
     OhNetInitParamsSetFreeExternalCallback(nativeInitParams, FreeMemory);
     if (0 != OhNetLibraryInitialise(nativeInitParams))
     {
         InitParams.FreeNativeInitParams(nativeInitParams);
         throw new LibraryException();
     }
 }
コード例 #3
0
ファイル: OhNet.cs プロジェクト: hacx/ohNet
 private void Initialise(InitParams aParams)
 {
     IntPtr nativeInitParams = aParams.AllocNativeInitParams(IntPtr.Zero);
     iCallbackFreeMemory = new CallbackFreeMemory(FreeMemory);
     OhNetInitParamsSetFreeExternalCallback(nativeInitParams, iCallbackFreeMemory);
     if (0 != OhNetLibraryInitialise(nativeInitParams))
     {
         InitParams.FreeNativeInitParams(nativeInitParams);
         throw new LibraryException();
     }
 }