Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

Failure with new SDK

May
12,934
171
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;
 
Looking at the LIB, the new AllocMem takes an unsigned int while the old one takes an unsigned int *. Is that correct?

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;
 
Looking at the LIB, the new AllocMem takes an unsigned int while the old one takes an unsigned int *. Is that correct?

Apparently so. I have a good build. Attached is a TakeCmdh.zip containing a typedef for PLUGININFO and a fix for AllocMem.
 

Attachments

  • TakeCmdh.zip
    13.3 KB · Views: 255
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 );
 
Here's yet another header file containing a typedef for PLUGININFO, a fixed declatation for AllocMem(), and a declaration for TakeCommandIPC().
 

Attachments

  • TakeCmdh2.zip
    13.4 KB · Views: 241
Back
Top