![]() ![]() Some people report freely being able to modify the in bank as well, but. Just use it as parameters to be passed the DLL and leave it at that. Now, technically, Blitz is not expecting the in bank to be modified - only the out bank, so I'd advise against modifying the in bank. MyByteVal.b = PeekB(in)myShortVal.s = PeekB(in + 2)myIntVal.s = PeekB(in + 6) ![]() ![]() Just let Pure think it's being passed a pair of ints and Pure will do the rest via peeking and poking, like so: Blitz sends a DLL procedure pointers to a pair of banks, but you don't need to tell Pure that they're pointers, specifically. The ProcedureDLL heading tells Pure that you'll want that function available to DLL calls (you can have lots of function calls in your DLL, but only the ones you expose as ProcedureDLL will be accessable via the DLL call). ProcedureDLL CreateMap(in, in_size, out, out_size) We'll cover Pure's end of the syntax first - as well as the quirks you need to deal with in order to get a working DLL.įirst, the PureBasic procedure heading. Pure and Blitz actually play pretty nicely with each other once you've got the calling conventions sorted out. decls file for it, and once again you're stuck with CallDLL as the only way you've got to access DLLs under these conditions. If you don't know in advance exactly what the name of the DLL you're accessing is, then there's no way you can write a. decls are lovely but they totally leave out one thing: dynamic loading at runtime. decls update, so they're pretty much stuck using CallDLL to access DLLs with. There's two reasons, and they're both decent ones. decls files it's child's play to add new functionality to Blitz - and since the IDE even highlights new functions added this way, it begs the question of why you'd even want to do this. Yeah, I know, there's cooler ways for Blitz to interface with DLLs now. BlitzCoder - Blitz Basic Game Development Resourcesīlitz2D Intermediates: Creating PureBasic DLLs for Blitz's CallDLL by Morduun ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |