Here is a doc that says how to do it. I cant find out where I got it from and I dont know if it works but its worth a try.
The examples given here are using PureBasic 3.72
First you have to write your function and put it in a dll. This dll should use the cdecl calling convention.
In purebasic you add Cdll to the procedure call. This means that PB compile that Procedure for use in a dll (c_DLL)and use the cdecl-convention.(C_ dll)
ProcedureCDLL ptext()
MessageRequester("Title", "Test", #PB_MessageRequester_YesNo)
EndProcedure
after that you compile it to a dll.
Next you have to make a stringtable-resource and add it to the dll. This is a little bit more work-intensive.
For this I use a freeware program called resource hacker from Angus Johnson.
You can get it here: http://www.users.on.net/johnson/resourcehacker/.
First you have to open your dll in reshack
After that you add a new resource (here a kind of a standard resource)
After selecting the file you have to select a stringtable from the file
Next step is to expand the stringtable and edit it
You can find a help text in darkbasic/help/documents/Third party commands.htm
The only exception is that you use the normal function name instead of a decorated form of your function (only in c++).
The entry should look like
STRINGTABLE
LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
{
1, "make msgbox%0%ptext%no parameter"
}
The push the „Compile script“ button and then save your file.
Drop your dll into the darkbasic/compiler/plugin-user folder.
That all.
Stefan Mahr