New Sub-Forum

In an effort to help make sure there are appropriate categories for topics of discussion that are happening, there is now a sub-forum for databases and database programming under Special Interest groups. Please direct questions, etc., about this topic to that sub-forum moving forward. Thank you.
See more
See less

Using SteamWorks API in PB

  • Filter
  • Time
  • Show
Clear All
new posts

  • Using SteamWorks API in PB

    Has anybody here found success in programming against the SteamWorks API in PB?

    It was built to be accessed from C++, and I have no idea if it's even possible to adapt the header files for use in PB (haven't done much OOP since finishing university 25+ years ago).

    Specifically, some API functions want to have an object passed to them and will invoke one of that object's methods as a callback mechanism.

    Google searches haven't produced anything useful, and neither has experimentation.

    Converting all those header files is probably going to take me weeks, and it would be disheartening to find out at the end that I'm trying to do something that isn't possible in PB.

    Thanks in advance for any advice and/or pointers you may have!

  • #2
    the sdk has a few features to facilitate the creation of binding layers for other languages.
    • steam_api_flat.h declares a set of "flat" functions that mirror the interface functions in the sdk. This is not pure c code, but it does use plain c linkage and calling conventions, so it is easy to interop with other languages.


    • #3
      Thank you, Peter! That was the "experimentation" part - all this wrapper does is change the
      notation to
      result=method(object_ptr, parameters)
      These functions still expect pointers to C++ object instances.

      I believe I may not be seeing the forest for the trees :-)