ID:141813
 
BYOND Code:
mob/verb/test()
world<<"Returns:"
world<<call("test.dll","conv")(2000)
world<<"Done returning"

DLL Code:
#include <windows.h>
BOOL WINAPI DllMain()
{
return 1;
}
extern "C" __declspec(dllexport) char conv(int z)
{
char q=char(z);
return q;
}


Problem description:
I want it to return "2000" (don't ask me why) however, in DS only "Returns:" message appers, and nothing after it. Any tips why it happens like that?
ints are not passed into your function (well they are, but I'll explain), and a char is not returned. The function definition is as such:

extern "C" __declspec(dllexport) char * function(int argc, char ** argv)

argc will tell you how many elements are in argv, just like with the main function.
In response to Stephen001 (#1)
I noticed this only after a week or so of frustrating my self. For some reason I glazed over each time I read the reference and came to that part, even though I read it (or thought I read it) about a dozen times.