Prev: decompile exe
Next: MSChart Datapointlabel.text
From: angela_q on 26 Sep 2005 01:48 i'm doin vb and smart card reader project. i.ve paste gsdkpcsc.dll on the my vb project folder also at c/windows.system32/drivers folder. i made my program but can't call the function. can u check my codes? visual basic code:-------------------------------------------------------------------------------- Private Sub cmd_read_Click() Dim nResult As Integer Dim nPort As Integer Dim sRdrName As String Dim lResult As Long nResult = OpenReader nPort = 1 sRdrName = "IRIS SCR30U 0" lResult = cardConnect(nPort, sRdrName, Len(sRdrName)) nResult = SelJPNApp() Dim MyKadName As String * 80 ' this limits it to 80 characters (may not be needed) If not, you can just use As String MyKadName = "" ' or supply your own name nResult = JPN_MyKadName(MyKadName) Text1.Text = nResult nResult = CardDisconnect() nResult = CloseReader End Sub -------------------------------------------------------------------------------- i got problem on the underline.. when run, it states.. Can't find dll entry point _JPN_MyKadName@4 in gsdkpcsc.dll
From: Robert on 26 Sep 2005 04:06 I'd say the problem lies in the Declare statement (which I couldn't find in your posting). If you have a documentation for this DLL function, maybe post it as well, otherwise it might be difficult to find the problem. Robert "angela_q" <angela_quests(a)yahoo.com> wrote in message news:1127713728.591180.146920(a)z14g2000cwz.googlegroups.com... > i'm doin vb and smart card reader project. > i.ve paste gsdkpcsc.dll on the my vb project folder also at > c/windows.system32/drivers folder. > i made my program but can't call the function. > can u check my codes? > > visual basic > code:----------------------------------------------------------------------- --------- > Private Sub cmd_read_Click() > Dim nResult As Integer > Dim nPort As Integer > Dim sRdrName As String > Dim lResult As Long > nResult = OpenReader > nPort = 1 > sRdrName = "IRIS SCR30U 0" > lResult = cardConnect(nPort, sRdrName, Len(sRdrName)) > nResult = SelJPNApp() > > Dim MyKadName As String * 80 ' this limits it to 80 characters (may not > be needed) If not, you can just use As String > MyKadName = "" ' or supply your own name > nResult = JPN_MyKadName(MyKadName) > Text1.Text = nResult > nResult = CardDisconnect() > nResult = CloseReader > End Sub > -------------------------------------------------------------------------- ------ > > i got problem on the underline.. > when run, it states.. > Can't find dll entry point _JPN_MyKadName@4 in gsdkpcsc.dll >
From: angela_q on 27 Sep 2005 03:35 this is my module declarations : Option Explicit '@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ ' General Declaration '@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ Declare Function OpenReader Lib "gsdkpcsc.dll" Alias "_OpenReader@0" _ () As Integer ' open communication session with the card reader Declare Function cardConnect Lib "gsdkpcsc.dll" Alias "_CardConnect(a)12" _ (ByVal port As Integer, ByVal Rdrname As String, ByVal nRdrLen As Integer) As Long ' open communication session with the card in the reader Declare Function CardDisconnect Lib "gsdkpcsc.dll" _ Alias "_CardDisconnect@0" _ () As Integer ' Closes communication session with the card in the reader Declare Function CloseReader Lib "gsdkpcsc.dll" Alias "_CloseReader@0" _ () As Integer ' Closes communication session with the card reader Declare Function CardDetect Lib "gsdkpcsc.dll" Alias "_CardDetect@4" _ (ByVal pcExplanation As String) As Integer ' Checks if card is in card reader Declare Function ResetCard Lib "gsdkpcsc.dll" Alias "_ResetCard@0" _ () As Long ' Reset the card Declare Function GetError Lib "gsdkpcsc.dll" Alias "_GetError@0" _ () As Integer ' returns information on last error that occured Declare Function SelJPNApp Lib "gsdkpcsc.dll" Alias "_SelJPNApp@0" _ () As Integer ' select JPN to read JPN data Declare Function SelJPJApp Lib "gsdkpcsc.dll" Alias "_SelJPJApp@0" _ () As Integer ' select JPJ to read JPJ data Declare Function SelIMMApp Lib "gsdkpcsc.dll" Alias "_SelIMMApp@0" _ () As Integer 'Select IMM to read IMM data '************************************************************************* ' JPN section '************************************************************************* Declare Function JPN_OrgName Lib "gsdkpcsc.dll" _ Alias "_JPN_OrgName@4" _ (ByVal pbOrgName As String) As Integer 'original name in 150 bytes Declare Function JPN_MyKadName Lib "gsdkpcsc.dll" _ Alias "_JPN_MyKadName@4" _ (ByVal pbMyKadName As String) As Integer ' 3 lines of name stored in blocks 0f 30+30+20=80 Declare Function JPN_KPTName Lib "gsdkpcsc.dll" _ Alias "_JPN_KPTName@4" _ (ByVal pbKPTName As String) As Integer ' KPTName is 40bytes , 2 lines of name stored in blocks of 20+20=40 Declare Function JPN_IDNum Lib "gsdkpcsc.dll" _ Alias "_JPN_IDNum@4" _ (ByVal pbIDNum As String) As Integer ' ID number in 13bytes Declare Function JPN_Gender Lib "gsdkpcsc.dll" _ Alias "_JPN_Gender@4" _ (ByVal pbGender As String) As Integer
From: angela_q on 27 Sep 2005 03:37 nResult = JPN_MyKadName(MyKadName) this is where the debug window appeared when i doing F8. the hardware connected, port opened, but couldn't gain the name in the smart card
From: Robert on 27 Sep 2005 06:48
If you are using Visual Studio, you should have a tool called "Dependency walker" installed (called "Depends" in the start menu, under Visual Studio -> Tools) Start it and open the DLL you are using (gsdkpcsc.dll) Among other things, you should now see the exact function names. See if your function declaration matches the entry you see in the dependency walker. If not, try the wording from the dependency walker. Alternatively you can also use the "ordinal" number (leftmost column) and write it like e.g. Declare Function [...] Alias "#33", where 33 would be the decimal ordinal number of the function you want. Robert "angela_q" <angela_quests(a)yahoo.com> wrote in message news:1127806527.154265.249450(a)g47g2000cwa.googlegroups.com... > this is my module declarations : > Option Explicit > > > '@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@ > ' General Declaration > '@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@ > > Declare Function OpenReader Lib "gsdkpcsc.dll" Alias "_OpenReader@0" _ > () As Integer ' open communication session with the card reader > > Declare Function cardConnect Lib "gsdkpcsc.dll" Alias "_CardConnect(a)12" > _ > (ByVal port As Integer, ByVal Rdrname As String, ByVal nRdrLen As > Integer) As Long > ' open communication session with the card in the reader > > Declare Function CardDisconnect Lib "gsdkpcsc.dll" _ > Alias "_CardDisconnect@0" _ > () As Integer > ' Closes communication session with the card in the reader > > Declare Function CloseReader Lib "gsdkpcsc.dll" Alias "_CloseReader@0" > _ > () As Integer > ' Closes communication session with the card reader > > Declare Function CardDetect Lib "gsdkpcsc.dll" Alias "_CardDetect@4" _ > (ByVal pcExplanation As String) As Integer > ' Checks if card is in card reader > > Declare Function ResetCard Lib "gsdkpcsc.dll" Alias "_ResetCard@0" _ > () As Long > ' Reset the card > > Declare Function GetError Lib "gsdkpcsc.dll" Alias "_GetError@0" _ > () As Integer > ' returns information on last error that occured > > Declare Function SelJPNApp Lib "gsdkpcsc.dll" Alias "_SelJPNApp@0" _ > () As Integer > ' select JPN to read JPN data > > Declare Function SelJPJApp Lib "gsdkpcsc.dll" Alias "_SelJPJApp@0" _ > () As Integer > ' select JPJ to read JPJ data > > Declare Function SelIMMApp Lib "gsdkpcsc.dll" Alias "_SelIMMApp@0" _ > () As Integer > 'Select IMM to read IMM data > > '************************************************************************* > ' JPN section > '************************************************************************* > > Declare Function JPN_OrgName Lib "gsdkpcsc.dll" _ > Alias "_JPN_OrgName@4" _ > (ByVal pbOrgName As String) As Integer > 'original name in 150 bytes > > Declare Function JPN_MyKadName Lib "gsdkpcsc.dll" _ > Alias "_JPN_MyKadName@4" _ > (ByVal pbMyKadName As String) As Integer > ' 3 lines of name stored in blocks 0f 30+30+20=80 > > Declare Function JPN_KPTName Lib "gsdkpcsc.dll" _ > Alias "_JPN_KPTName@4" _ > (ByVal pbKPTName As String) As Integer > ' KPTName is 40bytes , 2 lines of name stored in blocks of 20+20=40 > > Declare Function JPN_IDNum Lib "gsdkpcsc.dll" _ > Alias "_JPN_IDNum@4" _ > (ByVal pbIDNum As String) As Integer > ' ID number in 13bytes > > Declare Function JPN_Gender Lib "gsdkpcsc.dll" _ > Alias "_JPN_Gender@4" _ > (ByVal pbGender As String) As Integer > |