Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Connecting ISL to DLL in Windows CE

Status
Not open for further replies.

sdali66

Programmer
Aug 26, 2020
3
AE
thread693-1729735
Unable to connect ISL with custom DLL in Windows CE 3700 terminal, DLL created in C# is loading the dll but method is not invoking and getting "Undefined Function" error. Tried with C++ DLL, DLL is not loading. Can i get a sample code of dll to connect isl to achieve my requirement. My requirement is to pass the card number from ISL to DLL and in DLL validation process is done and displays the Guest details in form. I am having a trouble in connecting ISL to DLL.
 
You cannot call a C# dll on Windows CE via SIM. If you are using a full Windows version eg, XP, 7, 10 etc then you can use Unmanaged Exports (
But in CE it must in a unmanaged dll c/c++ compiled for Windows CE

In your unmanaged dll you need to export your methods like this:

Code:
_declspec(dllexport) void MyMethod(int *myParameter);

Then in the SIM you will have 

DLLLoad handle, "MyAssembly.dll"

var MyParamaterValue : N9 = 1234
DLLCALL_CDECL handle, MyMethod(MyParameterValue)

Alternatively you can just create a C# exe to run and do what you need. You can read and write to files on the disk to pass data from the SIM to the EXE and back again.
You can call an exe from SIM using the system command.

Code:
system "\cf\micros\customstuff\MyApplication.exe"

Do you want some custom SIM scripts developed. Contact me via my website
 
Thanks @CathalMF, but i already have tried what you have suggested. My C++ dll with _declspec(dllexport) is not loading (i.e. DLLLoad says, unable to load xyz.dll). I have created c++ dll in VS2008. Can you share some sample code to create a dll.
 
Sorry i dont have any c++ CE projects to hand. Been a very long time since ive done those.

You said you have built in VS2008 but have you targeted WindowsCE as the platform?

As a test you should create a c++ EXE instead and try and run that by itself on the workstation to make sure your project and compile settings are all valid for WindowsCE.

Specialist in creating custom applications for the Micros POS range: 3700, 9700, Simphony FE, Simphony. SIM Scripts, Data Exports, Simphony extension applications, API Creation and integration. If you need anything please contact me via my website
 
If i remember correctly when you create a new project you need to select "Smart Device" as the type and then you choose whether its a library or application.

Specialist in creating custom applications for the Micros POS range: 3700, 9700, Simphony FE, Simphony. SIM Scripts, Data Exports, Simphony extension applications, API Creation and integration. If you need anything please contact me via my website
 
Thanks @CathalMF, Yes, target is W-CE and smart device, Applications are working fine in w-ce when triggered from isl, but dll is not loading from isl.
 
Can you post your code from the DLL and isl

Specialist in creating custom applications for the Micros POS range: 3700, 9700, Simphony FE, Simphony. SIM Scripts, Data Exports, Simphony extension applications, API Creation and integration. If you need anything please contact me via my website
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top