1.: You should declare your function in your dll with declspec like this:
__declspec (dllexport) int initjava(LPCTSTR jvmpath, LPCTSTR classpath, LPCTSTR classname);
2.: You have to write a .decls file:
blitzjava.decls:
.lib "blitzjava.dll"
initjava%(jvmpath$, classpath$, classname$)
place this file in your userlibs directory (default c:\Program Files\Blitz3d\userlibs)
3. restart Blitz3d editor and call your function with:
result%=initjava("path", "classpath","classname")
As you see, you declare function prototypes in the decls file with " functionname[returntype%/$/#](params[%/$/#])"
If you want to return a string or other sort of array/buffer you should use blitz-buffers.
E.g.:
.c:
__declspec (dllexport) void convertName(char*buffer,int size);
.decls:
convertName(bank,bankSize)
Blitz:
bankSize=128
bank=CreateBank(bankSize)
Poke...(bank)
convertName(bank,bankSize)
Peek...(bank)
P.S. not doing this a long time. if your computer explodes, it's not my fault. I warned you *g*
__declspec (dllexport) int initjava(LPCTSTR jvmpath, LPCTSTR classpath, LPCTSTR classname);
2.: You have to write a .decls file:
blitzjava.decls:
.lib "blitzjava.dll"
initjava%(jvmpath$, classpath$, classname$)
place this file in your userlibs directory (default c:\Program Files\Blitz3d\userlibs)
3. restart Blitz3d editor and call your function with:
result%=initjava("path", "classpath","classname")
As you see, you declare function prototypes in the decls file with " functionname[returntype%/$/#](params[%/$/#])"
If you want to return a string or other sort of array/buffer you should use blitz-buffers.
E.g.:
.c:
__declspec (dllexport) void convertName(char*buffer,int size);
.decls:
convertName(bank,bankSize)
Blitz:
bankSize=128
bank=CreateBank(bankSize)
Poke...(bank)
convertName(bank,bankSize)
Peek...(bank)
P.S. not doing this a long time. if your computer explodes, it's not my fault. I warned you *g*