取消
顯示結果 
搜尋替代 
您的意思是: 

Error Code -2147467259 when custom FrontEnd Callback is called from Teststand.

Hello, For the project I am working on, the standard LoginLogout sequence has to be overriden from a custom one. The sequence i implemented does the following: A connection to a database, located on a virtual machine at my pc, is initially opened, the user name and password are given by the user through a message popup and the information is compared to the database entries. If the username and password are valid, a new TestStand user with the corresponding user information and priviliges is created and set as current user. If not, the procedure is repeated five times and if it ends unsuccessfully, the user account is blocked. The implemented sequence works just fine when I run it independently in TestStand, while I'm logged in as administrator using the standard TestStand Front End callback. When I added it in the LoginLogout sequence in the FrontEndCallbacks.seq in C:\Users\Public\Documents\National Instruments\TestStand 2010 SP1\Components\Callbacks\FrontEnd in order for this to be called instead of the standard one, I received the following errors: 1. Error HRESULT E_FAIL has been returned from a call to a COM component. Error Code= -2147467259 This error appears immediately after I open the sequence editor. (see also attached images 2. LABVIEW: (Hex 0x80004005) Unspecified error. This error appears when I run the customized user interface in LabVIEW that calls the FrontEnd callback in the TtestStand public folder. After the error message appears my custom login dialog pops up and after the user logs in (the procedure works as expected) and then presses OK to the error message, the vi stops. It cannot execute further. I suspect that there is a problem when connecting to the database but I cannot understand what it is or why this is happening since the sequence runs without problems in Testand. Could someone help? Thank you very much!
0 積分
1 條訊息(共 10 條)
6,700 檢視

What call exactly is returning the error(s)?

 

-Doug

0 積分
2 條訊息(共 10 條)
6,693 檢視

I am sorry for the omission. As seen during a highlighted execution of the GUI, the error appears after the call of IApplicationMgr.Start (see attached image).

0 積分
3 條訊息(共 10 條)
6,687 檢視

Can you make sure you have enough rights to connect to the database?

0 積分
4 條訊息(共 10 條)
6,659 檢視

I think, I do have the rights to connect to the database.

The situation is really weird, because when I run the GUI the error appears and right after the error appears, the login dialog pops up. Then I have to reply sth to the login dialog (the login procedure seems to work just fine and the communication with the database works, too), after that I press ok to the error message, so that it goes away and immediately after that, the GUI stops. So, the connection to the database seems to work fine, but I still believe that the error has to do with the database, because when I try it with other login sequenceswithout a database connection, everything works. What else could be wrong??

0 積分
5 條訊息(共 10 條)
6,655 檢視

Just to get it right:
You run the gui and the error appears. But after that you can still go on by entering a user and the corresponding password ->it gets accepted
But now you press ok to the error message and the vi is aborted.
Where's the difference between the call of the function when run independently and when run in the .seq?

0 積分
6 條訊息(共 10 條)
6,640 檢視

I really can't think of a difference.. The only thing I know is, that when I run the sequence in the TestStand sequence editor it executes without problems and when I call it as a FrontEnd callback I get an error. No clue why.

Thanks for trying to help!

0 積分
7 條訊息(共 10 條)
6,633 檢視

it seems your try to call a COM component that is not found

microsoft says: E_FAIL Unspecified failure

msdn.microsoft.com/en-us/library/windows/desktop/aa378137(v=vs.85).aspx

Maybe the cause for the problem could be found somewhere else!

0 積分
8 條訊息(共 10 條)
6,624 檢視

The way station callbacks are run is not much different than how regular executions are run so it's unlikely that's the direct cause of any issue.

 

things to check:

1) Make sure you are using the station callbacks file you think you are and that the code is identical to what you are running directly. If there is a station callbacks file in the public directory that will override the one that exists in the program files directory.

2) try marking steps as skipped in your station callbacks file and see if the problem goes away. Which steps led to the problem?

 

Hope this helps,

-Doug

0 積分
9 條訊息(共 10 條)
6,619 檢視

I would just like to add this note to this thread in case anyone has this problem in the future.  We happen to come up with the same error when converting from 2012 to 2014. 

 

Long story short, check the "C:\Users\Public\Documents\National Instruments\TestStand 2012\Components\Callbacks\FrontEnd" folder for the frontendcallback.seq file.  TS will look here first for the custom callbacks.  Delete the file that is here and then see if the error goes away. 

 

This solved our issue, hopefully it can help someone else.

10 條訊息(共 10 條)
5,893 檢視