MODULE('WinScard.lib')
SCardEstablishContext(LONG dwScope, LONG pvReserved1, LONG pvReserved2, *LONG phContext), LONG, PASCAL, NAME('SCardEstablishContextA')
SCardListReaders(LONG hContext, LONG mszGroups, *CSTRING mszReaders,
*LONG pcchReaders), LONG, PASCAL, NAME('SCardListReadersA')
SCardReleaseContext(LONG hContext), LONG, PASCAL, NAME('SCardReleaseContext')
END
IF SCardEstablishContext(SCARD_SCOPE_USER, NULL, NULL, hSC) = 0
MESSAGE('Context established successfully: ’ & hSC)
ELSE
MESSAGE(‘Failed to establish context’)
END
hi rudy,
yes i modified the above code further:
SCardEstablishContext(LONG, LONG, LONG, *ULONG), LONG, PASCAL, RAW, NAME(‘SCardEstablishContext’)
and then replace null with zero…the compiler works. but when i run the code, i get the error -2146435055.
the reader automatically detected by the pc as Generic EMV SmartCard Reader 0
Where you have *long in the prototype, these could be pointers to another pointer address, so it might be best to fire up the debugger and trace the addresses in memory to see what they eventually point to.