DLL creation process in windows application with CEN XFS
-
Thanks your tip help me to start some invetigation.All these days we were with LINUX. Migrating to windows seems little difficult for me. Where should :
extern "C"
{}
</pre>
be added??
Because SPITesh.H, the code has the expected tag...
#ifdef __cplusplus
extern "C" {
#endif
SPITEST_API HRESULT WINAPI WFPCancelAsyncRequest(HSERVICE hService, REQUESTID RequestID);
SPITEST_API HRESULT WINAPI WFPClose(HSERVICE hService, HWND hWnd, REQUESTID ReqID);
SPITEST_API HRESULT WINAPI WFPDeregister(HSERVICE hService, DWORD dwEventClass, HWND hWndReg, HWND hWnd, REQUESTID ReqID);
SPITEST_API HRESULT WINAPI WFPExecute(HSERVICE hService, DWORD dwCommand, LPVOID lpCmdData, DWORD dwTimeOut, HWND hWnd, REQUESTID ReqID);
SPITEST_API HRESULT WINAPI WFPGetInfo(HSERVICE hService, DWORD dwCategory, LPVOID lpQueryDetails, DWORD dwTimeOut, HWND hWnd, REQUESTID ReqID);
SPITEST_API HRESULT WINAPI WFPLock(HSERVICE hService, DWORD dwTimeOut, HWND hWnd, REQUESTID ReqID);
SPITEST_API 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);
SPITEST_API HRESULT WINAPI WFPRegister(HSERVICE hService, DWORD dwEventClass, HWND hWndReg, HWND hWnd, REQUESTID ReqID);
SPITEST_API HRESULT WINAPI WFPSetTraceLevel(HSERVICE hService, DWORD dwTraceLevel);
SPITEST_API HRESULT WINAPI WFPUnloadService();
SPITEST_API HRESULT WINAPI WFPUnlock(HSERVICE hService, HWND hWnd, REQUESTID ReqID);
#ifdef __cplusplus
};
#endifWhat you show inside SPITesh.H is the correct placement. Is that your file or the original vendor's file? In Visual Studio, when you compile the code as C++, it should automatically define
__cplusplus
. If it doesn't, then it might be that your source file extension is".c"
when it should be".cpp".
The difficult we do right away... ...the impossible takes slightly longer.
-
What you show inside SPITesh.H is the correct placement. Is that your file or the original vendor's file? In Visual Studio, when you compile the code as C++, it should automatically define
__cplusplus
. If it doesn't, then it might be that your source file extension is".c"
when it should be".cpp".
The difficult we do right away... ...the impossible takes slightly longer.
Yes, I sm trying to follow the same. but still it is doing no good. https://drive.google.com/file/d/0B60pejPe6yiSejRGQ3JnLUl4dzA/view[^] The link contains the project ref files i made sure all files are CPP and Extern C just for the headers. What else should i look ifor?? is there some settings that i should set in VS 2010 Express
-
Yes, I sm trying to follow the same. but still it is doing no good. https://drive.google.com/file/d/0B60pejPe6yiSejRGQ3JnLUl4dzA/view[^] The link contains the project ref files i made sure all files are CPP and Extern C just for the headers. What else should i look ifor?? is there some settings that i should set in VS 2010 Express
Try placing the
#ifdef __cplusplus
extern "C" {
#endif
// Functions
#ifdef __cplusplus
};
#endifin the CPP file also, surrounding the functions you want to export. I think that is the issue.
The difficult we do right away... ...the impossible takes slightly longer.
-
Try placing the
#ifdef __cplusplus
extern "C" {
#endif
// Functions
#ifdef __cplusplus
};
#endifin the CPP file also, surrounding the functions you want to export. I think that is the issue.
The difficult we do right away... ...the impossible takes slightly longer.
NO luck still.... :(
-
Try placing the
#ifdef __cplusplus
extern "C" {
#endif
// Functions
#ifdef __cplusplus
};
#endifin the CPP file also, surrounding the functions you want to export. I think that is the issue.
The difficult we do right away... ...the impossible takes slightly longer.
If possible can you just try downloading the code and check with your MS VS version??
-
NO luck still.... :(
I'm sorry. Maybe someone else will have some better ideas. :sigh:
The difficult we do right away... ...the impossible takes slightly longer.
-
If possible can you just try downloading the code and check with your MS VS version??
I did. It won't compile because of a number of undefined symbols in
SpiTest.cpp
.Quote:
2 IntelliSense: cannot open source file "xfsconf.h" d:\Richard\Documents\Visual Studio 2013\Projects\spi_QuantumT_bcr\spi_QuantumT_bcr\SpiTest.cpp 7 1 spi_QuantumT_bcr 3 IntelliSense: identifier "WFMOpenKey" is undefined d:\Richard\Documents\Visual Studio 2013\Projects\spi_QuantumT_bcr\spi_QuantumT_bcr\SpiTest.cpp 150 13 spi_QuantumT_bcr 4 IntelliSense: identifier "WFS_CFG_MACHINE_XFS_ROOT" is undefined d:\Richard\Documents\Visual Studio 2013\Projects\spi_QuantumT_bcr\spi_QuantumT_bcr\SpiTest.cpp 150 24 spi_QuantumT_bcr 5 IntelliSense: identifier "WFMQueryValue" is undefined d:\Richard\Documents\Visual Studio 2013\Projects\spi_QuantumT_bcr\spi_QuantumT_bcr\SpiTest.cpp 154 8 spi_QuantumT_bcr 6 IntelliSense: identifier "WFMCloseKey" is undefined d:\Richard\Documents\Visual Studio 2013\Projects\spi_QuantumT_bcr\spi_QuantumT_bcr\SpiTest.cpp 161 2 spi_QuantumT_bcr
The difficult we do right away... ...the impossible takes slightly longer.
-
I did. It won't compile because of a number of undefined symbols in
SpiTest.cpp
.Quote:
2 IntelliSense: cannot open source file "xfsconf.h" d:\Richard\Documents\Visual Studio 2013\Projects\spi_QuantumT_bcr\spi_QuantumT_bcr\SpiTest.cpp 7 1 spi_QuantumT_bcr 3 IntelliSense: identifier "WFMOpenKey" is undefined d:\Richard\Documents\Visual Studio 2013\Projects\spi_QuantumT_bcr\spi_QuantumT_bcr\SpiTest.cpp 150 13 spi_QuantumT_bcr 4 IntelliSense: identifier "WFS_CFG_MACHINE_XFS_ROOT" is undefined d:\Richard\Documents\Visual Studio 2013\Projects\spi_QuantumT_bcr\spi_QuantumT_bcr\SpiTest.cpp 150 24 spi_QuantumT_bcr 5 IntelliSense: identifier "WFMQueryValue" is undefined d:\Richard\Documents\Visual Studio 2013\Projects\spi_QuantumT_bcr\spi_QuantumT_bcr\SpiTest.cpp 154 8 spi_QuantumT_bcr 6 IntelliSense: identifier "WFMCloseKey" is undefined d:\Richard\Documents\Visual Studio 2013\Projects\spi_QuantumT_bcr\spi_QuantumT_bcr\SpiTest.cpp 161 2 spi_QuantumT_bcr
The difficult we do right away... ...the impossible takes slightly longer.
XFSMANAGER INSTALLER: ftp://ftp.cencenelec.eu/CEN/WhatWeDo/Fields/ICT/eBusiness/WS/XFS/CWA15748/XFS310SDKInstall.zip
That is the libray link.
-
XFSMANAGER INSTALLER: ftp://ftp.cencenelec.eu/CEN/WhatWeDo/Fields/ICT/eBusiness/WS/XFS/CWA15748/XFS310SDKInstall.zip
That is the libray link.
I'm sorry, I'm not going to install anything on my development machine. Take a look at this article: extern "C"[^]
The difficult we do right away... ...the impossible takes slightly longer.
-
I'm sorry, I'm not going to install anything on my development machine. Take a look at this article: extern "C"[^]
The difficult we do right away... ...the impossible takes slightly longer.
No problem , I will try some option too...