System.Data.SqlClient.SNINativeMethodWrapper.SNIPacketAllocate C# (CSharp) Method

SNIPacketAllocate() static private method

static private SNIPacketAllocate ( SafeHandle pConn, IOType IOType, IntPtr &pPacket ) : void
pConn System.Runtime.InteropServices.SafeHandle
IOType IOType
pPacket IntPtr
return void
        internal static void SNIPacketAllocate(SafeHandle pConn, IOType IOType, ref IntPtr pPacket)
        {
            pPacket = SNIPacketAllocateWrapper(pConn, IOType);
        }

Usage Example

示例#1
0
 internal SNIPacket(SafeHandle sniHandle) : base(IntPtr.Zero, true)
 {
     SNINativeMethodWrapper.SNIPacketAllocate(sniHandle, SNINativeMethodWrapper.IOType.WRITE, ref base.handle);
     if (IntPtr.Zero == base.handle)
     {
         throw SQL.SNIPacketAllocationFailure();
     }
 }