Search
Module:
Directory

   Desktop Functions:

   Smart Device Functions:


Show Recent Changes
Subscribe (RSS)
Misc. Pages
Comments
FAQ
Helpful Tools
Playground
Suggested Reading
Website TODO List
Support Forum
Download Visual Studio Add-In

Terms of Use
Privacy Policy

Search Results for "IntPtr" in [All]

winscard

.

static extern int SCardBeginTransaction(IntPtr hCard);

.

error CS1502: The best overloaded method match for 'PCSC_ContactlessNet.SmartCard.SCardConnect(System.IntPtr, string, uint, uint, out int, out uint)' has some invalid arguments

.

error CS1503: Argument '5': cannot convert from 'System.IntPtr*' to 'out int'

.

  IntPtr scardcontext;     // SCARDCONTEXT

.

  IntPtr lpscardcontext;   // LPSCARDCONTEXT

.

static extern int SCardEstablishContext(uint dwScope, IntPtr pvReserved1, IntPtr pvReserved2, out IntPtr phContext);

.

Public Shared Function SCardEstablishContext(dwScope as UInteger, pvReserved1 as IntPtr,  pvReserved2 as IntPtr, <out>() phContext as IntPtr) As Integer

.

Public Shared Function SCardEstablishContext(dwScope as SCardScope, pvReserved1 as IntPtr,  pvReserved2 as IntPtr, ByRef phContext as IntPtr) As Integer

.

    IntPtr notUsed1,

.

    IntPtr notUsed2,

.

    out IntPtr phContext);

.

    static extern int SCardReleaseContext(IntPtr phContext);

.

    static extern int SCardConnect(IntPtr hContext,

.

    ref IntPtr phCard,

.

    ref IntPtr ActiveProtocol);

.

    static extern int SCardDisconnect(IntPtr hCard, int Disposition);

.

    // static extern int SCardListReaderGroups(IntPtr hContext,

.

      IntPtr hContext,

.

    // static extern int SCardFreeMemory(IntPtr hContext,

.

        IntPtr hContext = IntPtr.Zero;

.

        ret = SCardEstablishContext(2, IntPtr.Zero, IntPtr.Zero, out hContext);

.

        IntPtr phCard = IntPtr.Zero;

.

        IntPtr ActiveProtocol = IntPtr.Zero;

.

static extern int SCardFreeMemory(int hContext, IntPtr pvMem);

.

   IntPtr hCard,            // Reference value returned from SCardConnect

.

   ref IntPtr pcbAttrLen    // Length of pbAttr in bytes

.

  IntPtr hCard;    // Handle to the card

.

  IntPtr pcbAttrLen = new IntPtr(pbAttr.Length);

.

  IntPtr scardhandle;     // SCARDHANDLE

.

  IntPtr lpscardhandle;   // LPSCARDHANDLE

.

      hContext As IntPtr,

.

ret = SCardEstablishContext(SCARD_SCOPE_USER,IntPtr.Zero,IntPtr.Zero,out hContext);

.

ret = SCardListReaders(hContext,IntPtr.Zero,null,ref pcchReaders);

.

ret = SCardListReaders(hContext,IntPtr.Zero ,mszReaders, ref pcchReaders);

.

Public Shared Function SCardReleaseContext(hContext As IntPtr) As Integer

.

               IntPtr szReaderName,

.

     IntPtr hCard,

.

If you use a struct rather than a class for SCARD_IO_REQUEST, don't forget to add "ref" to the pioRecvPci parameter in the signature. Alternatively, if you don't care about the returned protocol control information, change the pioRecvPci parameter to an "IntPtr" and pass "IntPtr.Zero" in as this parameter

.

private extern static IntPtr LoadLibrary(string lpFileName);

.

private extern static void FreeLibrary(IntPtr handle) ;

.

private extern static IntPtr GetProcAddress(IntPtr handle, string

.

private static IntPtr GetPciT0()

.

IntPtr handle = LoadLibrary("Winscard.dll") ;

.

IntPtr pci = GetProcAddress(handle, "g_rgSCardT0Pci") ;

.

IntPtr SCARD_PCI_T0 = PCSC.GetPciT0();

.

    internal static extern uint SCardGetStatusChange(IntPtr hContext, UInt32 dwTimeout, [In, Out] SCARD_READERSTATE[] rgReaderStates, UInt32 cReaders);

.

    internal IntPtr pvUserData;

odbc32

.

static extern short SQLAllocConnect(IntPtr EnvironmentHandle, out IntPtr ConnectionHandle);

.

  IntPtr connectionHandle  = IntPtr.Zero;

.

static extern short SQLAllocEnv(out IntPtr EnvironmentHandle);

.

    IntPtr environmentHandle = IntPtr.Zero;

.

extern static short SQLAllocHandle(ushort HandleType, int InputHandle, out IntPtr OutputHandle);

.

Private Declare Auto Function SQLAllocHandle Lib "odbc32.dll" (ByVal HandleType As Short, ByVal InputHandle As IntPtr, ByRef OutputHandle As IntPtr) As Short

.

    private static extern short SQLAllocHandle(short hType, IntPtr inputHandle, out IntPtr outputHandle);

.

    private static extern short SQLSetEnvAttr(IntPtr henv, int attribute, IntPtr valuePtr, int strLength);

.

    private static extern short SQLFreeHandle(short hType, IntPtr handle);

.

    private static extern short SQLBrowseConnect(IntPtr hconn, StringBuilder inString,

.

        IntPtr henv = IntPtr.Zero;

.

        IntPtr hconn = IntPtr.Zero;

.

            if (SQL_SUCCESS == SQLSetEnvAttr(henv, SQL_ATTR_ODBC_VERSION, (IntPtr)SQL_OV_ODBC3, 0))

.

        if (hconn != IntPtr.Zero)

.

        if (henv != IntPtr.Zero)

.

static extern short SQLAllocStmt(IntPtr ConnectionHandle, out IntPtr StatementHandle);

.

    Private Shared Function SQLAllocStmt(ByVal connectionHandle As IntPtr, <Runtime.InteropServices.Out()> _

.

    ByRef statementHandle As IntPtr) As Short

.

TargetType, HandleRef TargetValue, int BufferLength, out IntPtr StrLen_or_Ind);

.

IntPtr, <Out> ByRef StrLen_or_Ind As IntPtr) As Short

.

            IntPtr environmentHandle = IntPtr.Zero;

.

            IntPtr dbcHandle = IntPtr.Zero;

.

            IntPtr stmtHandle = IntPtr.Zero;

.

            IntPtr temp = IntPtr.Zero;

.

            IntPtr szTableName = Marshal.AllocHGlobal(256);

.

            SQLSetEnvAttr(environmentHandle.ToInt32(), SQL_ATTR_ODBC_VERSION, new IntPtr(SQL_OV_ODBC3), 0);

.

            short retcode = SQLDriverConnect(dbcHandle, IntPtr.Zero, connectionString, 256, completedConnString, 1024, out strLength, SQL_DRIVER_COMPLETE);

.

  private static extern short SQLBrowseConnect( IntPtr handleConnection, StringBuilder connectionString, short stringLength, StringBuilder outConnection, short bufferLength, out short stringLength2Ptr );

.

        IntPtr StatementHandle,

.

        IntPtr StatementHandle,

.

    Private Function SQLConnect(ByVal hDBc As IntPtr, ByVal servername As String, ByVal serverlen As Short, _

.

static extern short SQLDataSources(IntPtr EnvironmentHandle, short Direction,

.

    IntPtr sql_env_handle = IntPtr.Zero;

.

    rc = SQLSetEnvAttr(sql_env_handle, SQL_ATTR_ODBC_VERSION, (IntPtr)SQL_OV_ODBC3, 0);

.

    if (sql_env_handle != IntPtr.Zero)

.

    Dim hEnv As IntPtr

.

public static extern short  SQLDisconnect(IntPtr ConnectionHandle);

.

    public static extern short SQLDriverConnect(IntPtr  hdbc,

.

        IntPtr    hwnd,

.

    Private Shared Function SQLDriverConnect(ByVal hdbc As IntPtr, ByVal hwnd As IntPtr, ByVal szConnStrIn As String, _

.

                string msg  = GetError(IntPtr.Zero) + "\nconnection string:\n\t" + connstr;

.

    string GetError(IntPtr stmt)

.

            connectionHandle = IntPtr.Zero;

.

            environmentHandle = IntPtr.Zero;

.

static extern short  SQLError(IntPtr EnvironmentHandle,

.

        IntPtr        ConnectionHandle,

.

        IntPtr        StatementHandle,

.

    Private Shared Function SQLExecDirect(ByVal statementHandle As IntPtr, ByVal statementText As String, _

.

  static extern short SQLFetch(IntPtr StatementHandle);

.

    Private Function SQLFetch(ByVal statementHandle As IntPtr) As Short

.

  static extern short SQLFreeConnect(IntPtr ConnectionHandle);

.

static extern short SQLFreeEnv(IntPtr EnvironmentHandle);

.

Declare Function SQLFreeEnv Lib "odbc32.dll" (ByVal Handle As IntPtr) As Short

.

static extern short SQLFreeHandle(ushort HandleType, IntPtr InputHandle);

.

Declare Function SQLFreeHandle Lib "odbc32.dll" (ByVal HandleType As Short, ByVal InputHandle As IntPtr) As Short

.

static extern short SQLFreeStmt(IntPtr StatementHandle, ushort Option);

.

    Private Shared Function SQLFreeStmt(ByVal statementhandle As IntPtr, ByVal [option] As UShort) As Short

.

    static extern short SQLGetData(IntPtr StatementHandle,

.

    Private Shared Function SQLGetData(ByVal statementHandle As IntPtr, ByVal columnNumber As UShort, _

.

    ByVal targetType As Short, ByVal targetValue As IntPtr, ByVal bufferLength As Integer, _

.

   short record, short diagIdentifier, IntPtr diagInfoPtr,

.

Declare Function SQLGetDiagRec Lib "odbc32.dll" (ByVal handleType As Short, ByVal statementHandle As IntPtr,

.

    Private Shared Function SQLMoreResults(ByVal statementHandle As IntPtr) As Short

.

    IntPtr envHandle,

.

    IntPtr attrValue,

.

    IntPtr envHandle,

.

    ByVal henv As IntPtr, _

.

    ByVal valuePtr As IntPtr, _

.

    static extern short SQLTables(IntPtr StatementHandle,

.

        statementHandle = IntPtr.Zero;

hhctrl

.

static extern IntPtr HtmlHelp(

.

        IntPtr hWndCaller,

.

        IntPtr data);

.

     ByVal hWndCaller As IntPtr, ByVal pszFile As String, _

.

     ByVal uCommand As Integer, ByVal dwData As IntPtr) As Integer

.

HtmlHelp(IntPtr.Zero, filePath, HTMLHelpCommand.HH_HELP_CONTEXT, contextID)

.

HtmlHelp(IntPtr.Zero, filePath, HTMLHelpCommand.HH_DISPLAY_TOC, 0)

.

        IntPtr hWndCaller,

.

        internal IntPtr hinst = IntPtr.Zero;

.

    HtmlHelp(IntPtr.Zero, null, HTMLHelpCommand.HH_DISPLAY_TEXT_POPUP, param);

winmm

.

static extern Int32 mciSendString(string command, StringBuilder buffer, int bufferSize, IntPtr hwndCallback);

.

Private Shared Function mciSendString(ByVal command As String, ByVal buffer As StringBuilder, ByVal bufferSize As Integer, ByVal hwndCallback As IntPtr) As Integer

.

Declare Ansi Function mciSendString Lib "winmm.dll" Alias "mciSendStringA" (ByVal command As String, ByRef buffer As StringBuilder, ByVal bufferSize As Integer, ByVal hWndCallback As IntPtr) As Integer

.

    IntPtr ptr = IntPtr.Zero;

.

    mciSendString("set CDAudio door open", returnstring,127, IntPtr.Zero);

.

static extern Int32 mciSendString(string command, string buffer, int bufferSize, IntPtr hwndCallback);

.

     mciSendString("set CDAudio door open", rt, 127, IntPtr.Zero);

.

     mciSendString("set CDAudio door closed", rt, 127, IntPtr.Zero);

.

     mciSendString("set CDAudio door open", returnstring, 127, IntPtr.Zero)

.

     mciSendString(sCommand, Nothing, 0, IntPtr.Zero)

.

static extern UInt32 midiConnect(IntPtr hMidi, IntPtr hMidiOut, IntPtr pReserved);

.

Declare Function midiConnect Lib "winmm.dll" (hMidi AS Intptr, hMidiOut AS Intptr, pReserved AS IntPtr) AS UInt32 ' LD83

.

UInt32 Connect(IntPtr midiInputHandle, IntPtr midiOutputHandle)

.

     return midiConnect(midiInputHandle, midiOutputHandle, IntPtr.Zero);

.

static extern UInt32 midiDisconnect(IntPtr hMidi, IntPtr hmo, IntPtr pReserved);

.

UInt32 Disconnect(IntPtr midiInputHandle, IntPtr midiOutputHandle)

.

     return midiDisconnect(midiInputHandle, midiOutputHandle, IntPtr.Zero);

.

    public IntPtr data;

.

    public IntPtr user;

.

    public IntPtr next;

.

    public IntPtr reserved;

.

    public IntPtr[] reservedArray;

.

    private static extern uint midiInClose(IntPtr hMidiIn);

.

Uses an IntPtr for the (opaque) midi handle

.

    private static extern MMRESULT midiInGetDevCaps(UIntPtr uDeviceID, ref MIDIINCAPS caps, uint cbMidiInCaps);

.

            midiInGetDevCaps((UIntPtr)x, ref caps, (uint)Marshal.SizeOf(typeof(MIDIINCAPS)));

.

static extern uint midiInOpen(out IntPtr lphMidiIn, uint uDeviceID, IntPtr dwCallback, IntPtr dwInstance, uint dwFlags);

.

    static extern uint midiInReset(IntPtr hMidiIn);

.

Passes the (opaque) midi handle as an IntPtr

.

private static extern uint midiInStart(IntPtr hMidiIn);

.

This is using an IntPtr for the (opaque) midi handle.

.

static extern UInt32 midiOutClose(IntPtr hMidiOut);

.

Declare Function midiOutClose Lib "winmm.dll" (ByRef phMidiOut As IntPtr) As Uinteger

.

public static extern MMRESULT midiOutGetDevCaps(UIntPtr uDeviceID, ref MIDIOUTCAPS lpMidiOutCaps, uint cbMidiOutCaps);

.

        midiOutGetDevCaps((UIntPtr) x, ref caps, (uint)Marshal.SizeOf(typeof(MIDIOUTCAPS)));

.

static extern UInt32 midiOutLongMsg(IntPtr hmo, IntPtr lpMidiOutHdr, UInt32 cbMidiOutHdr); // LD83

.

Declare Function midiOutLongMsg Lib "winmm.dll" (hmo AS Intptr, lpMidiOutHdr AS Intptr, cbMidiOutHdr AS UInt32) AS UInt32 ' Untested - LD83

.

    static extern uint midiOutOpen(out IntPtr lphMidiOut, uint uDeviceID, IntPtr dwCallback, IntPtr dwInstance, uint dwFlags);

.

    <DllImport("winmm.dll")> Shared Function midiOutOpen(ByRef lphMidiOut As IntPtr, ByVal uDeviceID As UInteger, ByVal dwCallback As IntPtr, ByVal dwInstance As IntPtr, ByVal dwFlags As UInteger) As UInteger

.

IntPtr hmidi;

.

midiOutOpen(out hmidi, 0, IntPtr.Zero, IntPtr.Zero, 0);

.

static extern UInt32 midiOutPrepareHeader(IntPtr hMidiOut, IntPtr lpMidiOutHdr, UInt32 cbMidiOutHdr); // LD83

.

Declare Function midiOutPrepareHeader Lib "winmm.dll" (hMidiOut AS Intptr, lpMidiOutHdr AS IntPtr, cbMidiOutHdr) AS UInt32 ' LD83

.

static extern uint midiOutReset(IntPtr hMidiOut); // LD83

.

static extern uint midiOutShortMsg(IntPtr hMidiOut, uint dwMsg);

.

Declare Function midiOutShortMsg Lib "winmm.dll" (hMidiOut As Intptr,dwMsg As UInt32) As UInt32

.

//hmidi is an IntPtr obtained via midiOutOpen or other means.

.

static extern UInt32 midiOutUnprepareHeader(IntPtr hMidiOut, IntPtr lpMidiOutHdr, UInt32 cbMidiOutHdr); // LD83

.

Declare Function midiOutUnprepareHeader Lib "winmm.dll" (hMidiOut AS Intptr, lpMidiOutHdr AS IntPtr, cbMidiOutHdr) AS UInt32 ' LD83

.

extern static Int32 midiStreamClose(IntPtr hMidiStream);

.

Public Declare Function midiStreamClose Lib "winmm.dll" (ByVal hMidiStream As IntPtr) As Integer

.

extern static Int32 midiStreamOpen(ref IntPtr hMidiStream, ref Int32 puDeviceID, Int32 cMidi, IntPtr dwCallback, IntPtr dwInstance, Int32 fdwOpen);

.

Public Declare Function midiStreamOpen Lib "winmm.dll" (ByVal hMidiStream As IntPtr, ByVal puDeviceId As IntPtr, ByVal cMidi As Integer, ByVal dwCallback As IntPtr, ByVal dwInstance As IntPtr, ByVal fdwOpen As Integer) As Integer

.

static extern Int32 midiStreamOut(IntPtr hMidiStream, MIDIHDR lpMidiHdr, uint cbMidiHdr);

.

Declare Function midiStreamOut Lib "winmm.dll" (ByVal hMidiStream As IntPtr, ByVal lpMidiHdr As MIDIHDR, ByVal cbMidiHdr As UInteger) As Integer

.

     IntPtr dwUser;

.

     IntPtr reserved;

.

     IntPtr dwReserved;

.

     Dim dwUser As IntPtr

.

     Dim reserved As IntPtr

.

     Dim dwReserved As IntPtr

.

static extern Int32 midiStreamPause(IntPtr hMidiStream);

.

Declare Function midiStreamPause Lib "winmm.dll" (ByVal hMidiStream As IntPtr) As Integer

.

Declare Function midiStreamPosition Lib "winmm.dll" (ByVal hms As IntPtr, ByVal pmmt As MMTIME, ByVal cbmmt As UInteger) As Integer

Cut off search results after 60. Please refine your search.


 
Access PInvoke.net directly from VS: