1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Failure with new SDK

Discussion in 'Plugins' started by vefatica, Aug 20, 2009.

  1. vefatica

    Joined:
    May 20, 2008
    Messages:
    7,962
    Likes Received:
    30
    1>4conbuf.obj : error LNK2001: unresolved external symbol "void * __stdcall AllocMem(unsigned int *)" (?AllocMem@@YGPAXPAI@Z)

    Can I overcome this?

    Also, I find it useful to have this (below) in TakeCmd.h. Perhaps you'd put it there.

    Code:
    typedef struct {
       WCHAR   *pszDll;                // name of the DLL
       WCHAR    *pszAuthor;            // author's name
       WCHAR   *pszEmail;            // author's email
       WCHAR   *pszWWW;                // author's web page
       WCHAR   *pszDescription;        // (brief) description of plugin
       WCHAR   *pszFunctions;        // command, _variable, @function
       int    nMajor;                // plugin's major version #
       int    nMinor;                // plugin's minor version #
       int    nBuild;                // plugin's build #
       HMODULE hModule;                // module handle
       WCHAR *pszModule;
    } PLUGININFO, *LPPLUGININFO;
     
  2. vefatica

    Joined:
    May 20, 2008
    Messages:
    7,962
    Likes Received:
    30
    Looking at the LIB, the new AllocMem takes an unsigned int while the old one takes an unsigned int *. Is that correct?

     
  3. vefatica

    Joined:
    May 20, 2008
    Messages:
    7,962
    Likes Received:
    30
    Apparently so. I have a good build. Attached is a TakeCmdh.zip containing a typedef for PLUGININFO and a fix for AllocMem.
     

    Attached Files:

  4. vefatica

    Joined:
    May 20, 2008
    Messages:
    7,962
    Likes Received:
    30
    And the header says QueryIsTCMD() is WINAPI while the LIB exports a __cdecl.

    Could you also put this in the header:

    __declspec(dllexport) int TakeCommandIPC( LPTSTR pszCommand, LPTSTR pszArguments );
     
  5. vefatica

    Joined:
    May 20, 2008
    Messages:
    7,962
    Likes Received:
    30
    Here's yet another header file containing a typedef for PLUGININFO, a fixed declatation for AllocMem(), and a declaration for TakeCommandIPC().
     

    Attached Files:

Share This Page