Tektronix Technical Forums are maintained by community involvement. Feel free to post questions or respond to questions by other members. Should you require a time-sensitive answer, please contact your local Tektronix support center here.

C++ exception error occure with VISA lib at x64.

Post Reply
grayowl93
Posts: 1
Joined: December 2nd, 2021, 8:39 pm
Country: Japan

C++ exception error occure with VISA lib at x64.

Post by grayowl93 » December 2nd, 2021, 9:06 pm

I try to read Osc-data by VISA library.
I use VisualStudio2019 for C++ on platform x64.
At the application end.Exception error occurred by kernel32.dll.

On platform x86.it's working as normally-end.

Please show me the solutions.

download driver is
https://jp.tek.com/oscilloscope/tds7054 ... tware-v420

following list is my programing.

additional include directry:C :\Program Files\IVI Foundation\VISA\Win64\Include;%(AdditionalIncludeDirectories)
additional library directory:C :\Program Files\IVI Foundation\VISA\Win64\Lib_x64\msc
additional link files :tkVisa64.lib;tkVISA64.lib

C++ source

#include <iostream>
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
#include <time.h>
#include <memory.h>
#include <visa.h>

int main()
{
ViSession rm;
ViStatus status;
ViChar buffer[256];

// Open a d efault Session
status = viOpenDefaultRM(&rm);
if (status < VI_SUCCESS) goto error;

return 0;

error:
// Report error and clean up
viStatusDesc(vi, status, buffer);
fprintf(stderr, "failure: %s\n", buffer);

return 1;
}

I think so that it is error by VisualStudio.
because i selected x64.but exception handller is kernel32(x86).

and also, i'm sorry about my poor explanation.
because my mother tongue is japanese.

Post Reply

Return to “Programming Support”

Who is online

Users browsing this forum: Bing [Bot] and 1 guest