Matlab sample for NTPort Library is released. 
Matlab sample for NTPort Library is demonstrated how to call NTPort Library functions in MatLab. With NTPort Library, You can directly access PC I/O ports in Matlab. This sample is tested in Matlab R2011b.

From Matlab 6.5.1, Matlab provides loadlibrary and calllib functions to call the functions in a DLL.

Please download this sample in the Download section.

[ add comment ]   |  [ 0 trackbacks ]   |  permalink  |  related link  |   ( 3.1 / 80 )
Now you can sumbit a support ticket to our help desk system 
We build a new help desk system at http://www.zealsoft.com/helpdesk/ which is based on MantisBT. Our users can sumbit their support requests to the help desk and track their request progress. Every can create an account and then report their problems or feature requests. We expect this system will improve our users' experience. We are looing forward to your feedback.

[ add comment ]   |  [ 0 trackbacks ]   |  permalink  |  related link  |   ( 3 / 341 )
NTPort Library works under Windows 7 x64 version 
Some users asked whether NTPort Library would work under Windows 7. Under our test, NTPort Library will work under Windows 7 both x86 version and x64 version. The kernel driver model of Windows 7 is same as Windows Vista, so the NTPort Library version 2.8 is compatible with Windows 7 family.

A screen shot of Speaker sample running in Windows 7 SP1 x64 version is shown below.



After NTPort Library driver is installed properly, you can view it in Device Manager under the Non-Plug and Play Drivers category if you check Show hidden devices under the View menu.



But only 32-bit applications can call ntport.dll, we will provide 64-bit ntport.dll soon.

[ 14 comments ] ( 988 views )   |  [ 0 trackbacks ]   |  permalink  |  related link  |   ( 3 / 287 )
MemAccess Library get "Safe to Install" award 
MemAccess Library get "Safe to Install" award from FindMySoft.



MemAccess Library does not contain any spyware, trojans or viruses and it is considered to be "Safe To Install".

[ 13 comments ] ( 2659 views )   |  [ 0 trackbacks ]   |  permalink  |  related link  |   ( 3 / 832 )
Make a ListBox display a different tooltip for each item  
A customer required a sample that make a CheckListBox display a different tooltip for each item. We modified a sample from Aaron Young to demonstrate how to display tooltips for each item in a CheckListBox control.



You can download this sample from here.

[ 10 comments ] ( 12206 views )   |  [ 0 trackbacks ]   |  permalink  |  related link  |   ( 2.9 / 3654 )
How to use ItemBackColor and ItemFont properties in Visual Basic.NET 
A user asked us how to upgrade a Visual Basic 6.0 project of CheckListBox ActiveX control with ItemBackColor and ItemFont properties.

VB.NET doesn't treat ItemForeCOlor and ItemBackColor as common properties, you need use setItemForeColor or setItemBackColor method to change the fore color or back color of an item.

VB.NET program uses a complete new Font object, so you need change your code as followings.

' load in program names
lstProgram.AddItem(" " & ProListName)

lstProgram.set_ItemBackColor(lstProgram.NewIndex, &HC0FFFF)
lstProgram.set_ItemForeColor(lstProgram.NewIndex, &HFFFF00)

Dim fontFamily As New FontFamily("Arial")
Dim oldFont As Font = _
lstProgram.get_ItemFont(lstProgram.NewIndex)
Dim fnt As New Font(fontFamily, oldFont.Size, _
oldFont.Style Or FontStyle.Bold)
lstProgram.set_ItemFont(lstProgram.NewIndex, fnt)


Please refer to following links for more details:
1) How to: Construct Font Families and Fonts
2) Font Constructor

[ 3 comments ] ( 775 views )   |  [ 0 trackbacks ]   |  permalink  |  related link  |   ( 2.9 / 1520 )
How to support higher address than 32767 in C# 
If you use following statement in your C# program:

MessageBox.Show(NTPort.Inp(0xfc00).ToString());

You will get two errors:

Error 1 The best overloaded method match for 'NTPort.Inp(short)' has some invalid arguments
Error 2 Argument '1': cannot convert from 'int' to 'short'


Both errors are caused by incorrect declaration in NTPort.cs. In NTPort.cs, all port addresses are declared as short. We need change them from short to ushort. We only change the data type of port addresses, not other parameters, to keep backwards compatible.

The latest version of NTPort.cs is as follows,


using System;
using System.Runtime.InteropServices;
using System.Text;

/// <summary>
/// C# Class for NTPort Library
/// Copyright (c) 1997-2008 Hai Li, Zeal SoftStudio.
/// E-Mail: support@zealsoft.com
/// Web: http://www.zealsoft.com
/// </summary>
public class NTPort
{
// Returns a value indicating the last operation is successful or not.
// int WINAPI GetLastState(char *s);
[ DllImport( "Ntport.dll", EntryPoint="GetLastState", CharSet=CharSet.Auto )]
public static extern int GetLastState(
[MarshalAs(UnmanagedType.LPStr)] StringBuilder sError );

// Enable your application to read or write specific ports.
// void WINAPI EnablePorts(WORD PortStart, WORD PortStop);
[ DllImport( "Ntport.dll", EntryPoint="EnablePorts", CharSet=CharSet.Auto )]
public static extern void EnablePorts(ushort nPortStart, ushort nPortStop);

// Disable your application to read or write specific ports.
// void WINAPI DisablePorts(WORD PortStart, WORD PortStop);
[ DllImport( "Ntport.dll", EntryPoint="DisablePorts", CharSet=CharSet.Auto )]
public static extern void DisablePorts(ushort nPortStart, ushort nPortStop);

// Returns a value indicates whether the application is running under Windows NT/2000/XP/Server 2003 system.
// BOOL WINAPI IsWinNT();
[ DllImport( "Ntport.dll", EntryPoint="IsWinNT", CharSet=CharSet.Auto )]
public static extern bool IsWinNT();

// Returns a value indicates whether the application is running under 64-bit Windows system.
// BOOL WINAPI IsWin64();
[ DllImport( "Ntport.dll", EntryPoint="IsWin64", CharSet=CharSet.Auto )]
public static extern bool IsWin64();

// Returns a value from specific ports.
// WORD WINAPI Inport(WORD PortNum);
[ DllImport( "Ntport.dll", EntryPoint="Inport", CharSet=CharSet.Auto )]
public static extern byte Inport( ushort nPortAddress );
// WORD WINAPI Inp(WORD PortNum);
[ DllImport( "Ntport.dll", EntryPoint="Inp", CharSet=CharSet.Auto )]
public static extern byte Inp( ushort nPortAddress );
// WORD WINAPI Inpw(WORD PortNum);
[ DllImport( "Ntport.dll", EntryPoint="Inpw", CharSet=CharSet.Auto )]
public static extern short Inpw( ushort nPortAddress );
// WORD WINAPI InportW(WORD PortNum);
[ DllImport( "Ntport.dll", EntryPoint="InportW", CharSet=CharSet.Auto )]
public static extern short InportW( ushort nPortAddress );
// DWORD WINAPI Inpd(WORD PortNum);
[ DllImport( "Ntport.dll", EntryPoint="Inpd", CharSet=CharSet.Auto )]
public static extern short Inpd( ushort nPortAddress );
//DWORD WINAPI InportD(WORD PortNum);
[ DllImport( "Ntport.dll", EntryPoint="InportD", CharSet=CharSet.Auto )]
public static extern int InportD( ushort nPortAddress );

// Write a value to specific ports.
// void WINAPI Outp(WORD PortNum, WORD Data);
[ DllImport( "Ntport.dll", EntryPoint="Outp", CharSet=CharSet.Auto )]
public static extern void Outp( ushort nPortAddress, short nData);
// void WINAPI Outport(WORD PortNum, WORD Data);
[ DllImport( "Ntport.dll", EntryPoint="Outport", CharSet=CharSet.Auto )]
public static extern void Outport( ushort nPortAddress, short nData);
// void WINAPI Outpw(WORD PortNum, WORD Data);
[ DllImport( "Ntport.dll", EntryPoint="Outpw", CharSet=CharSet.Auto )]
public static extern void Outpw( ushort nPortAddress, short nData);
// void WINAPI OutportW(WORD PortNum, WORD Data);
[ DllImport( "Ntport.dll", EntryPoint="OutportW", CharSet=CharSet.Auto )]
public static extern void OutportW( ushort nPortAddress, short nData);
// void WINAPI Outpd(WORD PortNum, DWORD Data);
[ DllImport( "Ntport.dll", EntryPoint="Outpd", CharSet=CharSet.Auto )]
public static extern void Outpd( ushort nPortAddress, int nData);
// void WINAPI OutportD(WORD PortNum, DWORD Data);
[ DllImport( "Ntport.dll", EntryPoint="OutportD", CharSet=CharSet.Auto )]
public static extern void OutportD( ushort nPortAddress, int nData);

// Set the registration information.
// void WINAPI LicenseInfo(LPSTR sUserName, DWORD dwKey);
[ DllImport( "Ntport.dll", EntryPoint="LicenseInfo", CharSet=CharSet.Auto )]
public static extern void LicenseInfo(
[MarshalAs(UnmanagedType.LPStr)]String sUserName, int dwKey);

// Returns the version of NTPort Library.
// WORD WINAPI GetNTPortVersion();
[ DllImport( "Ntport.dll", EntryPoint="GetNTPortVersion", CharSet=CharSet.Auto )]
public static extern short GetNTPortVersion();

// Set the setting of fast mode
// void WINAPI SetFastMode(BOOL bOption);
[ DllImport( "Ntport.dll", EntryPoint="SetFastMode", CharSet=CharSet.Auto )]
public static extern void SetFastMode(bool bOption);

// Get the current setting of fast mode
// BOOL WINAPI GetFastMode();
[ DllImport( "Ntport.dll", EntryPoint="GetFastMode", CharSet=CharSet.Auto )]
public static extern bool GetFastMode();

// Get the base address of LPT port
// WORD WINAPI GetLPTPortAddress(WORD PortNo);
[ DllImport( "Ntport.dll", EntryPoint="GetLPTPortAddress", CharSet=CharSet.Auto )]
public static extern ushort GetLPTPortAddress(short nPortNo);

public const int ERROR_NONE = 0;
public const int ERROR_DRIVER = 2;
public const int ERROR_SCM_CANT_CONNECT = 9998;

public NTPort()
{
//
// TODO: Add constructor logic here
//
}
}


[ 7 comments ] ( 1771 views )   |  [ 0 trackbacks ]   |  permalink  |  related link  |   ( 3 / 373 )
Shortcuts Map editorial award 
Shortcuts Map receives 5 stars award from Best-software4u.



Shortcuts Map will help you to manage hotkeys assigned to shortcuts on the desktop or in the Start menu hierarchy. With the straightforward user interface, you can easily to change a hotkey or find an unused hotkey.

[ 10 comments ] ( 778 views )   |  [ 0 trackbacks ]   |  permalink  |  related link  |   ( 3 / 693 )

Next