Hi,
Thanks for the response.
I have created the my sample dll in following way but I couldn't add
this new sample dll to my C# project..
1. opened eVC4, file|new|WCE Dynamic-Link Library
2. selected "An empty Windows CE DLL"
3. added "mydll.c" file to source files and added following code
#include<windows.h>
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
#include"mydll.h"
void hello()
{
printf("Hello DLL World\n");
}
4. then added "mydll.h" and added
ifdef __cplusplus
#define cppfudge "C"
#else
#define cppfudge
#endif
#ifdef BUILD_DLL
// the dll exports
#define EXPORT __declspec(dllexport)
#else
// the exe imports
#define EXPORT extern cppfudge __declspec(dllimport)
#endif
__declspec(dllexport) void hello();
5. Then add mydll.def file and added
LIBRARY mydll
EXPORTS
hello
then I compiled and built it. It's fine and compiled properly.
But when I added this "mydll.dll" to my C# smart device applications
it was complaining that this is not an .NET assembly. what was wrong.
Now, is my process is correct? or did I forget anything?
is there any better process of writing DLLs using 'C' and eVC4.
please let me know.
Cheers,
Naveen.