Currently I am trying to write down dll code.
I couldn't find any example on this topic.
anyone can provide to me an example?
Thanks
Request : dll example
- TJ
- Posts: 7752
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1034 times
- Been thanked: 2228 times
what do you want to use to write the DLL?
what would you like a DLL to do for you?
are you a programmer? or taken a course on programming? or writing DLL?
.
what would you like a DLL to do for you?
are you a programmer? or taken a course on programming? or writing DLL?
.
Last edited by TJ on 24 Oct 2009, edited 3 times in total.
To make my own strategy
I need to calculate my own logic which can not be performed under the EL.
By calling dll, I want to get the result from my dlll module.
What I need is, sample source code which includes EL & dll source code.
By calling dll, I want to get the result from my dlll module.
What I need is, sample source code which includes EL & dll source code.
My compiler is VC++ 6.0
If you can show some example, it will be greately helpful to me.
Thanks wegi
Thanks wegi
Sorry for my late answere, here is an example...
New -> Projekt -> win32 dynamic Link Library
SampleCode for the Funktion:
The Function returns an ascii charater by an given integer value.
If you need a tab to print it in a file, call the function with value 9.
Create a DEF File to declare the functions exported
Easylanguage Code:
New -> Projekt -> win32 dynamic Link Library
SampleCode for the Funktion:
The Function returns an ascii charater by an given integer value.
If you need a tab to print it in a file, call the function with value 9.
Code: Select all
extern "C" LPCSTR __declspec( dllexport ) __stdcall intToAsc(int v)
{
try{
char buffer [255];
sprintf (buffer,"%c", v);
return buffer;
}
catch(...){
LPCSTR sValue = "ERR EXCEPTION";
return sValue;
}
}
Code: Select all
EXPORTS intToAsc
Easylanguage Code:
Code: Select all
vars: tab("");
DefineDLLFunc: "dlltest.dll", lpstr, "intToAsc", int;
if tab = "" then tab = intToAsc(9);