ID:264893
 
Code:
mob/verb/Test()
world << usr << call("getSystem2.dll","returnSomething")()


C++ Code
extern "C" __declspec(dllexport) int returnSomething()
{
return 1;
}

Problem description: Well, i'm still somewhat noob with this... >_< It doesn't return anything o.O

Yeah the reference, it explains what the declaration in your DLL needs to be to be used by BYOND.
In response to Stephen001
Oh! I see. Thank you.

By the way, is there any possibility to make a customized Networking System (Multiplayer) with DLL calls? :P
In response to Ocean King
You could communicate between BYOND worlds with DLLs okay,to communicate to clients you'd need them to run a separate process on their PC to DreamSeeker though, as clients can't call DLLs in BYOND.
In response to Stephen001
I see. This is interesant. :P

I know how to do this, but it will open? I Mean, making a Window Popsup (from the DLL). It's possible? :P
In response to Ocean King
On the server you could, if you wanted.
In response to Stephen001
Yes, you can create windows with at least the Win32 or Windows API. However, it can get glitchy and may want to create it in a seperate thread (as simply closing that window will close Dream Seeker as well).
In response to Bandock
Well, i we're trying assembly too, but doesn't seems to work, doesn't return anything. Any idea?
In response to Ocean King
You were trying assembly to do what?
What doesn't work?

If you're trying to return a number, you can't return it directly.
The function in C must be something like:
extern "C" __declspec(dllexport) char *YourFunction(int n, char *v[])
{
code goes here ...
}
or it won't work. Since that returns a char*, you need to return a char*, ie a C string.
In response to Ocean King
Ocean King wrote:
Well, i we're trying assembly too, but doesn't seems to work, doesn't return anything. Any idea?

Anything not working in assembly is never assembly's fault. Assembly itself can do anything at all possible to do with the computer - no exceptions. BUT you still have to abide by any restrictions placed on it by the environment you are using it in. For BYOND this means you still have to have a DLL in the correct format that accepts strings and returns strings. You can still use assembly for this as long as the resultant format is like that. Even if you don't use C you can still get a function with the same signature.
(edit)
For example, try checking the resulting assembly from compiling a correct C DLL to see an example of an assembly program that will work. If you are using GCC for your C you can have it compile only to assembly for you to examine by supplying the -s argument.