![]() |
||||||||
Frequently Asked Questions about "ParaPort.Dll"How to access the ParaPort.dll from a MFC application?To use ParaPort in a MFC Application ( the ParaPortUtility application is one ), you should
A simple MFC sample will be added in release v2.0. How to access the ParaPort.dll from a Visual Basic application?The release v1.3 cannot be used by Visual Basic programs. In release v2.0, the DLL interface will be changed to support Visual Basic. Why do you not supply a "*.lib" file for linking directly your DLL?The library of ParaPort has the form of a "*.dll" file because of the following advantages:
The singleton implementation of class "ParaPortDll" is not the one published.
My implementation of the Singleton is an extension of the singleton published by the four wise men. The Problem of their class is that there is no delete of the allocated memory ( even at end of the process ). Some development utilities verifying, that all allocated memory is also freed, will signal memory leaks at the end of the process. How to read data from parallel port with "ParaPortDll"?
To read data or status register from the parallel port, the corresponding mask members of the "PARAPORT_CYCLE" structure must be set: The following source code reads the bit 2, 3 and 4 of data register ( to read the howl byte, put 0xFF into variable "MaskData" ) and the "PaperEnd" bit of the status register.
A sample "read cycle" will be added in release v2.0 to show this. When executing sample applications, "ParaPort.dll" cannot be found!Please have a look to the source code of the samples. The path of the library file is constant to simplify the source code and may be adapted to the customers target directory structure. In a "good" application, the file name should be variable ( e.g.: configuration file, comand line parameter ). How to access the ParaPort.dll from a .NET / C# application?There is no extra support ( e.g.: classes ) of the .NET framework previewed. Remember how much Microsoft promoted "ActiveX", everybody implemented and now, nobody is talking about it anymore. I will wait that this framework gets stable and see. There should be some technics integrated into C# to access a simple C dynamic link library as ParaPort.dll is. Copyright (c) 2002, 2003, 2004 by Paul R. ADAM, v2.0, read the Terms of Use
|
||||||||
![]() |
||||||||