I'm trying to export a function in a C++ 6.0 DLL to call in PB.
I have an exported function(exported in a .def file) in C++(DLL name "testlib.dll"):
char* MyFunc()
{
char *szText = "b1b7a3805872df8323d03be54764a314";
return szText;
}
And in PB I declare it like:
DECLARE FUNCTION MyFunc LIB "testlib.dll" ALIAS "MyFunc" () AS STRING 'STRING because the compiler errors when I do ASCIIZ * anything
And call it like:
GLOBAL szTest AS STRING 'also tried AS ASCIIZ * 32 since the string is 32 chars in length, but didnt work
szTest = MyFunc()
but it only logs the first 3 or 4 chars in the entire string.
I can't figure this out.
Any suggestions?
Thanks.
------------------
[This message has been edited by Jay Straffer (edited July 28, 2007).]
I have an exported function(exported in a .def file) in C++(DLL name "testlib.dll"):
char* MyFunc()
{
char *szText = "b1b7a3805872df8323d03be54764a314";
return szText;
}
And in PB I declare it like:
DECLARE FUNCTION MyFunc LIB "testlib.dll" ALIAS "MyFunc" () AS STRING 'STRING because the compiler errors when I do ASCIIZ * anything
And call it like:
GLOBAL szTest AS STRING 'also tried AS ASCIIZ * 32 since the string is 32 chars in length, but didnt work
szTest = MyFunc()
but it only logs the first 3 or 4 chars in the entire string.
I can't figure this out.
Any suggestions?
Thanks.
------------------
[This message has been edited by Jay Straffer (edited July 28, 2007).]
Comment