TinTin...I use the string resources as they are in the tutorial. Most are not NULL terminated in the docs...they are terminated with "@Z", like this one:
JZMAKETCPSOCKET[%LSLL%?jzMakeTCPSocket@@YAKPADHH@Z
jzDBCMD DWORD jzMakeTCPSocket(LPSTR hostaddr, int hostport, int bindHow)
You could probably terminate them in a variety of ways, but...this works for me, everytime. The way I do it is to compile the dll, and then open the .exp file, look for the mangled function name, and copy the relevant portion of that to the string table. btw, you cannot have other strings in that table, to my knowledge. It broke when I tried that, but...you can add resources in another rc file...rc2.
extern C is a linkage specifier, and as was already stated above, it prevents the usual C++ name-mangling...but, that is how you are
(sort of) exporting your functions to DBPro, so...
extern C does not apply to using DLLs with DBPro. DBPro uses the string table only, except for the DllMain, which is exported normally and the ReceiveCoreDataPtr thing that it already looks for on its own. It is not needed in order to "export" functions to DBPro...it is irrelevant to the issue you are having. Neither is it strictly necessary to export classes, like MSVC++ does in the DLL boilerplate code. The string table is the only way I know of....
I think it is an unfortunate choice of words to say real when you mean float. There are languages where real is an actual type, but DBPro is not one of them. Saying real implies that there is more than one type of real number in DBPro...I only see float...no double, etc. I also disagree with the notion that that somehow makes you less intelligent...maybe inexperienced compared to others, but...its all good.
No, the help file thing is not really that good. It starts out okay, then...it sort of nosedives. If I had to rely on that alone, I would be in worse shape than TinTin. Yes, it is better than nothing, and no...I don't expect my hand to be held, but...it would not take much to make it much better.
It is the compiler that determines the size of integer, not the processor. Integers have no size. Like real, integer only tells the type of variable, not its size. The word long is used to mean "long integer". The word short is used to mean "short integer". (Still, there is no size until the compiler determines it.) Yes, a short integer is 16 bits, and a long integer is 32 bits.
DBPro is not unique in this respect. Windows defines and redefines variable types all the time...look at windows.h, for example. Here are a few 32-bit Windows types: HWND, HINSTANCE, HFILE, HANDLE, etc. But, DBPro types are very standard for BASICs. They lack the short integer that you want, but you can fix that. It is possible to return 16 bit signed integers to DBPro, and make 32 integers with them while preserving the sign, here:
function jzMakeWordIntValue(wordvalue as word)
local intValue as integer
if wordvalue && 0x8000 rem This checks for a sign bit.
intValue = wordvalue - 65536 rem Quick and dirty, but accurate...100%.
else
intValue = wordvalue
endif
endfunction intValue
No, the help file thing is not really that good. It starts out okay, then...it sort of nosedives. If I had to rely on that alone, I would be in worse shape than TinTin. Yes, it is better than nothing, and no...I don't expect my hand to be held, but...it would not take much to make it much better.
It is unfortunate that you are frustrated with this forum, but...I completely understand your position. I can provide my string table to you, and you could extrapolate from there, but...name-mangling is consistent.
Finally...a bit of advice. Try to use DWORDS as much as possible. They are a register wide, and they are DBPro's and 32bit Windows' favorite type...trust me. For example, you can pass a memblock pointer to the DLL using the DWORD type, and cast it in the DLL. (Neat, now my memblock is a structure!)