Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Loading CSFML functions dynamically doesn't work anymore  (Read 4338 times)

0 Members and 1 Guest are viewing this topic.

Groogy

  • Hero Member
  • *****
  • Posts: 1469
    • MSN Messenger - groogy@groogy.se
    • View Profile
    • http://www.groogy.se
    • Email
Loading CSFML functions dynamically doesn't work anymore
« on: June 16, 2012, 11:41:42 pm »
Well the title explains itself. Before I could load CSFML dynamically using the OS functions for that. Now it can load the module successfully but can't find any functions in the module. Have you changed anything? Here's a simple little example of what I mean:

#include <Windows.h>

int main()
{
        HMODULE library = LoadLibrary( "csfml-system-2.dll" );
        if( library == NULL )
                return 1;

        void* func = GetProcAddress( library, "sfClock_create" );
        if( func == NULL )
                return 2;

        return 0;
}

This will fail at return 2; and I can't see why it would.
Developer and Maker of rbSFML and Programmer at Paradox Development Studio

Groogy

  • Hero Member
  • *****
  • Posts: 1469
    • MSN Messenger - groogy@groogy.se
    • View Profile
    • http://www.groogy.se
    • Email
Re: Loading CSFML functions dynamically doesn't work anymore
« Reply #1 on: June 16, 2012, 11:50:22 pm »
Erhm never mind... If I placed the DLL in the same folder as the exe it worked. So I must have a old CSFML version lurking somewhere in my system that I have missed.
Developer and Maker of rbSFML and Programmer at Paradox Development Studio

 

anything