Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
emv-cardreader-sec
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Bob Hart
emv-cardreader-sec
Commits
8e232c50
Commit
8e232c50
authored
12 years ago
by
U-LSDSRV\Administrator
Browse files
Options
Downloads
Patches
Plain Diff
CardNative: Import winscard instead of winscard.dll for better interop
parent
9c89f6c0
Branches
master
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Cardreader-Security/CardNative.cs
+11
-11
11 additions, 11 deletions
Cardreader-Security/CardNative.cs
with
11 additions
and
11 deletions
Cardreader-Security/CardNative.cs
+
11
−
11
View file @
8e232c50
...
...
@@ -93,7 +93,7 @@ namespace GemCard
/// <param name="rgReaderStates"></param>
/// <param name="cReaders"></param>
/// <returns></returns>
[
DllImport
(
"winscard
.dll
"
,
SetLastError
=
true
)]
[
DllImport
(
"winscard"
,
SetLastError
=
true
)]
internal
static
extern
int
SCardGetStatusChange
(
IntPtr
hContext
,
UInt32
dwTimeout
,
[
In
,
Out
]
SCard_ReaderState
[]
rgReaderStates
,
...
...
@@ -107,7 +107,7 @@ namespace GemCard
/// <param name="mszReaders"></param>
/// <param name="pcchGroups"></param>
/// <returns></returns>
[
DllImport
(
"winscard
.dll
"
,
SetLastError
=
true
)]
[
DllImport
(
"winscard"
,
SetLastError
=
true
)]
internal
static
extern
int
SCardListReaders
(
IntPtr
hContext
,
[
MarshalAs
(
UnmanagedType
.
LPTStr
)]
string
mszGroups
,
IntPtr
mszReaders
,
...
...
@@ -120,7 +120,7 @@ namespace GemCard
/// <param name="mszGroups"></param>
/// <param name="pcchReaders"></param>
/// <returns></returns>
[
DllImport
(
"winscard
.dll
"
,
SetLastError
=
true
)]
[
DllImport
(
"winscard"
,
SetLastError
=
true
)]
internal
static
extern
int
SCardListReaderGroups
(
IntPtr
hContext
,
IntPtr
mszGroups
,
out
UInt32
pcchReaders
);
...
...
@@ -133,7 +133,7 @@ namespace GemCard
/// <param name="pvReserved2"></param>
/// <param name="phContext"></param>
/// <returns></returns>
[
DllImport
(
"winscard
.dll
"
,
SetLastError
=
true
)]
[
DllImport
(
"winscard"
,
SetLastError
=
true
)]
internal
static
extern
int
SCardEstablishContext
(
UInt32
dwScope
,
IntPtr
pvReserved1
,
IntPtr
pvReserved2
,
...
...
@@ -144,7 +144,7 @@ namespace GemCard
/// </summary>
/// <param name="hContext"></param>
/// <returns></returns>
[
DllImport
(
"winscard
.dll
"
,
SetLastError
=
true
)]
[
DllImport
(
"winscard"
,
SetLastError
=
true
)]
internal
static
extern
int
SCardReleaseContext
(
IntPtr
hContext
);
/// <summary>
...
...
@@ -157,7 +157,7 @@ namespace GemCard
/// <param name="phCard"></param>
/// <param name="pdwActiveProtocol"></param>
/// <returns></returns>
[
DllImport
(
"winscard
.dll
"
,
SetLastError
=
true
,
CharSet
=
CharSet
.
Auto
)]
[
DllImport
(
"winscard"
,
SetLastError
=
true
,
CharSet
=
CharSet
.
Auto
)]
internal
static
extern
int
SCardConnect
(
IntPtr
hContext
,
[
MarshalAs
(
UnmanagedType
.
LPTStr
)]
string
szReader
,
UInt32
dwShareMode
,
...
...
@@ -171,7 +171,7 @@ namespace GemCard
/// <param name="hCard"></param>
/// <param name="dwDisposition"></param>
/// <returns></returns>
[
DllImport
(
"winscard
.dll
"
,
SetLastError
=
true
)]
[
DllImport
(
"winscard"
,
SetLastError
=
true
)]
internal
static
extern
int
SCardDisconnect
(
IntPtr
hCard
,
UInt32
dwDisposition
);
...
...
@@ -186,7 +186,7 @@ namespace GemCard
/// <param name="pbRecvBuffer"></param>
/// <param name="pcbRecvLength"></param>
/// <returns></returns>
[
DllImport
(
"winscard
.dll
"
,
SetLastError
=
true
)]
[
DllImport
(
"winscard"
,
SetLastError
=
true
)]
internal
static
extern
int
SCardTransmit
(
IntPtr
hCard
,
[
In
]
ref
SCard_IO_Request
pioSendPci
,
byte
[]
pbSendBuffer
,
...
...
@@ -201,7 +201,7 @@ namespace GemCard
/// </summary>
/// <param name="hContext"></param>
/// <returns></returns>
[
DllImport
(
"winscard
.dll
"
,
SetLastError
=
true
)]
[
DllImport
(
"winscard"
,
SetLastError
=
true
)]
internal
static
extern
int
SCardBeginTransaction
(
IntPtr
hContext
);
/// <summary>
...
...
@@ -209,10 +209,10 @@ namespace GemCard
/// </summary>
/// <param name="hContext"></param>
/// <returns></returns>
[
DllImport
(
"winscard
.dll
"
,
SetLastError
=
true
)]
[
DllImport
(
"winscard"
,
SetLastError
=
true
)]
internal
static
extern
int
SCardEndTransaction
(
IntPtr
hContext
,
UInt32
dwDisposition
);
[
DllImport
(
"winscard
.dll
"
,
SetLastError
=
true
)]
[
DllImport
(
"winscard"
,
SetLastError
=
true
)]
internal
static
extern
int
SCardGetAttrib
(
IntPtr
hCard
,
UInt32
dwAttribId
,
[
Out
]
byte
[]
pbAttr
,
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment