Reference error in DLL

4

I am creating a DLL that needs to export 11 CEN / XFS functions, but there is a function that consumes a header file. I think the error is in consuming a method of a header that is not declared in my scope, anyone to help?

This dll will communicate with the XFS Manager.

My code is this (My DLL - dllmain.cpp):

HRESULT WINAPI WFPOpen ( HSERVICE hService, LPSTR lpszLogicalName, HAPP hApp, LPSTR lpszAppID, DWORD dwTraceLevel, DWORD dwTimeOut, HWND hWnd, REQUESTID ReqID, HPROVIDER hProvider, DWORD dwSPIVersionsRequired, LPWFSVERSION lpSPIVersion, DWORD dwSrvcVersionsRequired, LPWFSVERSION lpSrvcVersion)
{

printf("INTO WFPOpen");
WFSRESULT * lpWFSResult;
HRESULT result;
SYSTEMTIME st; 
HRESULT rt;
GetSystemTime(&st); 

//o erro ocorre aki
result = WFMAllocateBuffer(sizeof(WFSRESULT), WFS_MEM_ZEROINIT, (void**)&lpWFSResult);

if(result!=WFS_SUCCESS){
        return WFS_ERR_INTERNAL_ERROR; 
}                    

return WFS_SUCCESS;
}

Header file (XFSADMIN.H):

HRESULT extern WINAPI WFMAllocateBuffer(ULONG ulSize, ULONG ulFlags, LPVOID * lppvData);

My dll.h (11 methods that will be exported)

class DLLIMPORT DllClass
{
public:
    HRESULT WINAPI WFPCancelAsyncRequest (HSERVICE hService, REQUESTID RequestID);
    HRESULT WINAPI WFPClose (HSERVICE hService, HWND hWnd, REQUESTID ReqID);
    HRESULT WINAPI WFPDeregister (HSERVICE hService, DWORD dwEventClass, HWND hWndReg, HWND hWnd, REQUESTID ReqID);
    HRESULT WINAPI WFPExecute (HSERVICE hService, DWORD dwCommand, LPVOID lpCmdData, DWORD dwTimeOut, HWND hWnd, REQUESTID ReqID);
    HRESULT WINAPI WFPGetInfo (HSERVICE hService, DWORD dwCategory, LPVOID lpQueryDetails, DWORD dwTimeOut, HWND hWnd, REQUESTID ReqID);
    HRESULT WINAPI WFPLock (HSERVICE hService, DWORD dwTimeOut, HWND hWnd, REQUESTID ReqID);
    HRESULT WINAPI WFPOpen (HSERVICE hService, LPSTR lpszLogicalName, HAPP hApp, LPSTR lpszAppID, DWORD dwTraceLevel, DWORD dwTimeOut, HWND hWnd, REQUESTID ReqID, HPROVIDER hProvider, DWORD dwSPIVersionsRequired, LPWFSVERSION lpSPIVersion, DWORD dwSrvcVersionsRequired, LPWFSVERSION lpSrvcVersion);
    HRESULT WINAPI WFPRegister (HSERVICE hService,  DWORD dwEventClass, HWND hWndReg, HWND hWnd, REQUESTID ReqID);
    HRESULT WINAPI WFPSetTraceLevel (HSERVICE hService, DWORD dwTraceLevel);
    HRESULT WINAPI WFPUnloadService ();
    HRESULT WINAPI WFPUnlock (HSERVICE hService, HWND hWnd, REQUESTID ReqID);   
  };

However, this error occurs when compiling the DLL.

More precisely here:

$(CPP) -shared $(LINKOBJ) -o $(BIN) $(LIBS) -Wl,--output-def,$(DEF),--out-  implib,$(STATIC),--add-stdcall-alias
    
asked by anonymous 20.01.2017 / 18:10

0 answers