Link error in VC++ 6.0 accessing sequencecontext
I'm trying to access the sequencecontext in my VC++ dll. But when I add the NI default code line
"_bstr_t lastUserName = context->GetValString("StationGlobals.TS.LastUserName", 0);"
I get an link error on this row, error meassege.
"error LNK2001: unresolved external symbol "public: class _bstr_t __thiscall TS:ropertyObject::GetValString(class _bstr_t,long)" ([email protected]@[email protected]@[email protected]@[email protected]@Z)
Debug/dlltest.dll : fatal error LNK1120: 1 unresolved externals"
This code line is created by NI TestStand, why doesn't it work ? Sending GPIB commands to instrument works, etc. The dll is accesseble from TestStand except from the code line above.
You should use the #import directive in your project to include the TS namespace within your current context. With this all of the objects and methods exposed by the TestStand API will be available to you. Basically, you do this with a line like this at the top of your code:
Where is the directory that you installed TestStand too.
Other than this, you might want to explain what you mean when you say that this is "the NI default code line" and that "this code line is created by NI TestStand". Do you mean that you copied this from an example into your source file, or are you just trying to use one of our examples and it won't build properly?