title: vb6 : How to include defined .dll while connecting to smart card
body: <p>i have this sample code from smart card reader provider.</p>
  
  <pre><code>retCode = SCardConnect(hContext, _
                      cbReader.Text, _
                      SCARD_SHARE_EXCLUSIVE, _
                      SCARD_PROTOCOL_T0 Or SCARD_PROTOCOL_T1, _
                      hCard, _
                      Protocol)
  </code></pre>
  
  <p>What it does is connecting to smartcard.The function of SCardConnect is declared like this :</p>
  
  <pre><code>Public Declare Function SCardConnect Lib "Winscard.dll" Alias "SCardConnectA" (ByVal hContext As Long, _
                                                                             ByVal szReaderName As String, _
                                                                             ByVal dwShareMode As Long, _
                                                                             ByVal dwPrefProtocol As Long, _
                                                                             ByRef hCard As Long, _
                                                                             ByRef ActiveProtocol As Long) As Long
  </code></pre>
  
  <p>And i have another function of .dll in which i want it to be included while connecting to smart card.</p>
  
  <pre><code>Declare Function MineKad Lib "mineKad.dll" (ByVal field As Long, ByVal buffer As Any, resultLength As Long) As Long
  </code></pre>
  
  <p>I try this : </p>
  
  <pre><code>retCode = SCardConnect(MineKad, _
                      hContext, _
                      cbReader.Text, _
                      SCARD_SHARE_EXCLUSIVE, _
                      SCARD_PROTOCOL_T0 Or SCARD_PROTOCOL_T1, _
                      hCard, _
                      Protocol)
  </code></pre>
  
  <p>But fail...
  So how do i connect MineKad while connecting to smart card...MineKad is SDK that i need it to be included in order to read a card that inserted.</p>