Products| Download| Order| Support| Search| Contacts| About| Chinese
 
CDNotification
CheckListBox
Color ComboBox
Font List & Combo
MemAccess Library
Zeal ProgressBar

 
 
NTPort Library

Frequently Asked Questions

In addition to following FAQ, we recommend some books which will help you understand how to use NTPort Library to interface with your hardware devices.
  1. How to convert old BASIC program to Visual Basic project?
  2. How to increase the performance under Windows NT/2000/XP?
  3. Does NTPort Library provide the feature similar to Peek and Poke?
  4. Does NTPort Library support .NET platform?
  5. How to get base addresses of a PCI device?
  6. What's the difference between Inp and Inport function?
  7. Do I need zntport.sys under Windows 95/98?
  8. How many files do I need to copy to my client's machine?
  9. Can I use NTPort Library to enable third-party components to work under Windows NT/2000?
  10. Do I need to log as administrator when I use NTPort Library?
  11. What's the meaning of error message "Can't connect to Service Control Manager"?
  12. Does NTPort Library support 64-bit Windows?
  13. Why my program gets a privileged instruction error in fast mode?
  14. Can I use NTPort Library in a 16-bit application?

  1. How to convert old BASIC program to Visual Basic project?

    Q: I have to convert a Qbasic program into a Visual Basic program. Now I got a problem with the Qbasic out command and I want to know if I can solve the problem with you product.

    A:Yes, NTPort Library is an ideal replacement of old BASIC INP or OUT statement. You can change INP function to Inp function and OUT statement to Outp sub procedure.

    Back to top.

  2. How to increase the performance under Windows NT/2000/XP?

    Q: I use Inport and Outport functions, but it seemed both functions are slow when I call them in a long loop under Windows NT/2000. Is there a way to speed up?

    A: If you use Inport and Outport in a long loop, please try SetFastMode, EnablePorts and DisablePorts functions which can increase the performance under Windows NT/2000/XP/Server 2003/Vista (32-bit only). There is a sample called FastMode to demonstrate how to use both functions. The fast mode is not supported under Windows XP/Server 2003/Vista x64 edition.

    Back to top.

  3. Does NTPort Library provide the feature similar to Peek and Poke?

    Q: I need to convert an old BASIC program, which used Peek and Poke. Does your library support these functions?

    A: NTPort Library currently doesn't support memory mapped I/O, but we have another product, MemAccess Library, which is designed to direct access to physical memory.

    Back to top.

  4. Does NTPort Library support .NET platform?
  5. Q: I need to migrate my product to .NET platform. Does NTPort Library support Microsoft .NET?

    A: NTPort Library is fully tested under .NET platform, and the Visual Basic.NET (2002/2003/2005), Visual C#.NET, Borland C#Builder, and Delphi for .NET samples are included. But the DLL file, ntport.dll, is an unmanaged DLL. Please refer to Use with Visual Basic.NET, Use with Visual C#, Using with Delphi for .NET and Using with C#Builder in the help document.

    Back to top.

  6. How to get base addresses of a PCI device?
  7. Q: I use your NTPort Library to write and read to a PCI card. When I put the PCI card into different PCs it gets different addresses. If there where a utility that I could ask:
    - What type of PCI card is present (for example Vendor or Device ID)
    - What all the relevant data is for a card with a specific Vendor/Device ID (for example the Base Address Registers).

    A: Please use another product, MemAccess Library, which supports PCI functions. You can use maGetDeviceBaseAddress function to locate a PCI device and then retrieve all base addresses. And then you can use Inp/Outp functions in NTPort Library to access I/O ports of your PCI device. Please don't use peek or poke functions in MemAccess Library to read or write your I/O ports, because peek or poke functions are designed to use with memory mapped I/O.

    Back to top.

  8. What's the difference between Inp and Inport function?
  9. Q: I notice that there are Inp and Inport function in your library. What's difference?

    A: No difference. We provide pairs of functions with same feature to help programmers convert their old programs with less source code modification. We recommend you use Inp and Outp, because they are slightly fast compared to Inport and Outport.

    Back to top.

  10. Do I need zntport.sys under Windows 95/98/Me?

    Q: I want to use your product under Windows 95/98/Me. Do I need zntport.sys?

    A: No, you needn't. The driver zntport.sys is required only under Windows NT/2000/XP/Server 2003/Vista.

    Back to top.

  11. How many files do I need to copy to my client's machine?

    Q: I copied my program and ntport.dll to my client's Windows NT machine, but it failed to work. After I installed your NTPort Library package, my program worked fine. What files do I need to copy?

    A: You can find all runtime files you need to distribute in NTPort\Redist directory. Under Windows NT/2000/XP/Server 2003/Vista, you need to distribute zntport.sys. Please read Distribution Notes in the help document for details.

    Back to top.

  12. Can I use NTPort Library to enable third party components to work under Windows NT/2000?

    Q: I have a third party component, which can work under Windows 95/98, but it will cause privileged instruction exception under Windows NT/2000/XP. I ensure the component only accesses PC I/O ports. Can I use NTPort Library to enable my component to work under Windows NT/2000/XP?

    A: If the component only accesses PC I/O ports and you know which ports it uses, you can call EnablePorts function before you call the component's functions and call DisablePorts when your program will end.

    Back to top.

  13. Do I need to log as administrator when I use NTPort Library?

    Q: Do I need to log as administrator when I use NTPort Library under Windows NT/2000/XP? We do not want every person who uses our application to have full authority to access every part of the operating system.

    A: From the version 2.1, NTPort Library supports both administrator and non-administrator account, but administrator privileges are required to install NTPort Library on Windows NT/2000/XPServer 2003/Vista. Because Windows NT/2000/XPServer 2003/Vista's limitation, you need more system configuration if the user doesn't have administrative right. Please read Distribution Notes in the help document for details.

    Back to top.

  14. What's the meaning of error message "Can't connect to Service Control Manager"?

    Q: I want to test your NTPort Library, if it is the right for my application. But on an NT4 machine I become following error message, after click the Inport- or Outport button in your Porttest program: "Cant connect to Service Control Manager". Can you tell me what's wrong?

    A: Obviously, you don't have administrative right. From the version 2.1, NTPort Library supports both administrator and non-administrator account, but because Windows NT/2000/XP limitation, you need more system configuration if the user don't have administrative right. Please read Distribution Notes in the help document for details. You can also refer to GetLastState function about the meaning of other error messages.

  15. Back to top.

  16. Does NTPort Library support 64-bit Windows?

    Q: I want to develop for Windows XP x64 edition. Does your driver support it?

    A: 64-bit Windows requires 64-bit driver. NTPort Library supports Windows XP/Server 2003/Vista x64 edition for both AMD64 and Intel EM64T, but won't support Intel Itanium(IA64) platform. Both 32-bit(x86) driver and x64 driver are included in this version, but only 32-bit DLL is included. We will provide x64 DLL in the future version. Most features are same in 32-bit edition and x64 edition, but fast mode is not supported in x64 edition yet.

    Back to top.
  17. Why my program gets a privileged instruction error in fast mode?

    Q: I am using the NTPort library. I am getting a privileged instruction error at my application. It seamed to me that the cause of this error, was the use of fast mode on Win2000 operating system. How can I resolve this?

    A: Please make sure you call EnablePorts function before you read or write the data using Inport or Outport function when your program is running at fast mode. If you didn't call EnablePorts, you will get a privileged instruction error. When your operations finish, please call DisablePorts function to release the resource. Please refer to our FastMode sample for details. EnablePorts or DisablePorts functions are not required in normal mode.

  18. Back to top.

  19. Can I use NTPort Library in a 16-bit application?

    Q:Can I use NTPort Library in a 16-bit application written with Borland C++ v3.1?

    A: We no longer support 16-bit applications. If you want to use NTPort Library in a 16-bit application, please use Automation or thunk technology. Please refer to following articles in Microsoft Knowledge Base: HOWTO: Call 32-bit Code from 16-bit Code Under Windows 95(Q154093)

  20. Back to top.

     
     
Products| Download | Order | Support | Search | Contacts | About | Chinese Edition
Copyright (c) 1997-2012 Zeal SoftStudio