I have a dll and i can list all its function names and addresses. Do i just use callfunction commands or can i use prototypes? If so how? The docs say that prototype is better?
If you have the lib file then you can use IMPORT. If you only have the DLL then you can either use PROTOTYPES (which also gives the benefit of detecting the presence of the DLL at runtime) or use the DLL importer utility in the PureBasic SDK (..\purebasic\sdk\dll importer).
I find that the PROTOTYPE method is the best as it gives you parameter hints in the IDE when using the functions. It is slightly more work to write the code for PROTOTYPE but worth it IMHO.
I done it with prototypes in the end and it works nice BUT the lib does not include any functions to get the ip or port for a connected client so its useless .. I am trying to do some udp holepunching and having reliable udp would have made it much easier.