[Trying to create a wrapper for Steam Powered ] correct way to import a dll or lib

Just starting out? Need help? Post your questions and find answers here.
User avatar
skinkairewalker
Enthusiast
Enthusiast
Posts: 635
Joined: Fri Dec 04, 2015 9:26 pm

[Trying to create a wrapper for Steam Powered ] correct way to import a dll or lib

Post by skinkairewalker »

Hello guys, recently steam powered launched a new SDK containing imports to link your application with the Steam Store, available at:
https://partner.steamgames.com/download ... k_151.zip

I'm trying to use both the .DLL and the .LIB, but both forms give an Invalid memory access error.

Code: Select all

[ERROR] Invalid memory access. (read error at address 1127290027) 
Can anyone tell me what I'm doing wrong? below I provide the examples that I am using :
https://drive.google.com/file/d/1z3ZfSf ... sp=sharing
ricardo_sdl
Enthusiast
Enthusiast
Posts: 115
Joined: Sat Sep 21, 2019 4:24 pm

Re: [Trying to create a wrapper for Steam Powered ] correct way to import a dll or lib

Post by ricardo_sdl »

The steam_api.dll appears to be 32-bit. This might be a problem if the compiler is 64-bit :?:
You may want to test to see if the same code will work on 32-bit compiler.
You can check my games at:
https://ricardo-sdl.itch.io/
User avatar
skinkairewalker
Enthusiast
Enthusiast
Posts: 635
Joined: Fri Dec 04, 2015 9:26 pm

Re: [Trying to create a wrapper for Steam Powered ] correct way to import a dll or lib

Post by skinkairewalker »

thanks by you answer ricardo_sdl

Tried to use 64-bit compiler, but the error still persists :

https://prnt.sc/1288ebs
https://prnt.sc/1288jqw

what do you think it can be?
infratec
Always Here
Always Here
Posts: 6873
Joined: Sun Sep 07, 2008 12:45 pm
Location: Germany

Re: [Trying to create a wrapper for Steam Powered ] correct way to import a dll or lib

Post by infratec »

It is not a C dll.
It is an OOP dll.

It is much more complicated to use it.
ricardo_sdl
Enthusiast
Enthusiast
Posts: 115
Joined: Sat Sep 21, 2019 4:24 pm

Re: [Trying to create a wrapper for Steam Powered ] correct way to import a dll or lib

Post by ricardo_sdl »

The exports on the dll are using the c calling convention. I did a test with CallCFunctionFast and it called the SteamAPI_Init function.
You can check my games at:
https://ricardo-sdl.itch.io/
ricardo_sdl
Enthusiast
Enthusiast
Posts: 115
Joined: Sat Sep 21, 2019 4:24 pm

Re: [Trying to create a wrapper for Steam Powered ] correct way to import a dll or lib

Post by ricardo_sdl »

Just a note: A game called Spacewar appeared as the last game I played on my steam client. This is the game used as an example for the Steamworks api.
You can check my games at:
https://ricardo-sdl.itch.io/
Post Reply