Our new official repo is on github
LCD Smartie version 5.6 is released!
Download it now: https://github.com/LCD-Smartie/LCDSmartie/releases
LCD Smartie version 5.6 is released!
Download it now: https://github.com/LCD-Smartie/LCDSmartie/releases
What would cause LCDSmartie to exit?
Moderators: _X7JAY7X_, caesar, IFR, mattcro, limbo
-
- Posts: 50
- Joined: February 10th, 2008, 4:27 pm
What would cause LCDSmartie to exit?
I am building a display driver and so far the initialization function is working fine. I have also implemented the cursor position function and data write function. When I run LCDSmartie with my DLL the com port opens correctly, the LCD is cleared (my init routine works), but then LCDSmartie promptly closes the com port and exits. I can run LCDSmartie again and the process repeats. Why would it close on it's own? Any ideas?
-
- Posts: 50
- Joined: February 10th, 2008, 4:27 pm
I'm still working on this issue.
Note that I'm using Visual C++ 6.0 running the compiler on Win2k. Any reason that should break LcdSmartie? I had to change the function declarations a bit to get them to compile:
Instead of:
It's not my first DLL, but I don't claim to be an expert either. There is no question that the DISPLAYDLL_Init() function is operating correctly, but then LCD Smartie promptly exits... ?? Also if I deliberately make a mistake with the startup parameters, the correct error message is displayed (and LCD Smartie does not then close).
Note that I'm using Visual C++ 6.0 running the compiler on Win2k. Any reason that should break LcdSmartie? I had to change the function declarations a bit to get them to compile:
Code: Select all
extern "C" __declspec(dllexport) char * DISPLAYDLL_Init(LCDS_BYTE size_x,LCDS_BYTE size_y,char *startup_parameters,LCDS_BOOL *ok)
Code: Select all
#define DLL_EXPORT(type) extern "C" __declspec(dllexport) type __stdcall
DLL_EXPORT(char *) DISPLAYDLL_Init(LCDS_BYTE size_x,LCDS_BYTE size_y,char *startup_parameters,LCDS_BOOL *ok)
-
- Posts: 50
- Joined: February 10th, 2008, 4:27 pm
OK, I think I got it. Definitely a problem with the calling conventions. I have a crude version working now and I'll pretty it up and upload to the plugin forum when I'm done.
This web page helped:
http://zone.ni.com/devzone/cda/tut/p/id/3056
This web page helped:
http://zone.ni.com/devzone/cda/tut/p/id/3056
-
- Posts: 50
- Joined: February 10th, 2008, 4:27 pm
Issues resolved see:
http://forums.lcdsmartie.org/viewtopic.php?t=1605
http://forums.lcdsmartie.org/viewtopic.php?t=1605