This commit is contained in:
2024-11-01 11:47:29 -07:00
commit ebbc16ee6a
128 changed files with 23645 additions and 0 deletions

View File

@ -0,0 +1,120 @@
/*********************************************************************/
/* This example demonstrates how you might query your system for */
/* a particular instrument. This example queries for all */
/* GPIB, serial or VXI instruments. Notice that VISA is able to */
/* find GPIB and VXI instruments because the instruments have a */
/* predefined protocol. But serial instruments do not. Hence, */
/* VISA merely indicates that a serial port is available. */
/* */
/* The general flow of the code is */
/* Open Resource Manager */
/* Use viFindRsrc() to query for the first available instrument */
/* Open a session to this device */
/* Find the next instrument using viFindNext() */
/* Open a session to this device. */
/* Loop on finding the next instrument until all have been found*/
/* Close all VISA Sessions */
/*********************************************************************/
#include <stdio.h>
#include <stdlib.h>
#include "visa.h"
static char instrDescriptor[VI_FIND_BUFLEN];
static ViUInt32 numInstrs;
static ViFindList findList;
static ViSession defaultRM, instr;
static ViStatus status;
int main(void)
{
/* First we will need to open the default resource manager. */
status = viOpenDefaultRM (&defaultRM);
if (status < VI_SUCCESS)
{
printf("Could not open a session to the VISA Resource Manager!\n");
exit (EXIT_FAILURE);
}
/*
* Find all the VISA resources in our system and store the number of resources
* in the system in numInstrs. Notice the different query descriptions a
* that are available.
Interface Expression
--------------------------------------
GPIB "GPIB[0-9]*::?*INSTR"
VXI "VXI?*INSTR"
GPIB-VXI "GPIB-VXI?*INSTR"
Any VXI "?*VXI[0-9]*::?*INSTR"
Serial "ASRL[0-9]*::?*INSTR"
PXI "PXI?*INSTR"
All instruments "?*INSTR"
All resources "?*"
*/
status = viFindRsrc (defaultRM, "?*INSTR", &findList, &numInstrs, instrDescriptor);
if (status < VI_SUCCESS)
{
printf ("An error occurred while finding resources.\nHit enter to continue.");
fflush(stdin);
getchar();
viClose (defaultRM);
return status;
}
printf("%d instruments, serial ports, and other resources found:\n\n",numInstrs);
printf("%s \n",instrDescriptor);
/* Now we will open a session to the instrument we just found. */
status = viOpen (defaultRM, instrDescriptor, VI_NULL, VI_NULL, &instr);
if (status < VI_SUCCESS)
{
printf ("An error occurred opening a session to %s\n",instrDescriptor);
}
else
{
/* Now close the session we just opened. */
/* In actuality, we would probably use an attribute to determine */
/* if this is the instrument we are looking for. */
viClose (instr);
}
while (--numInstrs)
{
/* stay in this loop until we find all instruments */
status = viFindNext (findList, instrDescriptor); /* find next desriptor */
if (status < VI_SUCCESS)
{ /* did we find the next resource? */
printf ("An error occurred finding the next resource.\nHit enter to continue.");
fflush(stdin);
getchar();
viClose (defaultRM);
return status;
}
printf("%s \n",instrDescriptor);
/* Now we will open a session to the instrument we just found */
status = viOpen (defaultRM, instrDescriptor, VI_NULL, VI_NULL, &instr);
if (status < VI_SUCCESS)
{
printf ("An error occurred opening a session to %s\n",instrDescriptor);
}
else
{
/* Now close the session we just opened. */
/* In actuality, we would probably use an attribute to determine */
/* if this is the instrument we are looking for. */
viClose (instr);
}
} /* end while */
status = viClose(findList);
status = viClose (defaultRM);
printf ("\nHit enter to continue.");
fflush(stdin);
getchar();
return 0;
}

View File

@ -0,0 +1,115 @@
# Microsoft Developer Studio Project File - Name="FindRsrc" - Package Owner=<4>
# Microsoft Developer Studio Generated Build File, Format Version 6.00
# ** DO NOT EDIT **
# TARGTYPE "Win32 (x86) Console Application" 0x0103
CFG=FindRsrc - Win32 Debug
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
!MESSAGE use the Export Makefile command and run
!MESSAGE
!MESSAGE NMAKE /f "FindRsrc_MSVC.mak".
!MESSAGE
!MESSAGE You can specify a configuration when running NMAKE
!MESSAGE by defining the macro CFG on the command line. For example:
!MESSAGE
!MESSAGE NMAKE /f "FindRsrc_MSVC.mak" CFG="FindRsrc - Win32 Debug"
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
!MESSAGE "FindRsrc - Win32 Release" (based on "Win32 (x86) Console Application")
!MESSAGE "FindRsrc - Win32 Debug" (based on "Win32 (x86) Console Application")
!MESSAGE
# Begin Project
# PROP AllowPerConfigDependencies 0
# PROP Scc_ProjName ""
# PROP Scc_LocalPath ""
CPP=cl.exe
RSC=rc.exe
!IF "$(CFG)" == "FindRsrc - Win32 Release"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 0
# PROP BASE Output_Dir "Release"
# PROP BASE Intermediate_Dir "Release"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
# PROP Output_Dir "Release"
# PROP Intermediate_Dir "Release"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
# ADD CPP /nologo /W3 /GX /O2 /I "$(VXIPNPPATH)\WinNT\include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
# ADD BASE RSC /l 0x409 /d "NDEBUG"
# ADD RSC /l 0x409 /d "NDEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
# ADD LINK32 kernel32.lib user32.lib gdi32.lib advapi32.lib shell32.lib /nologo /subsystem:console /map /machine:I386 /out:"Release/FindRsrc.exe"
!ELSEIF "$(CFG)" == "FindRsrc - Win32 Debug"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 1
# PROP BASE Output_Dir "Debug"
# PROP BASE Intermediate_Dir "Debug"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 1
# PROP Output_Dir "Debug"
# PROP Intermediate_Dir "Debug"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "$(VXIPNPPATH)\WinNT\include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
# ADD BASE RSC /l 0x409 /d "_DEBUG"
# ADD RSC /l 0x409 /d "_DEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
# ADD LINK32 kernel32.lib user32.lib gdi32.lib advapi32.lib shell32.lib /nologo /subsystem:console /map /debug /machine:I386 /out:"Debug/FindRsrc.exe" /pdbtype:sept
# SUBTRACT LINK32 /pdb:none
!ENDIF
# Begin Target
# Name "FindRsrc - Win32 Release"
# Name "FindRsrc - Win32 Debug"
# Begin Group "Source Files"
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
# Begin Source File
SOURCE=.\FindRsrc.c
# End Source File
# End Group
# Begin Group "Header Files"
# PROP Default_Filter "h;hpp;hxx;hm;inl"
# Begin Source File
SOURCE=$(VXIPNPPATH)\WinNT\include\visa.h
# End Source File
# Begin Source File
SOURCE=$(VXIPNPPATH)\WinNT\include\visatype.h
# End Source File
# End Group
# Begin Group "Library Files"
# PROP Default_Filter "lib"
# Begin Source File
SOURCE=$(VXIPNPPATH)\WinNT\lib\msc\visa32.lib
# End Source File
# End Group
# End Target
# End Project

View File

@ -0,0 +1,501 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="8.00"
Name="FindRsrc"
ProjectGUID="{93BA1AE2-1344-4B95-993F-16314E4E1832}"
>
<Platforms>
<Platform
Name="Win32"
/>
<Platform
Name="x64"
/>
</Platforms>
<ToolFiles>
</ToolFiles>
<Configurations>
<Configuration
Name="Release|Win32"
OutputDirectory="$(PlatformName)\$(ConfigurationName)"
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
ConfigurationType="1"
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="false"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
TypeLibraryName="$(PlatformName)\$(ConfigurationName)/FindRsrc_MSVC.tlb"
HeaderFileName=""
/>
<Tool
Name="VCCLCompilerTool"
Optimization="2"
InlineFunctionExpansion="1"
AdditionalIncludeDirectories="$(VXIPNPPATH)\WinNT\include"
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
StringPooling="true"
RuntimeLibrary="0"
EnableFunctionLevelLinking="true"
PrecompiledHeaderFile="$(PlatformName)\$(ConfigurationName)/FindRsrc_MSVC.pch"
AssemblerListingLocation="$(PlatformName)\$(ConfigurationName)/"
ObjectFile="$(PlatformName)\$(ConfigurationName)/"
ProgramDataBaseFileName="$(PlatformName)\$(ConfigurationName)/"
WarningLevel="3"
SuppressStartupBanner="true"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="NDEBUG"
Culture="1033"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
OutputFile="$(PlatformName)\$(ConfigurationName)/FindRsrc.exe"
LinkIncremental="1"
SuppressStartupBanner="true"
ProgramDatabaseFile="$(PlatformName)\$(ConfigurationName)/FindRsrc.pdb"
GenerateMapFile="true"
MapFileName="$(PlatformName)\$(ConfigurationName)/FindRsrc.map"
SubSystem="1"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
SuppressStartupBanner="true"
OutputFile="$(PlatformName)\$(ConfigurationName)/FindRsrc_MSVC.bsc"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCWebDeploymentTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Debug|Win32"
OutputDirectory="$(PlatformName)\$(ConfigurationName)"
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
ConfigurationType="1"
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="false"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
TypeLibraryName="$(PlatformName)\$(ConfigurationName)/FindRsrc_MSVC.tlb"
HeaderFileName=""
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="$(VXIPNPPATH)\WinNT\include"
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
PrecompiledHeaderFile="$(PlatformName)\$(ConfigurationName)/FindRsrc_MSVC.pch"
AssemblerListingLocation="$(PlatformName)\$(ConfigurationName)/"
ObjectFile="$(PlatformName)\$(ConfigurationName)/"
ProgramDataBaseFileName="$(PlatformName)\$(ConfigurationName)/"
WarningLevel="3"
SuppressStartupBanner="true"
DebugInformationFormat="4"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="_DEBUG"
Culture="1033"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
OutputFile="$(PlatformName)\$(ConfigurationName)/FindRsrc.exe"
LinkIncremental="2"
SuppressStartupBanner="true"
GenerateDebugInformation="true"
ProgramDatabaseFile="$(PlatformName)\$(ConfigurationName)/FindRsrc.pdb"
GenerateMapFile="true"
MapFileName="$(PlatformName)\$(ConfigurationName)/FindRsrc.map"
SubSystem="1"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
SuppressStartupBanner="true"
OutputFile="$(PlatformName)\$(ConfigurationName)/FindRsrc_MSVC.bsc"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCWebDeploymentTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Release|x64"
OutputDirectory="$(PlatformName)\$(ConfigurationName)"
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
ConfigurationType="1"
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="false"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
TargetEnvironment="3"
TypeLibraryName="$(PlatformName)\$(ConfigurationName)/FindRsrc_MSVC.tlb"
HeaderFileName=""
/>
<Tool
Name="VCCLCompilerTool"
Optimization="2"
InlineFunctionExpansion="1"
AdditionalIncludeDirectories="$(VXIPNPPATH)\WinNT\include"
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
StringPooling="true"
RuntimeLibrary="0"
EnableFunctionLevelLinking="true"
PrecompiledHeaderFile="$(PlatformName)\$(ConfigurationName)/FindRsrc_MSVC.pch"
AssemblerListingLocation="$(PlatformName)\$(ConfigurationName)/"
ObjectFile="$(PlatformName)\$(ConfigurationName)/"
ProgramDataBaseFileName="$(PlatformName)\$(ConfigurationName)/"
WarningLevel="3"
SuppressStartupBanner="true"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="NDEBUG"
Culture="1033"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
OutputFile="$(PlatformName)\$(ConfigurationName)/FindRsrc.exe"
LinkIncremental="1"
SuppressStartupBanner="true"
ProgramDatabaseFile="$(PlatformName)\$(ConfigurationName)/FindRsrc.pdb"
GenerateMapFile="true"
MapFileName="$(PlatformName)\$(ConfigurationName)/FindRsrc.map"
SubSystem="1"
TargetMachine="17"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
SuppressStartupBanner="true"
OutputFile="$(PlatformName)\$(ConfigurationName)/FindRsrc_MSVC.bsc"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCWebDeploymentTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Debug|x64"
OutputDirectory="$(PlatformName)\$(ConfigurationName)"
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
ConfigurationType="1"
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="false"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
TargetEnvironment="3"
TypeLibraryName="$(PlatformName)\$(ConfigurationName)/FindRsrc_MSVC.tlb"
HeaderFileName=""
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="$(VXIPNPPATH)\WinNT\include"
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
PrecompiledHeaderFile="$(PlatformName)\$(ConfigurationName)/FindRsrc_MSVC.pch"
AssemblerListingLocation="$(PlatformName)\$(ConfigurationName)/"
ObjectFile="$(PlatformName)\$(ConfigurationName)/"
ProgramDataBaseFileName="$(PlatformName)\$(ConfigurationName)/"
WarningLevel="3"
SuppressStartupBanner="true"
DebugInformationFormat="3"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="_DEBUG"
Culture="1033"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
OutputFile="$(PlatformName)\$(ConfigurationName)/FindRsrc.exe"
LinkIncremental="2"
SuppressStartupBanner="true"
GenerateDebugInformation="true"
ProgramDatabaseFile="$(PlatformName)\$(ConfigurationName)/FindRsrc.pdb"
GenerateMapFile="true"
MapFileName="$(PlatformName)\$(ConfigurationName)/FindRsrc.map"
SubSystem="1"
TargetMachine="17"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
SuppressStartupBanner="true"
OutputFile="$(PlatformName)\$(ConfigurationName)/FindRsrc_MSVC.bsc"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCWebDeploymentTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
</Configurations>
<References>
</References>
<Files>
<Filter
Name="Source Files"
Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
>
<File
RelativePath="FindRsrc.c"
>
<FileConfiguration
Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""
/>
</FileConfiguration>
<FileConfiguration
Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""
/>
</FileConfiguration>
<FileConfiguration
Name="Release|x64"
>
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""
/>
</FileConfiguration>
<FileConfiguration
Name="Debug|x64"
>
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""
/>
</FileConfiguration>
</File>
</Filter>
<Filter
Name="Header Files"
Filter="h;hpp;hxx;hm;inl"
>
<File
RelativePath="$(VXIPNPPATH)\WinNT\include\visa.h"
>
</File>
<File
RelativePath="$(VXIPNPPATH)\WinNT\include\visatype.h"
>
</File>
</Filter>
<Filter
Name="Library Files"
Filter="lib"
>
<File
RelativePath="$(VXIPNPPATH)\WinNT\lib\msc\visa32.lib"
>
<FileConfiguration
Name="Debug|x64"
ExcludedFromBuild="true"
>
<Tool
Name="VCCustomBuildTool"
/>
</FileConfiguration>
<FileConfiguration
Name="Release|x64"
ExcludedFromBuild="true"
>
<Tool
Name="VCCustomBuildTool"
/>
</FileConfiguration>
</File>
<File
RelativePath="$(VXIPNPPATH)\WinNT\lib_x64\msc\visa64.lib"
>
<FileConfiguration
Name="Debug|Win32"
ExcludedFromBuild="true"
>
<Tool
Name="VCCustomBuildTool"
/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32"
ExcludedFromBuild="true"
>
<Tool
Name="VCCustomBuildTool"
/>
</FileConfiguration>
</File>
</Filter>
</Files>
<Globals>
</Globals>
</VisualStudioProject>

View File

@ -0,0 +1,211 @@
/********************************************************************/
/* This example demonstrates VISA locking */
/* */
/* In VISA, applications can open multiple sessions to the same */
/* resource simultaneously and access that resource through these */
/* different sessions concurrently. */
/* In some cases, an application may need to restrict other */
/* sessions from accessing that resource. */
/* For example, an application may need to execute a write and a */
/* read operation as an atomic operation so that no other */
/* operations intervene between the write and read operations. */
/* If another application or even this same application were to */
/* perform another write between this first write and read, then it */
/* could put the instrument in an unstable state. */
/* This is where locking becomes convenient. The application can */
/* lock the resource before invoking the write operation and unlock */
/* it after the read operation, to execute them as a single step. */
/* This prevents other applications from accessing the resource */
/* and prevents possible contention. VISA defines locking */
/* to restrict accesses to resources for such special circumstances.*/
/* */
/* The VISA locking mechanism enforces arbitration of accesses to */
/* resources on an individual basis. If a session locks a resource, */
/* operations invoked by other sessions are returned with an error. */
/* */
/* This VI opens two sessions to an instrument and locks the first */
/* session. The first session then writes the String to Write to */
/* the instrument and reads a response of the desired length. */
/* */
/* The second session tries to do the same task but will not */
/* succeed unless the first session is unlocked. */
/* */
/* The general flow of the code is */
/* Open Resource Manager */
/* Open 2 VISA sessions to an instrument */
/* Lock the first session */
/* Read and write to that instrument using the first session */
/* Unlock the first session */
/* Now read and write to the instrument with the second session*/
/* Close the VISA Sessions */
/********************************************************************/
#if defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE)
/* Functions like strcpy are technically not secure because they do */
/* not contain a 'length'. But we disable this warning for the VISA */
/* examples since we never copy more than the actual buffer size. */
#define _CRT_SECURE_NO_DEPRECATE
#endif
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include "visa.h"
static ViSession defaultRM;
static ViSession instr1, instr2;
static ViUInt32 retCount;
static ViUInt32 writeCount;
static ViStatus status;
static unsigned char buffer[100];
static int cchar;
static char stringinput[512];
int main (void)
{
/*
* First we must call viOpenDefaultRM to get the resource manager
* handle. We will store this handle in defaultRM.
*/
status=viOpenDefaultRM (&defaultRM);
if (status < VI_SUCCESS)
{
printf("Could not open a session to the VISA Resource Manager!\n");
exit (EXIT_FAILURE);
}
/*
* Now we will open a session to a GPIB instrument at address 2.
* We must use the handle from viOpenDefaultRM and we must
* also use a string that indicates which instrument to open. This
* is called the instrument descriptor. The format for this string
* can be found in the function panel by right clicking on the
* description parameter. After opening a session to the
* device, we will get a handle to the instrument which we
* will use in later Visa functions. The two parameters in this
* function which are reserved for future functionality.
* These two parameters are given the value VI_NULL.
*/
status = viOpen (defaultRM, "GPIB0::2::INSTR", VI_NULL, VI_NULL, &instr1);
if (status < VI_SUCCESS)
{
printf ("Cannot open a session to the device.\n");
goto Close;
}
/*
* Now we will open another session to a GPIB instrument at address 2.
*/
status = viOpen (defaultRM, "GPIB0::2::INSTR", VI_NULL, VI_NULL, &instr2);
if (status < VI_SUCCESS)
{
printf ("Cannot open a second session to the device.\n");
goto Close;
}
/*
* Now we will lock the first session to the resource using the
* viLock function. Notice that the locking command takes a parameter
* which can be set to VI_EXCLUSIVE_LOCK or VI_SHARED_LOCK. The exclusive
* lock will only let that session access the device until the
* lock is released. The shared locking option uses the last two parameters
* which are set to VI_NULL for the exclusive lock. The first of these
* is a requested access key for the shared lock. The last parameter is
* a return value with the actual key assigned to the lock. If the shared
* lock is used the return actual key value can be used by another session
* for the actual key parameter to gain access to the locked resource.
* Please refer to the NI-VISA User Manual for more information.
*/
status = viLock (instr1, VI_EXCLUSIVE_LOCK, VI_TMO_IMMEDIATE, VI_NULL, VI_NULL);
if (status < VI_SUCCESS)
{
printf("Error locking the session");
goto Close;
}
/*
* Now we will write the string "*IDN?\n" to the device and read back the
* Response from the session that obtained a lock on the resource
*/
strcpy(stringinput,"*IDN?\n");
status = viWrite (instr1, (ViBuf)stringinput, (ViUInt32)strlen(stringinput), &writeCount);
if (status < VI_SUCCESS)
{
printf("Error writing to the device\n");
goto Close;
}
/*
* Now we will attempt to read back a response from the device to
* the identification query that was sent. We will use the viRead
* function to acquire the data. We will try to read back 100 bytes.
* After the data has been read the response is displayed.
*/
status = viRead (instr1, buffer, 100, &retCount);
if (status < VI_SUCCESS)
{
printf("Error reading a response from the device\n");
goto Close;
}
else
{
printf("\nData read: %*s\n",retCount,buffer);
}
/*
* Now we will ask the user if they want to unlock the resource.
* Then we will try the same operations with the second session. If the
* resource is not unlocked these operations will fail as would any attempts
* to modify global attributes by the second session.
*/
printf("Do you wish to unlock the resource so the second session can also access it(y/n)?\n");
cchar = getchar ();
if (cchar == 'y' || cchar == 'Y')
{
status = viUnlock (instr1);
if (status < VI_SUCCESS)
{
printf("Error unlocking the resource\n");
goto Close;
}
}
/*
* Now we will attempt the same read and write sequence we attempted with the first
* session. If the lock was not removed this will fail
*/
status = viWrite (instr2, (ViBuf)stringinput, (ViUInt32)strlen(stringinput), &writeCount);
if (status == VI_ERROR_RSRC_LOCKED)
{
printf("The resource is locked you can't write to it!\n");
}
/*
* Now we will attempt to read back a response from the device to
* the identification query that was sent. We will use the viRead
* function to acquire the data. We will try to read back 100 bytes.
* After the data has been read the response is displayed.
*/
status = viRead (instr2, buffer, 100, &retCount);
if (status == VI_ERROR_RSRC_LOCKED)
{
printf("The resource is still locked you can't read from it!\n");
}
else
{
printf("\nData read: %*s\n",retCount,buffer);
}
Close:
status = viClose(instr1);
status = viClose(instr2);
status = viClose(defaultRM);
printf("Finished closing sessions.\nHit enter to continue.\n");
fflush(stdin);
getchar();
return 0;
}

View File

@ -0,0 +1,115 @@
# Microsoft Developer Studio Project File - Name="Locking" - Package Owner=<4>
# Microsoft Developer Studio Generated Build File, Format Version 6.00
# ** DO NOT EDIT **
# TARGTYPE "Win32 (x86) Console Application" 0x0103
CFG=Locking - Win32 Debug
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
!MESSAGE use the Export Makefile command and run
!MESSAGE
!MESSAGE NMAKE /f "Locking_MSVC.mak".
!MESSAGE
!MESSAGE You can specify a configuration when running NMAKE
!MESSAGE by defining the macro CFG on the command line. For example:
!MESSAGE
!MESSAGE NMAKE /f "Locking_MSVC.mak" CFG="Locking - Win32 Debug"
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
!MESSAGE "Locking - Win32 Release" (based on "Win32 (x86) Console Application")
!MESSAGE "Locking - Win32 Debug" (based on "Win32 (x86) Console Application")
!MESSAGE
# Begin Project
# PROP AllowPerConfigDependencies 0
# PROP Scc_ProjName ""
# PROP Scc_LocalPath ""
CPP=cl.exe
RSC=rc.exe
!IF "$(CFG)" == "Locking - Win32 Release"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 0
# PROP BASE Output_Dir "Release"
# PROP BASE Intermediate_Dir "Release"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
# PROP Output_Dir "Release"
# PROP Intermediate_Dir "Release"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
# ADD CPP /nologo /W3 /GX /O2 /I "$(VXIPNPPATH)\WinNT\include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
# ADD BASE RSC /l 0x409 /d "NDEBUG"
# ADD RSC /l 0x409 /d "NDEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
# ADD LINK32 kernel32.lib user32.lib gdi32.lib advapi32.lib shell32.lib /nologo /subsystem:console /map /machine:I386 /out:"Release/Locking.exe"
!ELSEIF "$(CFG)" == "Locking - Win32 Debug"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 1
# PROP BASE Output_Dir "Debug"
# PROP BASE Intermediate_Dir "Debug"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 1
# PROP Output_Dir "Debug"
# PROP Intermediate_Dir "Debug"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "$(VXIPNPPATH)\WinNT\include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
# ADD BASE RSC /l 0x409 /d "_DEBUG"
# ADD RSC /l 0x409 /d "_DEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
# ADD LINK32 kernel32.lib user32.lib gdi32.lib advapi32.lib shell32.lib /nologo /subsystem:console /map /debug /machine:I386 /out:"Debug/Locking.exe" /pdbtype:sept
# SUBTRACT LINK32 /pdb:none
!ENDIF
# Begin Target
# Name "Locking - Win32 Release"
# Name "Locking - Win32 Debug"
# Begin Group "Source Files"
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
# Begin Source File
SOURCE=.\Locking.c
# End Source File
# End Group
# Begin Group "Header Files"
# PROP Default_Filter "h;hpp;hxx;hm;inl"
# Begin Source File
SOURCE=$(VXIPNPPATH)\WinNT\include\visa.h
# End Source File
# Begin Source File
SOURCE=$(VXIPNPPATH)\WinNT\include\visatype.h
# End Source File
# End Group
# Begin Group "Library Files"
# PROP Default_Filter "lib"
# Begin Source File
SOURCE=$(VXIPNPPATH)\WinNT\lib\msc\visa32.lib
# End Source File
# End Group
# End Target
# End Project

View File

@ -0,0 +1,501 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="8.00"
Name="Locking"
ProjectGUID="{6B2088ED-A867-4708-9067-92E75E092EB5}"
>
<Platforms>
<Platform
Name="Win32"
/>
<Platform
Name="x64"
/>
</Platforms>
<ToolFiles>
</ToolFiles>
<Configurations>
<Configuration
Name="Release|Win32"
OutputDirectory="$(PlatformName)\$(ConfigurationName)"
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
ConfigurationType="1"
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="false"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
TypeLibraryName="$(PlatformName)\$(ConfigurationName)/Locking_MSVC.tlb"
HeaderFileName=""
/>
<Tool
Name="VCCLCompilerTool"
Optimization="2"
InlineFunctionExpansion="1"
AdditionalIncludeDirectories="$(VXIPNPPATH)\WinNT\include"
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
StringPooling="true"
RuntimeLibrary="0"
EnableFunctionLevelLinking="true"
PrecompiledHeaderFile="$(PlatformName)\$(ConfigurationName)/Locking_MSVC.pch"
AssemblerListingLocation="$(PlatformName)\$(ConfigurationName)/"
ObjectFile="$(PlatformName)\$(ConfigurationName)/"
ProgramDataBaseFileName="$(PlatformName)\$(ConfigurationName)/"
WarningLevel="3"
SuppressStartupBanner="true"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="NDEBUG"
Culture="1033"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
OutputFile="$(PlatformName)\$(ConfigurationName)/Locking.exe"
LinkIncremental="1"
SuppressStartupBanner="true"
ProgramDatabaseFile="$(PlatformName)\$(ConfigurationName)/Locking.pdb"
GenerateMapFile="true"
MapFileName="$(PlatformName)\$(ConfigurationName)/Locking.map"
SubSystem="1"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
SuppressStartupBanner="true"
OutputFile="$(PlatformName)\$(ConfigurationName)/Locking_MSVC.bsc"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCWebDeploymentTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Debug|Win32"
OutputDirectory="$(PlatformName)\$(ConfigurationName)"
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
ConfigurationType="1"
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="false"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
TypeLibraryName="$(PlatformName)\$(ConfigurationName)/Locking_MSVC.tlb"
HeaderFileName=""
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="$(VXIPNPPATH)\WinNT\include"
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
PrecompiledHeaderFile="$(PlatformName)\$(ConfigurationName)/Locking_MSVC.pch"
AssemblerListingLocation="$(PlatformName)\$(ConfigurationName)/"
ObjectFile="$(PlatformName)\$(ConfigurationName)/"
ProgramDataBaseFileName="$(PlatformName)\$(ConfigurationName)/"
WarningLevel="3"
SuppressStartupBanner="true"
DebugInformationFormat="4"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="_DEBUG"
Culture="1033"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
OutputFile="$(PlatformName)\$(ConfigurationName)/Locking.exe"
LinkIncremental="2"
SuppressStartupBanner="true"
GenerateDebugInformation="true"
ProgramDatabaseFile="$(PlatformName)\$(ConfigurationName)/Locking.pdb"
GenerateMapFile="true"
MapFileName="$(PlatformName)\$(ConfigurationName)/Locking.map"
SubSystem="1"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
SuppressStartupBanner="true"
OutputFile="$(PlatformName)\$(ConfigurationName)/Locking_MSVC.bsc"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCWebDeploymentTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Release|x64"
OutputDirectory="$(PlatformName)\$(ConfigurationName)"
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
ConfigurationType="1"
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="false"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
TargetEnvironment="3"
TypeLibraryName="$(PlatformName)\$(ConfigurationName)/Locking_MSVC.tlb"
HeaderFileName=""
/>
<Tool
Name="VCCLCompilerTool"
Optimization="2"
InlineFunctionExpansion="1"
AdditionalIncludeDirectories="$(VXIPNPPATH)\WinNT\include"
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
StringPooling="true"
RuntimeLibrary="0"
EnableFunctionLevelLinking="true"
PrecompiledHeaderFile="$(PlatformName)\$(ConfigurationName)/Locking_MSVC.pch"
AssemblerListingLocation="$(PlatformName)\$(ConfigurationName)/"
ObjectFile="$(PlatformName)\$(ConfigurationName)/"
ProgramDataBaseFileName="$(PlatformName)\$(ConfigurationName)/"
WarningLevel="3"
SuppressStartupBanner="true"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="NDEBUG"
Culture="1033"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
OutputFile="$(PlatformName)\$(ConfigurationName)/Locking.exe"
LinkIncremental="1"
SuppressStartupBanner="true"
ProgramDatabaseFile="$(PlatformName)\$(ConfigurationName)/Locking.pdb"
GenerateMapFile="true"
MapFileName="$(PlatformName)\$(ConfigurationName)/Locking.map"
SubSystem="1"
TargetMachine="17"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
SuppressStartupBanner="true"
OutputFile="$(PlatformName)\$(ConfigurationName)/Locking_MSVC.bsc"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCWebDeploymentTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Debug|x64"
OutputDirectory="$(PlatformName)\$(ConfigurationName)"
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
ConfigurationType="1"
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="false"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
TargetEnvironment="3"
TypeLibraryName="$(PlatformName)\$(ConfigurationName)/Locking_MSVC.tlb"
HeaderFileName=""
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="$(VXIPNPPATH)\WinNT\include"
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
PrecompiledHeaderFile="$(PlatformName)\$(ConfigurationName)/Locking_MSVC.pch"
AssemblerListingLocation="$(PlatformName)\$(ConfigurationName)/"
ObjectFile="$(PlatformName)\$(ConfigurationName)/"
ProgramDataBaseFileName="$(PlatformName)\$(ConfigurationName)/"
WarningLevel="3"
SuppressStartupBanner="true"
DebugInformationFormat="3"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="_DEBUG"
Culture="1033"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
OutputFile="$(PlatformName)\$(ConfigurationName)/Locking.exe"
LinkIncremental="2"
SuppressStartupBanner="true"
GenerateDebugInformation="true"
ProgramDatabaseFile="$(PlatformName)\$(ConfigurationName)/Locking.pdb"
GenerateMapFile="true"
MapFileName="$(PlatformName)\$(ConfigurationName)/Locking.map"
SubSystem="1"
TargetMachine="17"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
SuppressStartupBanner="true"
OutputFile="$(PlatformName)\$(ConfigurationName)/Locking_MSVC.bsc"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCWebDeploymentTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
</Configurations>
<References>
</References>
<Files>
<Filter
Name="Source Files"
Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
>
<File
RelativePath="Locking.c"
>
<FileConfiguration
Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""
/>
</FileConfiguration>
<FileConfiguration
Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""
/>
</FileConfiguration>
<FileConfiguration
Name="Release|x64"
>
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""
/>
</FileConfiguration>
<FileConfiguration
Name="Debug|x64"
>
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""
/>
</FileConfiguration>
</File>
</Filter>
<Filter
Name="Header Files"
Filter="h;hpp;hxx;hm;inl"
>
<File
RelativePath="$(VXIPNPPATH)\WinNT\include\visa.h"
>
</File>
<File
RelativePath="$(VXIPNPPATH)\WinNT\include\visatype.h"
>
</File>
</Filter>
<Filter
Name="Library Files"
Filter="lib"
>
<File
RelativePath="$(VXIPNPPATH)\WinNT\lib\msc\visa32.lib"
>
<FileConfiguration
Name="Debug|x64"
ExcludedFromBuild="true"
>
<Tool
Name="VCCustomBuildTool"
/>
</FileConfiguration>
<FileConfiguration
Name="Release|x64"
ExcludedFromBuild="true"
>
<Tool
Name="VCCustomBuildTool"
/>
</FileConfiguration>
</File>
<File
RelativePath="$(VXIPNPPATH)\WinNT\lib_x64\msc\visa64.lib"
>
<FileConfiguration
Name="Debug|Win32"
ExcludedFromBuild="true"
>
<Tool
Name="VCCustomBuildTool"
/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32"
ExcludedFromBuild="true"
>
<Tool
Name="VCCustomBuildTool"
/>
</FileConfiguration>
</File>
</Filter>
</Files>
<Globals>
</Globals>
</VisualStudioProject>

View File

@ -0,0 +1,136 @@
/********************************************************************/
/* Read and Write to an Instrument Example */
/* */
/* This code demonstrates synchronous read and write commands to a */
/* GPIB, serial or message-based VXI instrument using VISA. */
/* */
/* The general flow of the code is */
/* Open Resource Manager */
/* Open VISA Session to an Instrument */
/* Write the Identification Query Using viWrite */
/* Try to Read a Response With viRead */
/* Close the VISA Session */
/********************************************************************/
#if defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE)
/* Functions like strcpy are technically not secure because they do */
/* not contain a 'length'. But we disable this warning for the VISA */
/* examples since we never copy more than the actual buffer size. */
#define _CRT_SECURE_NO_DEPRECATE
#endif
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include "visa.h"
static ViSession defaultRM;
static ViSession instr;
static ViStatus status;
static ViUInt32 retCount;
static ViUInt32 writeCount;
static unsigned char buffer[100];
static char stringinput[512];
/*
* In every source code or header file that you use it is necessary to prototype
* your VISA variables at the beginning of the file. You need to declare the VISA
* session, VISA integers, VISA strings, VISA pointers, and VISA floating variables.
* Remember that if you are prototyping variables that are to be used as part of the
* VISA session that need this prototyping. As an example, above retCount has been
* prototyped as a static variable to this particular module. It is an integer of
* bit length 32. If you are uncertain how to declare your VISA prototypes refer
* to the VISA help under the Section titled Type Assignments Table. The VISA
* help is located in your NI-VISA directory or folder.
*/
int main(void)
{
/*
* First we must call viOpenDefaultRM to get the resource manager
* handle. We will store this handle in defaultRM.
*/
status=viOpenDefaultRM (&defaultRM);
if (status < VI_SUCCESS)
{
printf("Could not open a session to the VISA Resource Manager!\n");
exit (EXIT_FAILURE);
}
/*
* Now we will open a VISA session to a device at Primary Address 2.
* You can use any address for your instrument. In this example we are
* using GPIB Primary Address 2.
*
* We must use the handle from viOpenDefaultRM and we must
* also use a string that indicates which instrument to open. This
* is called the instrument descriptor. The format for this string
* can be found in the NI-VISA User Manual.
* After opening a session to the device, we will get a handle to
* the instrument which we will use in later VISA functions.
* The two parameters in this function which are left blank are
* reserved for future functionality. These two parameters are
* given the value VI_NULL.
*
* This example will also work for serial or VXI instruments by changing
* the instrument descriptor from GPIB0::2::INSTR to ASRL1::INSTR or
* VXI0::2::INSTR depending on the necessary descriptor for your
* instrument.
*/
status = viOpen (defaultRM, "GPIB0::2::INSTR", VI_NULL, VI_NULL, &instr);
if (status < VI_SUCCESS)
{
printf ("Cannot open a session to the device.\n");
goto Close;
}
/*
* Set timeout value to 5000 milliseconds (5 seconds).
*/
status = viSetAttribute (instr, VI_ATTR_TMO_VALUE, 5000);
/*
* At this point we now have a session open to the instrument at
* Primary Address 2. We can use this session handle to write
* an ASCII command to the instrument. We will use the viWrite function
* to send the string "*IDN?", asking for the device's identification.
*/
strcpy(stringinput,"*IDN?");
status = viWrite (instr, (ViBuf)stringinput, (ViUInt32)strlen(stringinput), &writeCount);
if (status < VI_SUCCESS)
{
printf("Error writing to the device\n");
goto Close;
}
/*
* Now we will attempt to read back a response from the device to
* the identification query that was sent. We will use the viRead
* function to acquire the data. We will try to read back 100 bytes.
* After the data has been read the response is displayed.
*/
status = viRead (instr, buffer, 100, &retCount);
if (status < VI_SUCCESS)
{
printf("Error reading a response from the device\n");
}
else
{
printf("Data read: %*s\n",retCount,buffer);
}
/*
* Now we will close the session to the instrument using
* viClose. This operation frees all system resources.
*/
Close:
printf("Closing Sessions\nHit enter to continue.");
fflush(stdin);
getchar();
status = viClose(instr);
status = viClose(defaultRM);
return 0;
}

View File

@ -0,0 +1,115 @@
# Microsoft Developer Studio Project File - Name="RdWrt" - Package Owner=<4>
# Microsoft Developer Studio Generated Build File, Format Version 6.00
# ** DO NOT EDIT **
# TARGTYPE "Win32 (x86) Console Application" 0x0103
CFG=RdWrt - Win32 Debug
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
!MESSAGE use the Export Makefile command and run
!MESSAGE
!MESSAGE NMAKE /f "RdWrt_MSVC.mak".
!MESSAGE
!MESSAGE You can specify a configuration when running NMAKE
!MESSAGE by defining the macro CFG on the command line. For example:
!MESSAGE
!MESSAGE NMAKE /f "RdWrt_MSVC.mak" CFG="RdWrt - Win32 Debug"
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
!MESSAGE "RdWrt - Win32 Release" (based on "Win32 (x86) Console Application")
!MESSAGE "RdWrt - Win32 Debug" (based on "Win32 (x86) Console Application")
!MESSAGE
# Begin Project
# PROP AllowPerConfigDependencies 0
# PROP Scc_ProjName ""
# PROP Scc_LocalPath ""
CPP=cl.exe
RSC=rc.exe
!IF "$(CFG)" == "RdWrt - Win32 Release"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 0
# PROP BASE Output_Dir "Release"
# PROP BASE Intermediate_Dir "Release"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
# PROP Output_Dir "Release"
# PROP Intermediate_Dir "Release"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
# ADD CPP /nologo /W3 /GX /O2 /I "$(VXIPNPPATH)\WinNT\include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
# ADD BASE RSC /l 0x409 /d "NDEBUG"
# ADD RSC /l 0x409 /d "NDEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
# ADD LINK32 kernel32.lib user32.lib gdi32.lib advapi32.lib shell32.lib /nologo /subsystem:console /map /machine:I386 /out:"Release/RdWrt.exe"
!ELSEIF "$(CFG)" == "RdWrt - Win32 Debug"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 1
# PROP BASE Output_Dir "Debug"
# PROP BASE Intermediate_Dir "Debug"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 1
# PROP Output_Dir "Debug"
# PROP Intermediate_Dir "Debug"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "$(VXIPNPPATH)\WinNT\include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
# ADD BASE RSC /l 0x409 /d "_DEBUG"
# ADD RSC /l 0x409 /d "_DEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
# ADD LINK32 kernel32.lib user32.lib gdi32.lib advapi32.lib shell32.lib /nologo /subsystem:console /map /debug /machine:I386 /out:"Debug/RdWrt.exe" /pdbtype:sept
# SUBTRACT LINK32 /pdb:none
!ENDIF
# Begin Target
# Name "RdWrt - Win32 Release"
# Name "RdWrt - Win32 Debug"
# Begin Group "Source Files"
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
# Begin Source File
SOURCE=.\RdWrt.c
# End Source File
# End Group
# Begin Group "Header Files"
# PROP Default_Filter "h;hpp;hxx;hm;inl"
# Begin Source File
SOURCE=$(VXIPNPPATH)\WinNT\include\visa.h
# End Source File
# Begin Source File
SOURCE=$(VXIPNPPATH)\WinNT\include\visatype.h
# End Source File
# End Group
# Begin Group "Library Files"
# PROP Default_Filter "lib"
# Begin Source File
SOURCE=$(VXIPNPPATH)\WinNT\lib\msc\visa32.lib
# End Source File
# End Group
# End Target
# End Project

View File

@ -0,0 +1,501 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="8.00"
Name="RdWrt"
ProjectGUID="{2FA33368-82C2-49B8-AC94-460A34C719C1}"
>
<Platforms>
<Platform
Name="Win32"
/>
<Platform
Name="x64"
/>
</Platforms>
<ToolFiles>
</ToolFiles>
<Configurations>
<Configuration
Name="Debug|Win32"
OutputDirectory="$(PlatformName)\$(ConfigurationName)"
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
ConfigurationType="1"
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="false"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
TypeLibraryName="$(PlatformName)\$(ConfigurationName)/RdWrt_MSVC.tlb"
HeaderFileName=""
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="$(VXIPNPPATH)\WinNT\include"
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
PrecompiledHeaderFile="$(PlatformName)\$(ConfigurationName)/RdWrt_MSVC.pch"
AssemblerListingLocation="$(PlatformName)\$(ConfigurationName)/"
ObjectFile="$(PlatformName)\$(ConfigurationName)/"
ProgramDataBaseFileName="$(PlatformName)\$(ConfigurationName)/"
WarningLevel="3"
SuppressStartupBanner="true"
DebugInformationFormat="4"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="_DEBUG"
Culture="1033"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
OutputFile="$(PlatformName)\$(ConfigurationName)/RdWrt.exe"
LinkIncremental="2"
SuppressStartupBanner="true"
GenerateDebugInformation="true"
ProgramDatabaseFile="$(PlatformName)\$(ConfigurationName)/RdWrt.pdb"
GenerateMapFile="true"
MapFileName="$(PlatformName)\$(ConfigurationName)/RdWrt.map"
SubSystem="1"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
SuppressStartupBanner="true"
OutputFile="$(PlatformName)\$(ConfigurationName)/RdWrt_MSVC.bsc"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCWebDeploymentTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Release|Win32"
OutputDirectory="$(PlatformName)\$(ConfigurationName)"
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
ConfigurationType="1"
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="false"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
TypeLibraryName="$(PlatformName)\$(ConfigurationName)/RdWrt_MSVC.tlb"
HeaderFileName=""
/>
<Tool
Name="VCCLCompilerTool"
Optimization="2"
InlineFunctionExpansion="1"
AdditionalIncludeDirectories="$(VXIPNPPATH)\WinNT\include"
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
StringPooling="true"
RuntimeLibrary="0"
EnableFunctionLevelLinking="true"
PrecompiledHeaderFile="$(PlatformName)\$(ConfigurationName)/RdWrt_MSVC.pch"
AssemblerListingLocation="$(PlatformName)\$(ConfigurationName)/"
ObjectFile="$(PlatformName)\$(ConfigurationName)/"
ProgramDataBaseFileName="$(PlatformName)\$(ConfigurationName)/"
WarningLevel="3"
SuppressStartupBanner="true"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="NDEBUG"
Culture="1033"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
OutputFile="$(PlatformName)\$(ConfigurationName)/RdWrt.exe"
LinkIncremental="1"
SuppressStartupBanner="true"
ProgramDatabaseFile="$(PlatformName)\$(ConfigurationName)/RdWrt.pdb"
GenerateMapFile="true"
MapFileName="$(PlatformName)\$(ConfigurationName)/RdWrt.map"
SubSystem="1"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
SuppressStartupBanner="true"
OutputFile="$(PlatformName)\$(ConfigurationName)/RdWrt_MSVC.bsc"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCWebDeploymentTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Debug|x64"
OutputDirectory="$(PlatformName)\$(ConfigurationName)"
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
ConfigurationType="1"
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="false"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
TargetEnvironment="3"
TypeLibraryName="$(PlatformName)\$(ConfigurationName)/RdWrt_MSVC.tlb"
HeaderFileName=""
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="$(VXIPNPPATH)\WinNT\include"
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
PrecompiledHeaderFile="$(PlatformName)\$(ConfigurationName)/RdWrt_MSVC.pch"
AssemblerListingLocation="$(PlatformName)\$(ConfigurationName)/"
ObjectFile="$(PlatformName)\$(ConfigurationName)/"
ProgramDataBaseFileName="$(PlatformName)\$(ConfigurationName)/"
WarningLevel="3"
SuppressStartupBanner="true"
DebugInformationFormat="3"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="_DEBUG"
Culture="1033"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
OutputFile="$(PlatformName)\$(ConfigurationName)/RdWrt.exe"
LinkIncremental="2"
SuppressStartupBanner="true"
GenerateDebugInformation="true"
ProgramDatabaseFile="$(PlatformName)\$(ConfigurationName)/RdWrt.pdb"
GenerateMapFile="true"
MapFileName="$(PlatformName)\$(ConfigurationName)/RdWrt.map"
SubSystem="1"
TargetMachine="17"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
SuppressStartupBanner="true"
OutputFile="$(PlatformName)\$(ConfigurationName)/RdWrt_MSVC.bsc"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCWebDeploymentTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Release|x64"
OutputDirectory="$(PlatformName)\$(ConfigurationName)"
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
ConfigurationType="1"
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="false"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
TargetEnvironment="3"
TypeLibraryName="$(PlatformName)\$(ConfigurationName)/RdWrt_MSVC.tlb"
HeaderFileName=""
/>
<Tool
Name="VCCLCompilerTool"
Optimization="2"
InlineFunctionExpansion="1"
AdditionalIncludeDirectories="$(VXIPNPPATH)\WinNT\include"
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
StringPooling="true"
RuntimeLibrary="0"
EnableFunctionLevelLinking="true"
PrecompiledHeaderFile="$(PlatformName)\$(ConfigurationName)/RdWrt_MSVC.pch"
AssemblerListingLocation="$(PlatformName)\$(ConfigurationName)/"
ObjectFile="$(PlatformName)\$(ConfigurationName)/"
ProgramDataBaseFileName="$(PlatformName)\$(ConfigurationName)/"
WarningLevel="3"
SuppressStartupBanner="true"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="NDEBUG"
Culture="1033"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
OutputFile="$(PlatformName)\$(ConfigurationName)/RdWrt.exe"
LinkIncremental="1"
SuppressStartupBanner="true"
ProgramDatabaseFile="$(PlatformName)\$(ConfigurationName)/RdWrt.pdb"
GenerateMapFile="true"
MapFileName="$(PlatformName)\$(ConfigurationName)/RdWrt.map"
SubSystem="1"
TargetMachine="17"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
SuppressStartupBanner="true"
OutputFile="$(PlatformName)\$(ConfigurationName)/RdWrt_MSVC.bsc"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCWebDeploymentTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
</Configurations>
<References>
</References>
<Files>
<Filter
Name="Source Files"
Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
>
<File
RelativePath="RdWrt.c"
>
<FileConfiguration
Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""
/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""
/>
</FileConfiguration>
<FileConfiguration
Name="Debug|x64"
>
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""
/>
</FileConfiguration>
<FileConfiguration
Name="Release|x64"
>
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""
/>
</FileConfiguration>
</File>
</Filter>
<Filter
Name="Header Files"
Filter="h;hpp;hxx;hm;inl"
>
<File
RelativePath="$(VXIPNPPATH)\WinNT\include\visa.h"
>
</File>
<File
RelativePath="$(VXIPNPPATH)\WinNT\include\visatype.h"
>
</File>
</Filter>
<Filter
Name="Library Files"
Filter="lib"
>
<File
RelativePath="$(VXIPNPPATH)\WinNT\lib\msc\visa32.lib"
>
<FileConfiguration
Name="Debug|x64"
ExcludedFromBuild="true"
>
<Tool
Name="VCCustomBuildTool"
/>
</FileConfiguration>
<FileConfiguration
Name="Release|x64"
ExcludedFromBuild="true"
>
<Tool
Name="VCCustomBuildTool"
/>
</FileConfiguration>
</File>
<File
RelativePath="$(VXIPNPPATH)\WinNT\lib_x64\msc\visa64.lib"
>
<FileConfiguration
Name="Debug|Win32"
ExcludedFromBuild="true"
>
<Tool
Name="VCCustomBuildTool"
/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32"
ExcludedFromBuild="true"
>
<Tool
Name="VCCustomBuildTool"
/>
</FileConfiguration>
</File>
</Filter>
</Files>
<Globals>
</Globals>
</VisualStudioProject>