Four Js Development Tools Forum

Discussions by product => GDC => Topic started by: Wee Ting C. on September 06, 2013, 09:17:17 pm



Title: GDC communicate with Mifare Card Desktop Reader
Post by: Wee Ting C. on September 06, 2013, 09:17:17 pm
Hi,.

I'm using GDC2.11 and GAS2.02. May I know what steps should I do for GDC to communicate with Mifare card desktop reader.

What I'm doing now is save dll in the gdc/bin directory, use ui.Interface.frontCall("MF5","MF5_Autoscan",l_param,l_return). Whenever run the frontCall command, GDC crash.

Thank you.


Title: Re: GDC communicate with Mifare Card Desktop Reader
Post by: Morgan H. on September 09, 2013, 03:18:26 am
Hi,

I think you are missing some steps here.

Please read the documentation carefully.
https://4js.com/online_documentation/fjs-gdc-manual-html/User/FEExtensions.html

You are missing steps 2 and 5.
You cannot call the DLL directly, you need to write an interface wrapper between GDC and the DLL.
The interface will pull parameters from the stack, then you can use those parameters to call your MF5 card reader DLL.
Then the results from the DLL are pushed back onto the stack.

Please look at the myDLL.h and myDLL.cpp examples, as you can use this as a template.
The section "// create the answer" would be where you would call your MF5 DLL.
Of course you need to customise the parameters passed to and returned from your front-end function.

However as a first step, try the example and get makesum() example working before making any customisations.

///M