Click here to Skip to main content
15,916,189 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: stock market code please Pin
Richard MacCutchan21-Nov-14 21:20
mveRichard MacCutchan21-Nov-14 21:20 
GeneralRe: stock market code please Pin
Stefan_Lang27-Nov-14 21:19
Stefan_Lang27-Nov-14 21:19 
AnswerRe: stock market code please Pin
jcxnet22-Nov-14 8:01
jcxnet22-Nov-14 8:01 
QuestionInsert icons CTreeCtrl (some items only) Pin
_Flaviu19-Nov-14 23:46
_Flaviu19-Nov-14 23:46 
AnswerRe: Insert icons CTreeCtrl (some items only) Pin
Richard MacCutchan20-Nov-14 1:18
mveRichard MacCutchan20-Nov-14 1:18 
GeneralRe: Insert icons CTreeCtrl (some items only) Pin
_Flaviu20-Nov-14 2:33
_Flaviu20-Nov-14 2:33 
GeneralRe: Insert icons CTreeCtrl (some items only) Pin
Richard MacCutchan20-Nov-14 3:00
mveRichard MacCutchan20-Nov-14 3:00 
QuestionDLL creation process in windows application with CEN XFS Pin
venkat swaminathan19-Nov-14 22:35
venkat swaminathan19-Nov-14 22:35 
Hi To say i am very noob to windows programming world.
We are trying to develop windows application + device driver with CEN XFS compliance.

http://en.wikipedia.org/wiki/CEN/XFS

simple architectural flow:

  Windows Application
          |
 _____________________
|      XFS APIs         |
   (CEN/XFS SDK DLL)
|                       |
|      XFS SPIs         |
|_____________________|---XFS Manager
          |
          |
   Service providers (SP)
   (DEVICE DRIVER)


To understand the SP's functionality, we recently took one of the device vendors SP's DLL for accessing their device and we were able to successfully communicate with their device using our windows application(Eclipse MINGW based).

Then we started to check for some sample SP source in internet to try our implementation. (https://drive.google.com/file/d/0B60pejPe6yiSejRGQ3JnLUl4dzA/view)

With the linked source we were able to compile and create an output DLL. But , when we tried to access the SP, I always return error.

With windows sample application, we just tried to open the device with call (WFSOPEN) which always returned (-15 WFS_ERR_INTERNAL_ERROR ) or (-29 WFS_ERR_INVALID_SERVPROV)



C++
Trial FLow 1 :

    Application Call to manager:

        hResult = WFSOpen(    "QuantumT",    hApp,lpszAppID,  dwTraceLevel,dwTimeOut,VER_SPI_REQUIRE,&SrvcVersion,&SPIVersion,&hService);

    manager translates WFSOPEN call to SP's WFPOPEN call:

        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)

    With above call flow I get (-29 WFS_ERR_INVALID_SERVPROV) as an error for my application


C++
  Trial FLow 2 (Just removed WINAPI interface for WFPOPEN in SP):
        
Application Call to manager:
            
hResult = WFSOpen("QuantumT",hApp,lpszAppID,dwTraceLevel,dwTimeOut,VER_SPI_REQUIRE,&SrvcVersion,&SPIVersion,&hService);    
        
manager translates WFSOPEN call to SP's WFPOPEN call

HRESULT  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)



With above call flow I get (-15 WFS_ERR_INTERNAL_ERROR ) as an error for my application from manger even though i force SUCCESS as return from SP to manager

I am confused why MANAGER returns different error codes to application if WINAPI definition is removed from WFPOPEN.

Link for WINDOWS APPLICATION SAMPLE: https://drive.google.com/open?id=0B60pejPe6yiSUEp1N2xzdGlXWFE&authuser=0

Request some pointers on understanding this issue.





AnswerRe: DLL creation process in windows application with CEN XFS Pin
Richard Andrew x6420-Nov-14 6:35
professionalRichard Andrew x6420-Nov-14 6:35 
GeneralRe: DLL creation process in windows application with CEN XFS Pin
venkat swaminathan20-Nov-14 15:07
venkat swaminathan20-Nov-14 15:07 
AnswerRe: DLL creation process in windows application with CEN XFS Pin
Richard Andrew x6420-Nov-14 15:16
professionalRichard Andrew x6420-Nov-14 15:16 
GeneralRe: DLL creation process in windows application with CEN XFS Pin
venkat swaminathan20-Nov-14 15:29
venkat swaminathan20-Nov-14 15:29 
AnswerRe: DLL creation process in windows application with CEN XFS Pin
Richard Andrew x6420-Nov-14 15:37
professionalRichard Andrew x6420-Nov-14 15:37 
GeneralRe: DLL creation process in windows application with CEN XFS Pin
venkat swaminathan20-Nov-14 15:44
venkat swaminathan20-Nov-14 15:44 
AnswerRe: DLL creation process in windows application with CEN XFS Pin
Richard Andrew x6420-Nov-14 15:57
professionalRichard Andrew x6420-Nov-14 15:57 
GeneralRe: DLL creation process in windows application with CEN XFS Pin
venkat swaminathan20-Nov-14 16:07
venkat swaminathan20-Nov-14 16:07 
AnswerRe: DLL creation process in windows application with CEN XFS Pin
Richard Andrew x6420-Nov-14 16:16
professionalRichard Andrew x6420-Nov-14 16:16 
GeneralRe: DLL creation process in windows application with CEN XFS Pin
venkat swaminathan20-Nov-14 16:28
venkat swaminathan20-Nov-14 16:28 
GeneralRe: DLL creation process in windows application with CEN XFS Pin
Richard Andrew x6420-Nov-14 16:34
professionalRichard Andrew x6420-Nov-14 16:34 
GeneralRe: DLL creation process in windows application with CEN XFS Pin
venkat swaminathan20-Nov-14 16:29
venkat swaminathan20-Nov-14 16:29 
GeneralRe: DLL creation process in windows application with CEN XFS Pin
Richard Andrew x6420-Nov-14 16:37
professionalRichard Andrew x6420-Nov-14 16:37 
GeneralRe: DLL creation process in windows application with CEN XFS Pin
venkat swaminathan20-Nov-14 16:40
venkat swaminathan20-Nov-14 16:40 
GeneralRe: DLL creation process in windows application with CEN XFS Pin
Richard Andrew x6420-Nov-14 16:45
professionalRichard Andrew x6420-Nov-14 16:45 
GeneralRe: DLL creation process in windows application with CEN XFS Pin
venkat swaminathan20-Nov-14 16:59
venkat swaminathan20-Nov-14 16:59 
GeneralEdit Control Problem Pin
Member 1114570919-Nov-14 14:12
Member 1114570919-Nov-14 14:12 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.