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,143 @@
/********************************************************************/
/* Read and Write to a USBTMC Instrument */
/* */
/* This code demonstrates sending synchronous read & write commands */
/* to an USB Test & Measurement Class (USBTMC) instrument using */
/* NI-VISA */
/* The example writes the "*IDN?\n" string to all the USBTMC */
/* devices connected to the system and attempts to read back */
/* results using the write and read functions. */
/* */
/* 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 ViUInt32 numInstrs;
static ViFindList findList;
static ViUInt32 retCount;
static ViUInt32 writeCount;
static ViStatus status;
static char instrResourceString[VI_FIND_BUFLEN];
static unsigned char buffer[100];
static char stringinput[512];
int main(void)
{
int i;
/*
* First we must call viOpenDefaultRM to get the 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);
}
/* Find all the USB TMC VISA resources in our system and store the */
/* number of resources in the system in numInstrs. */
status = viFindRsrc (defaultRM, "USB?*INSTR", &findList, &numInstrs, instrResourceString);
if (status < VI_SUCCESS)
{
printf ("An error occurred while finding resources.\nHit enter to continue.");
fflush(stdin);
getchar();
viClose (defaultRM);
return status;
}
/*
* Now we will open VISA sessions to all USB TMC instruments.
* 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
* descriptor 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 AccessMode and Timeout
* parameters in this function are reserved for future
* functionality. These two parameters are given the value VI_NULL.
*/
for (i=0; i<numInstrs; i++)
{
if (i > 0)
viFindNext (findList, instrResourceString);
status = viOpen (defaultRM, instrResourceString, VI_NULL, VI_NULL, &instr);
if (status < VI_SUCCESS)
{
printf ("Cannot open a session to the device %d.\n", i+1);
continue;
}
/*
* At this point we now have a session open to the USB TMC instrument.
* We will now use the viWrite function to send the device the string "*IDN?\n",
* asking for the device's identification.
*/
strcpy (stringinput,"*IDN?\n");
status = viWrite (instr, (ViBuf)stringinput, (ViUInt32)strlen(stringinput), &writeCount);
if (status < VI_SUCCESS)
{
printf ("Error writing to the device %d.\n", i+1);
status = viClose (instr);
continue;
}
/*
* 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.
* This function will stop reading if it finds the termination character
* before it reads 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 %d.\n", i+1);
}
else
{
printf ("\nDevice %d: %*s\n", i+1, retCount, buffer);
}
status = viClose (instr);
}
/*
* Now we will close the session to the instrument using
* viClose. This operation frees all system resources.
*/
status = viClose (defaultRM);
printf ("Hit enter to continue.");
fflush (stdin);
getchar();
return 0;
}

View File

@ -0,0 +1,115 @@
# Microsoft Developer Studio Project File - Name="RdWrtUSBTMC" - Package Owner=<4>
# Microsoft Developer Studio Generated Build File, Format Version 6.00
# ** DO NOT EDIT **
# TARGTYPE "Win32 (x86) Console Application" 0x0103
CFG=RdWrtUSBTMC - 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 "RdWrtUSBTMC_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 "RdWrtUSBTMC_MSVC.mak" CFG="RdWrtUSBTMC - Win32 Debug"
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
!MESSAGE "RdWrtUSBTMC - Win32 Release" (based on "Win32 (x86) Console Application")
!MESSAGE "RdWrtUSBTMC - 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)" == "RdWrtUSBTMC - 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/RdWrtUSBTMC.exe"
!ELSEIF "$(CFG)" == "RdWrtUSBTMC - 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/RdWrtUSBTMC.exe" /pdbtype:sept
# SUBTRACT LINK32 /pdb:none
!ENDIF
# Begin Target
# Name "RdWrtUSBTMC - Win32 Release"
# Name "RdWrtUSBTMC - Win32 Debug"
# Begin Group "Source Files"
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
# Begin Source File
SOURCE=.\RdWrtUSBTMC.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="RdWrtUSBTMC"
ProjectGUID="{373DBF7A-ADAD-43D1-B9A1-DDC7421C5B4F}"
>
<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)/RdWrtUSBTMC_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)/RdWrtUSBTMC_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)/RdWrtUSBTMC.exe"
LinkIncremental="2"
SuppressStartupBanner="true"
GenerateDebugInformation="true"
ProgramDatabaseFile="$(PlatformName)\$(ConfigurationName)/RdWrtUSBTMC.pdb"
GenerateMapFile="true"
MapFileName="$(PlatformName)\$(ConfigurationName)/RdWrtUSBTMC.map"
SubSystem="1"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
SuppressStartupBanner="true"
OutputFile="$(PlatformName)\$(ConfigurationName)/RdWrtUSBTMC_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)/RdWrtUSBTMC_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)/RdWrtUSBTMC_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)/RdWrtUSBTMC.exe"
LinkIncremental="1"
SuppressStartupBanner="true"
ProgramDatabaseFile="$(PlatformName)\$(ConfigurationName)/RdWrtUSBTMC.pdb"
GenerateMapFile="true"
MapFileName="$(PlatformName)\$(ConfigurationName)/RdWrtUSBTMC.map"
SubSystem="1"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
SuppressStartupBanner="true"
OutputFile="$(PlatformName)\$(ConfigurationName)/RdWrtUSBTMC_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)/RdWrtUSBTMC_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)/RdWrtUSBTMC_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)/RdWrtUSBTMC.exe"
LinkIncremental="2"
SuppressStartupBanner="true"
GenerateDebugInformation="true"
ProgramDatabaseFile="$(PlatformName)\$(ConfigurationName)/RdWrtUSBTMC.pdb"
GenerateMapFile="true"
MapFileName="$(PlatformName)\$(ConfigurationName)/RdWrtUSBTMC.map"
SubSystem="1"
TargetMachine="17"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
SuppressStartupBanner="true"
OutputFile="$(PlatformName)\$(ConfigurationName)/RdWrtUSBTMC_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)/RdWrtUSBTMC_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)/RdWrtUSBTMC_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)/RdWrtUSBTMC.exe"
LinkIncremental="1"
SuppressStartupBanner="true"
ProgramDatabaseFile="$(PlatformName)\$(ConfigurationName)/RdWrtUSBTMC.pdb"
GenerateMapFile="true"
MapFileName="$(PlatformName)\$(ConfigurationName)/RdWrtUSBTMC.map"
SubSystem="1"
TargetMachine="17"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
SuppressStartupBanner="true"
OutputFile="$(PlatformName)\$(ConfigurationName)/RdWrtUSBTMC_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="RdWrtUSBTMC.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>

View File

@ -0,0 +1,410 @@
/*********************************************************************/
/* This example demonstrates how you may query the USB RAW devices */
/* and list the descriptors associated with those devices. */
/* */
/* The general flow of the code is */
/* Open Resource Manager */
/* Use viFindRsrc() to query available USB RAW instrument */
/* Open a session to the device found */
/* Display the descriptors for this device */
/* Repeat process with the next instrument using viFindNext() */
/* Close all VISA Sessions */
/*********************************************************************/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "visa.h"
/* Defines */
#define USB_REQUESTTYPE_GET_DESCRIPTOR 0x80
#define USB_REQUEST_GET_DESCRIPTOR 6
#define USB_DESCRIPTOR_TYPE_DEVICE 0x01
#define USB_DESCRIPTOR_TYPE_CONFIG 0x02
#define USB_DESCRIPTOR_TYPE_STRING 0x03
#define USB_DESCRIPTOR_TYPE_INTERFACE 0x04
#define USB_DESCRIPTOR_TYPE_ENDPOINT 0x05
#define USB_DESCRIPTOR_LANGUAGE_ENGLISH 0x0409
/* Typedefs */
typedef struct {
ViUInt8 bLength;
ViUInt8 bDescriptorType;
ViUInt16 bcdUSB;
ViUInt8 bDeviceClass;
ViUInt8 bDeviceSubClass;
ViUInt8 bDeviceProtocol;
ViUInt8 bMaxPacketSize0;
ViUInt16 idVendor;
ViUInt16 idProduct;
ViUInt16 bcdDevice;
ViUInt8 iManufacturer;
ViUInt8 iProduct;
ViUInt8 iSerialNumber;
ViUInt8 bNumConfigurations;
} tUsbDeviceDesc;
typedef struct {
ViUInt8 bLength;
ViUInt8 bDescriptorType;
ViUInt16 wTotalLength;
ViUInt8 bNumInterfaces;
ViUInt8 bConfigurationValue;
ViUInt8 iConfiguration;
ViUInt8 bmAttributes;
ViUInt8 MaxPower;
} tUsbConfigDesc;
typedef struct {
ViUInt8 bLength;
ViUInt8 bDescriptorType;
ViUInt8 bInterfaceNumber;
ViUInt8 bAlternateSetting;
ViUInt8 bNumEndpoints;
ViUInt8 bInterfaceClass;
ViUInt8 bInterfaceSubClass;
ViUInt8 bInterfaceProtocol;
ViUInt8 iInterface;
} tUsbInterfaceDesc;
typedef struct {
ViUInt8 bLength;
ViUInt8 bDescriptorType;
ViUInt8 bEndpointAddress;
ViUInt8 bmAttributes;
ViUInt16 wMaxPacketSize;
ViUInt8 bInterval;
} tUsbEndpointDesc ;
typedef struct {
ViUInt8 bLength;
ViUInt8 bDescriptorType;
} tUsbCommonDesc;
/* Prototypes */
void GetStringDescriptor(ViUInt8 stringIndex, ViString stringDesc);
void DisplayEndPointTransferType(ViUInt8 bmAttr);
void DisplayDeviceDescriptor(ViSession instrHandle);
void DisplayConfigDescriptor(ViSession instrHandle);
void TraverseConfigDescriptor(ViChar* configDesc);
/* Variables */
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 RAW USB VISA resources in our system and store the */
/* number of resources in the system in numInstrs. */
status = viFindRsrc (defaultRM, "USB?*RAW", &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 USB RAW instruments found:\n\n",numInstrs);
printf("%s \n\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
{
DisplayDeviceDescriptor(instr);
DisplayConfigDescriptor(instr);
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
{
DisplayDeviceDescriptor(instr);
DisplayConfigDescriptor(instr);
viClose (instr);
}
} /* end while */
status = viClose(findList);
status = viClose(defaultRM);
printf ("\nHit enter to continue.");
fflush(stdin);
getchar();
return 0;
}
/*********************************************************************/
/* Retrieve the string descriptor for the device */
/* stringIndex: input parameter containing the index for the string */
/* descriptor */
/* stringDesc: output buffer to hold the string descriptor */
/*********************************************************************/
void GetStringDescriptor(ViUInt8 stringIndex, ViString stringDesc)
{
ViUInt16 inBuffer[VI_FIND_BUFLEN];
ViUInt16 stringDescLen;
ViUInt16 retCount;
ViUInt16 i;
tUsbCommonDesc inBufferHeader;
ViStatus status;
/* Query the length of the string package */
status = viUsbControlIn (instr, USB_REQUESTTYPE_GET_DESCRIPTOR, USB_REQUEST_GET_DESCRIPTOR,
USB_DESCRIPTOR_TYPE_STRING << 8 | stringIndex, USB_DESCRIPTOR_LANGUAGE_ENGLISH, 2, (ViPBuf)&inBufferHeader, &retCount);
if (status < VI_SUCCESS)
{
printf("An error occured when retrieving string descriptor header.\n");
}
if (inBufferHeader.bLength > sizeof(inBuffer))
{
stringDesc[0] = '\0';
printf ("String descriptor size %hu greater than maximum supported size %hu\n",inBufferHeader.bLength,sizeof(inBuffer));
return;
}
/* Query the String Descriptor */
status = viUsbControlIn (instr, USB_REQUESTTYPE_GET_DESCRIPTOR, USB_REQUEST_GET_DESCRIPTOR,
USB_DESCRIPTOR_TYPE_STRING << 8 | stringIndex, USB_DESCRIPTOR_LANGUAGE_ENGLISH, inBufferHeader.bLength,
(ViPBuf)inBuffer, &retCount);
if (status < VI_SUCCESS)
{
printf("An error occured when retrieving string descriptor.\n");
}
/* Reformat the string */
stringDescLen = (inBufferHeader.bLength / 2) - 1;
for (i = 0; i < stringDescLen; ++i)
{
stringDesc[i] = (ViChar)inBuffer[i+1];
}
/* Append End of the String */
stringDesc[stringDescLen]='\0';
}
/*********************************************************************/
/* Print the Endpoint Transfer Type to console output */
/* bmAttr: bmAttribute value for the Endpoint */
/*********************************************************************/
void DisplayEndPointTransferType(ViUInt8 bmAttr)
{
switch (bmAttr & 0x03)
{
case 0:
printf("Control");
break;
case 1:
printf("Isochronous");
break;
case 2:
printf("Bulk");
break;
case 3:
printf("Interrupt");
break;
default:
printf("Unrecognized Type");
}
printf("\n");
}
/*********************************************************************/
/* This function queries the device descriptor using the instrument */
/* handle that is passed in. Then it print the device descriptor to */
/* console output */
/*********************************************************************/
void DisplayDeviceDescriptor(ViSession instrHandle)
{
ViUInt16 retCount;
ViChar stringDesc[VI_FIND_BUFLEN];
tUsbDeviceDesc deviceDesc;
ViStatus status;
/* Get Device Descriptor */
status = viUsbControlIn (instrHandle, USB_REQUESTTYPE_GET_DESCRIPTOR, USB_REQUEST_GET_DESCRIPTOR,
USB_DESCRIPTOR_TYPE_DEVICE << 8, 0, sizeof(tUsbDeviceDesc), (ViPBuf)&deviceDesc, &retCount);
if (status < VI_SUCCESS)
{
printf("An error occured when retrieving device descriptor.\n");
}
/* Display Device Descriptor */
printf("*********************\n");
printf("* Device Descriptor *\n");
printf("*********************\n");
printf("bcdUSB:\t\t\t 0x%04X\n",deviceDesc.bcdUSB);
printf("bDeviceClass:\t\t 0x%02X\n",deviceDesc.bDeviceClass);
printf("bDeviceSubClass:\t 0x%02X\n",deviceDesc.bDeviceSubClass);
printf("bDeviceProtocol:\t 0x%02X\n", deviceDesc.bDeviceProtocol);
printf("bMaxPacketSize0:\t 0x%02X\n", deviceDesc.bMaxPacketSize0);
printf("idVendor:\t\t 0x%04X\n", deviceDesc.idVendor);
printf("idProduct:\t\t 0x%04X\n", deviceDesc.idProduct);
printf("bcdDevice:\t\t 0x%04X\n", deviceDesc.bcdDevice);
/* A few Device Descriptor items also could include String Descriptors */
printf("iManufacturer:\t\t 0x%02X\n", deviceDesc.iManufacturer);
if (deviceDesc.iManufacturer != 0)
{
GetStringDescriptor(deviceDesc.iManufacturer,stringDesc);
printf("\t\t\t \"%s\"\n",stringDesc);
}
printf("iProduct:\t\t 0x%02X\n", deviceDesc.iProduct);
if (deviceDesc.iProduct != 0)
{
GetStringDescriptor(deviceDesc.iProduct,stringDesc);
printf("\t\t\t \"%s\"\n",stringDesc);
}
printf("iSerialNumber:\t\t 0x%02X\n", deviceDesc.iSerialNumber);
if (deviceDesc.iSerialNumber != 0)
{
GetStringDescriptor(deviceDesc.iSerialNumber,stringDesc);
printf("\t\t\t \"%s\"\n",stringDesc);
}
printf("bNumConfigurations:\t 0x%02X\n", deviceDesc.bNumConfigurations);
printf("\n");
}
/*********************************************************************/
/* This function queries the config descriptor using the instrument */
/* handle that is passed in. Then it print the config descriptor to */
/* console output */
/*********************************************************************/
void DisplayConfigDescriptor(ViSession instrHandle)
{
tUsbConfigDesc configDescOnly;
ViStatus status;
ViUInt16 retCount;
ViChar configDescComplete[2048];
/* Retrieve the config descriptor */
status = viUsbControlIn(instrHandle, USB_REQUESTTYPE_GET_DESCRIPTOR, USB_REQUEST_GET_DESCRIPTOR,
USB_DESCRIPTOR_TYPE_CONFIG << 8, 0, sizeof(tUsbConfigDesc),
(ViPBuf)&configDescOnly, &retCount);
if (status < VI_SUCCESS)
{
printf("An error occured when retrieving configuration descriptor.\n");
}
if (configDescOnly.wTotalLength > 2048)
{
printf("Actual size of complete configuration descriptor (%lu) is greater than maximum buffer size (%lu)\n", configDescOnly.wTotalLength, 2048);
return;
}
/* Retrieve the entire config descriptors */
status = viUsbControlIn(instrHandle, USB_REQUESTTYPE_GET_DESCRIPTOR, USB_REQUEST_GET_DESCRIPTOR,
USB_DESCRIPTOR_TYPE_CONFIG << 8, 0, configDescOnly.wTotalLength,
(ViPBuf)configDescComplete, &retCount);
if (status < VI_SUCCESS)
{
printf("An error occured when retrieving configuration descriptor.\n");
}
/* Traverse and Display the entire config descriptor */
printf("****************************\n");
printf("* Configuration Descriptor *\n");
printf("****************************\n");
printf("wTotalLength:\t\t 0x%04X\n", configDescOnly.wTotalLength);
printf("bNumInterfaces:\t\t 0x%02X\n", configDescOnly.bNumInterfaces);
printf("bConfigurationValue:\t 0x%02X\n", configDescOnly.bConfigurationValue);
printf("iConfiguration:\t\t 0x%02X\n", configDescOnly.iConfiguration);
printf("bmAttributes:\t\t 0x%02X\n", configDescOnly.bmAttributes);
printf("MaxPower:\t\t 0x%02X\n\n", configDescOnly.MaxPower);
TraverseConfigDescriptor(configDescComplete);
}
/*********************************************************************/
/* This function parses the complete config descriptor. */
/* Then it print the device descriptor to console output. */
/*********************************************************************/
void TraverseConfigDescriptor(ViChar* pConfigDesc)
{
ViUInt16 currentOffset = ((tUsbConfigDesc *)pConfigDesc)->bLength; /* Skip over the config descriptor */
ViUInt16 totalSize = ((tUsbConfigDesc *)pConfigDesc)->wTotalLength;
tUsbInterfaceDesc * pInterfaceDesc;
tUsbEndpointDesc * pEndpointDesc;
while (currentOffset < totalSize)
{
/* Interface Descriptor */
if (((tUsbCommonDesc *)(pConfigDesc + currentOffset))->bDescriptorType == USB_DESCRIPTOR_TYPE_INTERFACE)
{
pInterfaceDesc = (tUsbInterfaceDesc *)(pConfigDesc + currentOffset);
printf("************************\n");
printf("* Interface Descriptor *\n");
printf("************************\n");
printf("bInterfaceNumber:\t 0x%02X\n",pInterfaceDesc->bInterfaceNumber);
printf("bAlternatedSetting:\t 0x%02X\n",pInterfaceDesc->bAlternateSetting);
printf("bNumEndpoints:\t\t 0x%02X\n",pInterfaceDesc->bNumEndpoints);
printf("bInterfaceClass:\t 0x%02X\n",pInterfaceDesc->bInterfaceClass);
printf("bInterfaceSubClass:\t 0x%02X\n",pInterfaceDesc->bInterfaceSubClass);
printf("bInterfaceProtocol:\t 0x%02X\n",pInterfaceDesc->bInterfaceProtocol);
printf("bInterface:\t\t 0x%02X\n",pInterfaceDesc->iInterface);
printf("\n");
}
/* Endpoint Descriptor */
else if (((tUsbCommonDesc *)(pConfigDesc + currentOffset))->bDescriptorType == USB_DESCRIPTOR_TYPE_ENDPOINT)
{
pEndpointDesc = (tUsbEndpointDesc *)(pConfigDesc + currentOffset);
printf("***********************\n");
printf("* Endpoint Descriptor *\n");
printf("***********************\n");
printf("bEndpointAddress:\t 0x%02X\n",pEndpointDesc->bEndpointAddress);
printf("Transfer Type:\t\t ");
DisplayEndPointTransferType(pEndpointDesc->bmAttributes);
printf("wMaxPacketSize:\t\t 0x%02X\n",pEndpointDesc->wMaxPacketSize);
printf("bInterval:\t\t 0x%02X\n",pEndpointDesc->bInterval);
printf("\n");
}
/* update the iterator */
currentOffset += ((tUsbCommonDesc *)(pConfigDesc + currentOffset))->bLength;
}
}

View File

@ -0,0 +1,115 @@
# Microsoft Developer Studio Project File - Name="USBDescriptors" - Package Owner=<4>
# Microsoft Developer Studio Generated Build File, Format Version 6.00
# ** DO NOT EDIT **
# TARGTYPE "Win32 (x86) Console Application" 0x0103
CFG=USBDescriptors - 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 "USBDescriptors_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 "USBDescriptors_MSVC.mak" CFG="USBDescriptors - Win32 Debug"
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
!MESSAGE "USBDescriptors - Win32 Release" (based on "Win32 (x86) Console Application")
!MESSAGE "USBDescriptors - 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)" == "USBDescriptors - 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/USBDescriptors.exe"
!ELSEIF "$(CFG)" == "USBDescriptors - 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/USBDescriptors.exe" /pdbtype:sept
# SUBTRACT LINK32 /pdb:none
!ENDIF
# Begin Target
# Name "USBDescriptors - Win32 Release"
# Name "USBDescriptors - Win32 Debug"
# Begin Group "Source Files"
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
# Begin Source File
SOURCE=.\USBDescriptors.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,493 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="8.00"
Name="USBDescriptors"
ProjectGUID="{02C1C19C-5E65-420B-959C-145A0264F934}"
>
<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)/USBDescriptors_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)/USBDescriptors_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)/USBDescriptors_MSVC.exe"
LinkIncremental="1"
SuppressStartupBanner="true"
ProgramDatabaseFile="$(PlatformName)\$(ConfigurationName)/USBDescriptors_MSVC.pdb"
SubSystem="1"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
SuppressStartupBanner="true"
OutputFile="$(PlatformName)\$(ConfigurationName)/USBDescriptors_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)/USBDescriptors_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)/USBDescriptors_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)/USBDescriptors_MSVC.exe"
LinkIncremental="2"
SuppressStartupBanner="true"
GenerateDebugInformation="true"
ProgramDatabaseFile="$(PlatformName)\$(ConfigurationName)/USBDescriptors_MSVC.pdb"
SubSystem="1"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
SuppressStartupBanner="true"
OutputFile="$(PlatformName)\$(ConfigurationName)/USBDescriptors_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)/USBDescriptors_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)/USBDescriptors_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)/USBDescriptors_MSVC.exe"
LinkIncremental="1"
SuppressStartupBanner="true"
ProgramDatabaseFile="$(PlatformName)\$(ConfigurationName)/USBDescriptors_MSVC.pdb"
SubSystem="1"
TargetMachine="17"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
SuppressStartupBanner="true"
OutputFile="$(PlatformName)\$(ConfigurationName)/USBDescriptors_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)/USBDescriptors_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)/USBDescriptors_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)/USBDescriptors_MSVC.exe"
LinkIncremental="2"
SuppressStartupBanner="true"
GenerateDebugInformation="true"
ProgramDatabaseFile="$(PlatformName)\$(ConfigurationName)/USBDescriptors_MSVC.pdb"
SubSystem="1"
TargetMachine="17"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
SuppressStartupBanner="true"
OutputFile="$(PlatformName)\$(ConfigurationName)/USBDescriptors_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="USBDescriptors.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="Resource Files"
Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
>
<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>