Link error in VC++ 6.0 accessing sequencecontext

Advertisement
November 30

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.
Regards
Fredrik

Advertisement

Replay

Hi Fredrik,
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:
#import "\bin\teapi.dll"
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?
Jason F.
Applications Engineer
National Instrument
s
www.ni.com/ask

View 3 Replies

Tags:

  1. sims resource wont download pdf files
  2. Profitability Segment Number service PO
  3. elitepad 900 shutsdown
  4. UFE3
  5. 3QVY
  6. PWKI
  7. newspaperdbl
  8. pocket3eq
  9. muscleppk
  10. sanga5t
Copyrights 2019 Fcffair BigData Resource, All rights reserved