Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Procedure for the Creation of a New Project Using Simplified TE_USB_FX2_CyAPI.dll

See document "C++ TE_USB_FX2 API reference manual"
http://www.trenz-electronic.de/download/d0/Trenz_Electronic/d1/TE-USB-Suite/d2/generation_3/d3/APIs.html
section 3.0 "API Functions" ("Exported function list" excluded).

A Note on the Header File TE_USB_FX2_CyAPI.h

Two different header files exist.
One is used for the creation of TE_USB_FX2_CyAPI.dll DLL.
Another header file (with the same name) is exported for the creation of application programs that use TE_USB_FX2_CyAPI.dll DLL.
The latter has some additional lines with regard to the former. This happens to solve some problems with the include files in applications.
The lines of difference are the followings (added to TE_USB_FX2_CyAPI.h used for applications).
#pragma once
//#include <WinDef.h> NO, it fails at 32 bit
#include <windows.h>
#include "CyAPI.h"
typedef unsigned char byte;
Internal note: The file to use is in C:\Project3264bit\TE_USB_FX2_CyAPI\FileToExportForApplication

Appendix A : Open the Visual Studio 2010 project

See document "C++ TE_USB_FX2 API reference manual"
http://www.trenz-electronic.de/download/d0/Trenz_Electronic/d1/TE-USB-Suite/d2/generation_3/d3/APIs.html
section 7 "Appendix A : Open the Visual Studio 2010 project".

Appendix B : Use of pdb File (Symbolic Debugging)

See document "C++ TE_USB_FX2 API reference manual"
http://www.trenz-electronic.de/download/d0/Trenz_Electronic/d1/TE-USB-Suite/d2/generation_3/d3/APIs.html
section 8 "Appendix B : use of pdb file (symbolic debugging)".

 

Unmanaged C++ TE_USB_FX2_Open()
of TE_USB_FX2_CyAPI.dll

You can use this function to select the desired module without the need to call TE_USB_FX2_Close() before. Though doing so would not cause any problems.
Close is automatically realized by the TE_USB_FX2_Open() function, if a handle to the driver is already open (i.e. TE_USB_FX2_Open() has been successfully called before).

Managed C# TE_USB_FX2_Open()
of TE_USB_FX2_CyUSB.dll

You can use this function to select the desired module without the need to call TE_USB_FX2_Close() before. This function is not necessary.

Unmanaged C++ TE_USB_FX2_Close()
of TE_USB_FX2_CyAPI.dll

It can be freely called but it is rare that you would ever need to call TE_USB_FX2_Close() explicitly (though doing so would not cause any problems).

Managed C# TE_USB_FX2_Close()
of TE_USB_FX2_CyUSB.dll

It cannot be freely called and it is rare that you would ever need to call TE_USB_FX2_Close() explicitly. Furthermore, if it is used in the wrong way, the program can raise exceptions.