Menu

DLL function prototypes using pointers

2008-11-21
2012-09-26
  • dragonsphere

    dragonsphere - 2008-11-21

    I have not used Dev-C++ in a very long time and thought I would give it a try again. Anyway I am having issues with the following function prototypes for a DLL function.

    // external callback
    typedef void __cdecl (*exteventproc)(char * eventtype);

    // exported function prototype
    extern "C" DLLIMPORT char * __cdecl Init(int Handle, exteventproc Addr, char * KeyString, int &maxpar, int &bufsize);

    When placed in my header file it complains about a couple of things. First it complains about the int &maxpar Parameter? "syntax error before '&' token" Grant it this code is from an old version of Dev-C++ but I would have thought that this would compile in the new 4.9.9.2 version too?

     
  • laxman varada

    laxman varada - 2010-08-16

    hi,

    When placed in my header file it complains about a couple of things. First it
    complains about the int &maxpar Parameter? "syntax error before '&' token"
    Grant it this code is from an old version of Dev-C++ but I would have thought
    that this would compile in the new 4.9.9.2 version too

    regards,
    phe9oxis,
    http://www.guidebuddha.com

     

Log in to post a comment.