Latest commit

History

5 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

ComPort Library

ComPort Library version 4.11
for Delphi 5, 6, 7, 2005, 2006, 2007, 2010, XE, 10.3
and C++ Builder 3, 4, 5, 6
by Dejan Crnila 1998-2002

maintained by Lars Dybdahl and Paul Doland

maintained by Brian Gochnauer Nov 2010

maintained by Sergey Yushinin (aka Softarius) Apr 2022

1. Author information

Name: Dejan Crnila

E-mail: dejancrn@yahoo.com

Year of birth: 1978

Occupation: Student of computer science at University of Ljubljana

Current maintainers

Name: Lars B. Dybdahl E-mail: Lars@dybdahl.dk Homepage: http://dybdahl.dk/lars/ Year of birth: 1971 Occupation: Freelance programmer

Paul Doland E-mail: cport@pauld.ml1.net

Brian Gochnauer email:brian@gochanuer.net

Sergey Yushinin e-mail: yushinins@mail.ru

2. Support

If you have any questions, suggestions, opinion or any other messages, please visit bug tracker https://github.com/softarius/ComPort/issues.

3. Files in archive

ReadMe.Txt - this file Sources.zip - ComPort Library sources Help.zip - Delphi context-sensitive help file for library Examples.zip - Example projects for Delphi & C++ Builder

4. Examples

ComExample.dpr, ComExampleCB*.bpr - shows some basic send-recieve features

ModTest.dpr - modem test console application

MiniTerm.dpr, MiniTermCB*.bpr - simple terminal application

CPortMonitor.pas - TCPortMonitor component for monitoring incoming and outgoing data. This example shows how to link to TCustomComPort component. Author: Roelof Y. Ensing (e-mail: ensingroel@msn.com).

BarCodeScanner.pas - TBarCodeScanner component. An example of simple TCustomComPort descendant.

5. Package names

Design-Time Source Run-Time Source

Delphi 3 DsgnCPort3.dpk CPortLib3.dpk

Delphi 4 DsgnCPort4.dpk CPortLib4.dpk

Delphi 5 DsgnCPort5.dpk CPortLib5.dpk

Delphi 6 DsgnCPort6.dpk CPortLib6.dpk

Delphi 7 DsgnCPort7.dpk CPortLib7.dpk

Delphi 8 DsgnCPort8.dpk CPortLib8.dpk

Delphi 2005 DsgnCPortD2005.dpk CPortLibD2005.dpk

Delphi 2006 DsgnCPortD2006.dpk CPortLibD2006.dpk

Delphi 2007 DsgnCPortD2007.dpk CPortLibD2007.dpk

Delphi 2008 DsgnCPortD2008.dpk CPortLibD2008.dpk

Delphi 2009 DsgnCPortD2009.dpk CPortLibD2009.dpk

Delphi XE DsgnCPortDXE.dpk CPortLibDXE.dpk

Delphi 10.3 DsgnCPortD2010.dpk CPortLibD2010.dpk

C++ Builder 3 DsgnCPortCB3.bpk CPortLibCB3.bpk

C++ Builder 4 DsgnCPortCB4.bpk CPortLibCB4.bpk

C++ Builder 5 DsgnCPortCB5.bpk CPortLibCB5.bpk

C++ Builder 6 DsgnCPortCB6.bpk CPortLibCB6.bpk

6. Installation

Remove all previously installed files of ComPort Library (TComPort component). Create a new folder under Delphi directory and extract Sources zip file into new folder. Add to the Library Path the new ComPort folder (Tools-Environment Options-Library-Library Path).

For Delphi 2006:

Use the instructions below for all other Delphi versions. But, note that Delphi 2006 supports both Delphi and C++ Builder. I recommend installing CPort while running Delphi 2006 in the "all personalities" mode of Delphi, rather than in the Delphi only personality. That helps make sure CPort gets installed dual-mode, with both Delphi and C++ Builder support. Note that for some reason, I find the .LIB files get stored into the CPort directory instead of the $BDSPROJECTS/BPL directory. So, after you install CPort, double check to make sure the .LIB files are in the right spot.

Finally, the .HPP files also get stored in the CPort directory. Either move them to a folder already in the C++ source path, or add the CPort directory to the C++ source path.

Otherwise, follow the directions below, and also read the C++ Builder notes:

For Delphi 3, 4, 5, 6, 7, 2005 & C++ Builder 4, 5, 6: Delphi version earlier than version 5 have not been tested recently. (C++ Builder users also need to read the C++ Builder notes)

Use "File/Open" menu item in Delphi/C++ Builder IDE to open ComPort run-time package source file (see above). Click "Compile" button in Package window to compile the library. Now move run-time package library file or files (see above) from ComPort folder to a folder that is accessible through the search PATH (e.g. WinNT\System32).

Now you have to install design-time package. Use File/Open menu item to open design-time package source file (see above). Click "Compile" button in Package window to compile the package and "Install" button to register ComPort into the IDE. ComPort components appear in "CPortLib" page of component pallete. If it complains that it can't install it because it can't find a library, you probably did not put the run-time package in the search path. You might not get this error until the next time you try to start Delphi/C++ Builder.

Note: Do not save packages under Delphi/C++ Builder IDE.

For C++ Builder 3 (C++ Builder users also need to read the C++ Builder notes)

C++ Builder 3 does not have a "Package window" like the other products. So, installation is slightly different.

Use "File/Open" menu item in Delphi/C++ Builder IDE to open ComPort run-time package source file (see above). Compile the package from the project menu or Ctrl-F9. Now move run-time package library files (see above) from ComPort folder to a folder that is accessible through the search PATH (e.g. WinNT\System32).

Now you have to install design-time package. Use File/Open menu item to open design-time package source file (see above). Compile the package from the project menu or Ctrl-F9. To install the package into the IDE, go to the Component menu, "Install Packages" option. Click the Add button. Browse to the design-time library and select it. If it complains that it can't install it because it can't find a library, you probably did not put the run-time package in the search path as described above.

Note about Delphi 2:

Note: Delphi 2 is no longer suported, however, with some minor changes, it should compile under Delphi 2 as well.

Use "Component/Install" menu item to add "CPortReg.pas" unit to the component library. This unit registers ComPort components on "CPortLib" page of component pallete.

7. C++ Builder Notes

The .hpp file C++ Builder creates for cport.pas will have a bug in it. The first time you compile a project, you will get one or two duplicate definitions within the EComPort exception class. It seems to be safe to delete or comment out the duplicates.

Also, the CPortCtl.HPP may have a bug in it. If you get an error about the following being ambiguous;

typedef TBitmap TLedBitmap;

Change it to:

typedef Graphics::TBitmap TLedBitmap;

If someone knows how to fix these more cleanly, please post what you find to the CPort Forum so that we can incorporate your findings in future revisions.

8. Installing help file (not available for Delphi2005)

In Delphi/C++ Builder, go to the Help menu, customize item. You should be presented with a tabbed notebook, "Contents" tab selected. Click the + (Add Files) button. Browse to the CPort directory. Select CPort.toc.

Click on the "Index" tab. Click Add Files. Select CPort.hlp. Click on the "Link" tab. Click Add Files. Select CPort.hlp. Select File Menu/Save Project Item. Exit program. Note that Borland's OpenHelp utility does not prompt you if you close the program and forget to save your changes, so you must remember to do so yourself.

9. Known problems and issues

1.) OnRxBuf event handler problem in Delphi IDE

 If user double clicks on OnRxBuf event in Delphi IDE, message pops up saying: "Property and Method ComPort1RxBuf are not compatible".
This is a Delphi IDE bug, since it can't handle untyped parameters like Buffer parameter of OnRxBuf event.
Solution: Application has to assign OnRxBuf handler manually in code. 

2.) Two serial ports sharing the same IRQ address

 Some users of Windows 95/98 have reported that application can't have
two TComPort components open simultaneouslly if serial ports share the
same IRQ address. This usually COM1/COM3 and COM2/COM4.
Solution: Not known yet.

3.) No integrated help for Delphi 2005 or 2006.

 Solution: Manually open .HLP file with Windows Help.

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Add copy buttons to all
 blocks\n(function() {\n function addCopyButtons() {\n document.querySelectorAll('pre code').forEach(function(codeBlock) {\n if (codeBlock.parentElement.hasAttribute('data-copy-added')) return;\n codeBlock.parentElement.setAttribute('data-copy-added', 'true');\n \n var btn = document.createElement('button');\n btn.textContent = 'Copy';\n btn.style.cssText = 'position:absolute;top:4px;right:4px;padding:2px 8px;font-size:11px;background:#4ecdc4;border:none;border-radius:4px;color:#1a1a2e;cursor:pointer;opacity:0.7;transition:opacity 0.2s;';\n btn.onmouseover = function() { this.style.opacity = '1'; };\n btn.onmouseout = function() { this.style.opacity = '0.7'; };\n btn.onclick = function() {\n navigator.clipboard.writeText(codeBlock.textContent).then(function() {\n btn.textContent = 'Copied!';\n setTimeout(function() { btn.textContent = 'Copy'; }, 1500);\n });\n };\n codeBlock.parentElement.style.position = 'relative';\n codeBlock.parentElement.appendChild(btn);\n });\n }\n \n addCopyButtons();\n \n // Re-run on dynamic content\n var observer = new MutationObserver(addCopyButtons);\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Add Copy Buttons to Code Blocks");
}
} catch(__e) { console.warn('[Userscript:Add Copy Buttons to Code Blocks]', __e); }
})();
(function(){
try {
var __m = "github.com";
var __re = new RegExp('^' + "github\\.com" + '
Skip to content

Latest commit

History

5 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

ComPort Library

ComPort Library version 4.11
for Delphi 5, 6, 7, 2005, 2006, 2007, 2010, XE, 10.3
and C++ Builder 3, 4, 5, 6
by Dejan Crnila 1998-2002

maintained by Lars Dybdahl and Paul Doland

maintained by Brian Gochnauer Nov 2010

maintained by Sergey Yushinin (aka Softarius) Apr 2022

1. Author information

Name: Dejan Crnila

E-mail: dejancrn@yahoo.com

Year of birth: 1978

Occupation: Student of computer science at University of Ljubljana

Current maintainers

Name: Lars B. Dybdahl E-mail: Lars@dybdahl.dk Homepage: http://dybdahl.dk/lars/ Year of birth: 1971 Occupation: Freelance programmer

Paul Doland E-mail: cport@pauld.ml1.net

Brian Gochnauer email:brian@gochanuer.net

Sergey Yushinin e-mail: yushinins@mail.ru

2. Support

If you have any questions, suggestions, opinion or any other messages, please visit bug tracker https://github.com/softarius/ComPort/issues.

3. Files in archive

ReadMe.Txt - this file Sources.zip - ComPort Library sources Help.zip - Delphi context-sensitive help file for library Examples.zip - Example projects for Delphi & C++ Builder

4. Examples

ComExample.dpr, ComExampleCB*.bpr - shows some basic send-recieve features

ModTest.dpr - modem test console application

MiniTerm.dpr, MiniTermCB*.bpr - simple terminal application

CPortMonitor.pas - TCPortMonitor component for monitoring incoming and outgoing data. This example shows how to link to TCustomComPort component. Author: Roelof Y. Ensing (e-mail: ensingroel@msn.com).

BarCodeScanner.pas - TBarCodeScanner component. An example of simple TCustomComPort descendant.

5. Package names

Design-Time Source Run-Time Source

Delphi 3 DsgnCPort3.dpk CPortLib3.dpk

Delphi 4 DsgnCPort4.dpk CPortLib4.dpk

Delphi 5 DsgnCPort5.dpk CPortLib5.dpk

Delphi 6 DsgnCPort6.dpk CPortLib6.dpk

Delphi 7 DsgnCPort7.dpk CPortLib7.dpk

Delphi 8 DsgnCPort8.dpk CPortLib8.dpk

Delphi 2005 DsgnCPortD2005.dpk CPortLibD2005.dpk

Delphi 2006 DsgnCPortD2006.dpk CPortLibD2006.dpk

Delphi 2007 DsgnCPortD2007.dpk CPortLibD2007.dpk

Delphi 2008 DsgnCPortD2008.dpk CPortLibD2008.dpk

Delphi 2009 DsgnCPortD2009.dpk CPortLibD2009.dpk

Delphi XE DsgnCPortDXE.dpk CPortLibDXE.dpk

Delphi 10.3 DsgnCPortD2010.dpk CPortLibD2010.dpk

C++ Builder 3 DsgnCPortCB3.bpk CPortLibCB3.bpk

C++ Builder 4 DsgnCPortCB4.bpk CPortLibCB4.bpk

C++ Builder 5 DsgnCPortCB5.bpk CPortLibCB5.bpk

C++ Builder 6 DsgnCPortCB6.bpk CPortLibCB6.bpk

6. Installation

Remove all previously installed files of ComPort Library (TComPort component). Create a new folder under Delphi directory and extract Sources zip file into new folder. Add to the Library Path the new ComPort folder (Tools-Environment Options-Library-Library Path).

For Delphi 2006:

Use the instructions below for all other Delphi versions. But, note that Delphi 2006 supports both Delphi and C++ Builder. I recommend installing CPort while running Delphi 2006 in the "all personalities" mode of Delphi, rather than in the Delphi only personality. That helps make sure CPort gets installed dual-mode, with both Delphi and C++ Builder support. Note that for some reason, I find the .LIB files get stored into the CPort directory instead of the $BDSPROJECTS/BPL directory. So, after you install CPort, double check to make sure the .LIB files are in the right spot.

Finally, the .HPP files also get stored in the CPort directory. Either move them to a folder already in the C++ source path, or add the CPort directory to the C++ source path.

Otherwise, follow the directions below, and also read the C++ Builder notes:

For Delphi 3, 4, 5, 6, 7, 2005 & C++ Builder 4, 5, 6: Delphi version earlier than version 5 have not been tested recently. (C++ Builder users also need to read the C++ Builder notes)

Use "File/Open" menu item in Delphi/C++ Builder IDE to open ComPort run-time package source file (see above). Click "Compile" button in Package window to compile the library. Now move run-time package library file or files (see above) from ComPort folder to a folder that is accessible through the search PATH (e.g. WinNT\System32).

Now you have to install design-time package. Use File/Open menu item to open design-time package source file (see above). Click "Compile" button in Package window to compile the package and "Install" button to register ComPort into the IDE. ComPort components appear in "CPortLib" page of component pallete. If it complains that it can't install it because it can't find a library, you probably did not put the run-time package in the search path. You might not get this error until the next time you try to start Delphi/C++ Builder.

Note: Do not save packages under Delphi/C++ Builder IDE.

For C++ Builder 3 (C++ Builder users also need to read the C++ Builder notes)

C++ Builder 3 does not have a "Package window" like the other products. So, installation is slightly different.

Use "File/Open" menu item in Delphi/C++ Builder IDE to open ComPort run-time package source file (see above). Compile the package from the project menu or Ctrl-F9. Now move run-time package library files (see above) from ComPort folder to a folder that is accessible through the search PATH (e.g. WinNT\System32).

Now you have to install design-time package. Use File/Open menu item to open design-time package source file (see above). Compile the package from the project menu or Ctrl-F9. To install the package into the IDE, go to the Component menu, "Install Packages" option. Click the Add button. Browse to the design-time library and select it. If it complains that it can't install it because it can't find a library, you probably did not put the run-time package in the search path as described above.

Note about Delphi 2:

Note: Delphi 2 is no longer suported, however, with some minor changes, it should compile under Delphi 2 as well.

Use "Component/Install" menu item to add "CPortReg.pas" unit to the component library. This unit registers ComPort components on "CPortLib" page of component pallete.

7. C++ Builder Notes

The .hpp file C++ Builder creates for cport.pas will have a bug in it. The first time you compile a project, you will get one or two duplicate definitions within the EComPort exception class. It seems to be safe to delete or comment out the duplicates.

Also, the CPortCtl.HPP may have a bug in it. If you get an error about the following being ambiguous;

typedef TBitmap TLedBitmap;

Change it to:

typedef Graphics::TBitmap TLedBitmap;

If someone knows how to fix these more cleanly, please post what you find to the CPort Forum so that we can incorporate your findings in future revisions.

8. Installing help file (not available for Delphi2005)

In Delphi/C++ Builder, go to the Help menu, customize item. You should be presented with a tabbed notebook, "Contents" tab selected. Click the + (Add Files) button. Browse to the CPort directory. Select CPort.toc.

Click on the "Index" tab. Click Add Files. Select CPort.hlp. Click on the "Link" tab. Click Add Files. Select CPort.hlp. Select File Menu/Save Project Item. Exit program. Note that Borland's OpenHelp utility does not prompt you if you close the program and forget to save your changes, so you must remember to do so yourself.

9. Known problems and issues

1.) OnRxBuf event handler problem in Delphi IDE

 If user double clicks on OnRxBuf event in Delphi IDE, message pops up saying: "Property and Method ComPort1RxBuf are not compatible".
This is a Delphi IDE bug, since it can't handle untyped parameters like Buffer parameter of OnRxBuf event.
Solution: Application has to assign OnRxBuf handler manually in code. 

2.) Two serial ports sharing the same IRQ address

 Some users of Windows 95/98 have reported that application can't have
two TComPort components open simultaneouslly if serial ports share the
same IRQ address. This usually COM1/COM3 and COM2/COM4.
Solution: Not known yet.

3.) No integrated help for Delphi 2005 or 2006.

 Solution: Manually open .HLP file with Windows Help.

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Force GitHub README to respect dark mode\n(function() {\n var style = document.createElement('style');\n style.textContent = '\n .markdown-body {\n color-scheme: dark light;\n }\n .markdown-body pre { background: #161b22 !important; }\n .markdown-body code { background: rgba(110, 118, 129, 0.4) !important; }\n .markdown-body table th, .markdown-body table td { border-color: #30363d !important; }\n .markdown-body img { background: #0d1117; }\n .markdown-body blockquote { border-left-color: #8b949e; }\n .markdown-body hr { border-color: #30363d; }\n ';\n document.head.appendChild(style);\n})();", "GitHub Dark Mode README Fix"); } } catch(__e) { console.warn('[Userscript:GitHub Dark Mode README Fix]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

Latest commit

History

5 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

ComPort Library

ComPort Library version 4.11
for Delphi 5, 6, 7, 2005, 2006, 2007, 2010, XE, 10.3
and C++ Builder 3, 4, 5, 6
by Dejan Crnila 1998-2002

maintained by Lars Dybdahl and Paul Doland

maintained by Brian Gochnauer Nov 2010

maintained by Sergey Yushinin (aka Softarius) Apr 2022

1. Author information

Name: Dejan Crnila

E-mail: dejancrn@yahoo.com

Year of birth: 1978

Occupation: Student of computer science at University of Ljubljana

Current maintainers

Name: Lars B. Dybdahl E-mail: Lars@dybdahl.dk Homepage: http://dybdahl.dk/lars/ Year of birth: 1971 Occupation: Freelance programmer

Paul Doland E-mail: cport@pauld.ml1.net

Brian Gochnauer email:brian@gochanuer.net

Sergey Yushinin e-mail: yushinins@mail.ru

2. Support

If you have any questions, suggestions, opinion or any other messages, please visit bug tracker https://github.com/softarius/ComPort/issues.

3. Files in archive

ReadMe.Txt - this file Sources.zip - ComPort Library sources Help.zip - Delphi context-sensitive help file for library Examples.zip - Example projects for Delphi & C++ Builder

4. Examples

ComExample.dpr, ComExampleCB*.bpr - shows some basic send-recieve features

ModTest.dpr - modem test console application

MiniTerm.dpr, MiniTermCB*.bpr - simple terminal application

CPortMonitor.pas - TCPortMonitor component for monitoring incoming and outgoing data. This example shows how to link to TCustomComPort component. Author: Roelof Y. Ensing (e-mail: ensingroel@msn.com).

BarCodeScanner.pas - TBarCodeScanner component. An example of simple TCustomComPort descendant.

5. Package names

Design-Time Source Run-Time Source

Delphi 3 DsgnCPort3.dpk CPortLib3.dpk

Delphi 4 DsgnCPort4.dpk CPortLib4.dpk

Delphi 5 DsgnCPort5.dpk CPortLib5.dpk

Delphi 6 DsgnCPort6.dpk CPortLib6.dpk

Delphi 7 DsgnCPort7.dpk CPortLib7.dpk

Delphi 8 DsgnCPort8.dpk CPortLib8.dpk

Delphi 2005 DsgnCPortD2005.dpk CPortLibD2005.dpk

Delphi 2006 DsgnCPortD2006.dpk CPortLibD2006.dpk

Delphi 2007 DsgnCPortD2007.dpk CPortLibD2007.dpk

Delphi 2008 DsgnCPortD2008.dpk CPortLibD2008.dpk

Delphi 2009 DsgnCPortD2009.dpk CPortLibD2009.dpk

Delphi XE DsgnCPortDXE.dpk CPortLibDXE.dpk

Delphi 10.3 DsgnCPortD2010.dpk CPortLibD2010.dpk

C++ Builder 3 DsgnCPortCB3.bpk CPortLibCB3.bpk

C++ Builder 4 DsgnCPortCB4.bpk CPortLibCB4.bpk

C++ Builder 5 DsgnCPortCB5.bpk CPortLibCB5.bpk

C++ Builder 6 DsgnCPortCB6.bpk CPortLibCB6.bpk

6. Installation

Remove all previously installed files of ComPort Library (TComPort component). Create a new folder under Delphi directory and extract Sources zip file into new folder. Add to the Library Path the new ComPort folder (Tools-Environment Options-Library-Library Path).

For Delphi 2006:

Use the instructions below for all other Delphi versions. But, note that Delphi 2006 supports both Delphi and C++ Builder. I recommend installing CPort while running Delphi 2006 in the "all personalities" mode of Delphi, rather than in the Delphi only personality. That helps make sure CPort gets installed dual-mode, with both Delphi and C++ Builder support. Note that for some reason, I find the .LIB files get stored into the CPort directory instead of the $BDSPROJECTS/BPL directory. So, after you install CPort, double check to make sure the .LIB files are in the right spot.

Finally, the .HPP files also get stored in the CPort directory. Either move them to a folder already in the C++ source path, or add the CPort directory to the C++ source path.

Otherwise, follow the directions below, and also read the C++ Builder notes:

For Delphi 3, 4, 5, 6, 7, 2005 & C++ Builder 4, 5, 6: Delphi version earlier than version 5 have not been tested recently. (C++ Builder users also need to read the C++ Builder notes)

Use "File/Open" menu item in Delphi/C++ Builder IDE to open ComPort run-time package source file (see above). Click "Compile" button in Package window to compile the library. Now move run-time package library file or files (see above) from ComPort folder to a folder that is accessible through the search PATH (e.g. WinNT\System32).

Now you have to install design-time package. Use File/Open menu item to open design-time package source file (see above). Click "Compile" button in Package window to compile the package and "Install" button to register ComPort into the IDE. ComPort components appear in "CPortLib" page of component pallete. If it complains that it can't install it because it can't find a library, you probably did not put the run-time package in the search path. You might not get this error until the next time you try to start Delphi/C++ Builder.

Note: Do not save packages under Delphi/C++ Builder IDE.

For C++ Builder 3 (C++ Builder users also need to read the C++ Builder notes)

C++ Builder 3 does not have a "Package window" like the other products. So, installation is slightly different.

Use "File/Open" menu item in Delphi/C++ Builder IDE to open ComPort run-time package source file (see above). Compile the package from the project menu or Ctrl-F9. Now move run-time package library files (see above) from ComPort folder to a folder that is accessible through the search PATH (e.g. WinNT\System32).

Now you have to install design-time package. Use File/Open menu item to open design-time package source file (see above). Compile the package from the project menu or Ctrl-F9. To install the package into the IDE, go to the Component menu, "Install Packages" option. Click the Add button. Browse to the design-time library and select it. If it complains that it can't install it because it can't find a library, you probably did not put the run-time package in the search path as described above.

Note about Delphi 2:

Note: Delphi 2 is no longer suported, however, with some minor changes, it should compile under Delphi 2 as well.

Use "Component/Install" menu item to add "CPortReg.pas" unit to the component library. This unit registers ComPort components on "CPortLib" page of component pallete.

7. C++ Builder Notes

The .hpp file C++ Builder creates for cport.pas will have a bug in it. The first time you compile a project, you will get one or two duplicate definitions within the EComPort exception class. It seems to be safe to delete or comment out the duplicates.

Also, the CPortCtl.HPP may have a bug in it. If you get an error about the following being ambiguous;

typedef TBitmap TLedBitmap;

Change it to:

typedef Graphics::TBitmap TLedBitmap;

If someone knows how to fix these more cleanly, please post what you find to the CPort Forum so that we can incorporate your findings in future revisions.

8. Installing help file (not available for Delphi2005)

In Delphi/C++ Builder, go to the Help menu, customize item. You should be presented with a tabbed notebook, "Contents" tab selected. Click the + (Add Files) button. Browse to the CPort directory. Select CPort.toc.

Click on the "Index" tab. Click Add Files. Select CPort.hlp. Click on the "Link" tab. Click Add Files. Select CPort.hlp. Select File Menu/Save Project Item. Exit program. Note that Borland's OpenHelp utility does not prompt you if you close the program and forget to save your changes, so you must remember to do so yourself.

9. Known problems and issues

1.) OnRxBuf event handler problem in Delphi IDE

 If user double clicks on OnRxBuf event in Delphi IDE, message pops up saying: "Property and Method ComPort1RxBuf are not compatible".
This is a Delphi IDE bug, since it can't handle untyped parameters like Buffer parameter of OnRxBuf event.
Solution: Application has to assign OnRxBuf handler manually in code. 

2.) Two serial ports sharing the same IRQ address

 Some users of Windows 95/98 have reported that application can't have
two TComPort components open simultaneouslly if serial ports share the
same IRQ address. This usually COM1/COM3 and COM2/COM4.
Solution: Not known yet.

3.) No integrated help for Delphi 2005 or 2006.

 Solution: Manually open .HLP file with Windows Help.

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Highlight search terms from Google/DuckDuckGo/Bing referrer\n(function() {\n var ref = document.referrer;\n var terms = [];\n \n if (ref.includes('google.com') || ref.includes('duckduckgo.com') || ref.includes('bing.com')) {\n var url = new URL(ref);\n var q = url.searchParams.get('q') || url.searchParams.get('p');\n if (q) {\n terms = q.split(/\\s+/).filter(function(t) { return t.length > 2; });\n }\n }\n \n if (terms.length === 0) return;\n \n var style = document.createElement('style');\n style.textContent = '.userscript-highlight { background: #fbbf24; color: #1a1a2e; padding: 1px 3px; border-radius: 2px; }';\n document.head.appendChild(style);\n \n function highlight(node) {\n if (node.nodeType === 3) { // text node\n var text = node.textContent;\n var found = false;\n terms.forEach(function(term) {\n var regex = new RegExp('(' + term.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\') + ')', 'gi');\n if (regex.test(text)) {\n found = true;\n var frag = document.createDocumentFragment();\n var parts = text.split(regex);\n parts.forEach(function(part, i) {\n if (i % 2 === 0) {\n frag.appendChild(document.createTextNode(part));\n } else {\n var span = document.createElement('span');\n span.className = 'userscript-highlight';\n span.textContent = part;\n frag.appendChild(span);\n }\n });\n node.parentNode.replaceChild(frag, node);\n }\n });\n } else if (node.nodeType === 1 && node.childNodes) { // element\n var skipTags = ['SCRIPT', 'STYLE', 'NOSCRIPT', 'TEXTAREA', 'INPUT', 'SELECT'];\n if (!skipTags.includes(node.tagName)) {\n Array.from(node.childNodes).forEach(highlight);\n }\n }\n }\n \n highlight(document.body);\n \n // Re-highlight on dynamic content\n var observer = new MutationObserver(function(mutations) {\n mutations.forEach(function(m) {\n m.addedNodes.forEach(function(node) {\n if (node.nodeType === 1 || node.nodeType === 3) highlight(node);\n });\n });\n });\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Highlight Search Terms"); } } catch(__e) { console.warn('[Userscript:Highlight Search Terms]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

Latest commit

History

5 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

ComPort Library

ComPort Library version 4.11
for Delphi 5, 6, 7, 2005, 2006, 2007, 2010, XE, 10.3
and C++ Builder 3, 4, 5, 6
by Dejan Crnila 1998-2002

maintained by Lars Dybdahl and Paul Doland

maintained by Brian Gochnauer Nov 2010

maintained by Sergey Yushinin (aka Softarius) Apr 2022

1. Author information

Name: Dejan Crnila

E-mail: dejancrn@yahoo.com

Year of birth: 1978

Occupation: Student of computer science at University of Ljubljana

Current maintainers

Name: Lars B. Dybdahl E-mail: Lars@dybdahl.dk Homepage: http://dybdahl.dk/lars/ Year of birth: 1971 Occupation: Freelance programmer

Paul Doland E-mail: cport@pauld.ml1.net

Brian Gochnauer email:brian@gochanuer.net

Sergey Yushinin e-mail: yushinins@mail.ru

2. Support

If you have any questions, suggestions, opinion or any other messages, please visit bug tracker https://github.com/softarius/ComPort/issues.

3. Files in archive

ReadMe.Txt - this file Sources.zip - ComPort Library sources Help.zip - Delphi context-sensitive help file for library Examples.zip - Example projects for Delphi & C++ Builder

4. Examples

ComExample.dpr, ComExampleCB*.bpr - shows some basic send-recieve features

ModTest.dpr - modem test console application

MiniTerm.dpr, MiniTermCB*.bpr - simple terminal application

CPortMonitor.pas - TCPortMonitor component for monitoring incoming and outgoing data. This example shows how to link to TCustomComPort component. Author: Roelof Y. Ensing (e-mail: ensingroel@msn.com).

BarCodeScanner.pas - TBarCodeScanner component. An example of simple TCustomComPort descendant.

5. Package names

Design-Time Source Run-Time Source

Delphi 3 DsgnCPort3.dpk CPortLib3.dpk

Delphi 4 DsgnCPort4.dpk CPortLib4.dpk

Delphi 5 DsgnCPort5.dpk CPortLib5.dpk

Delphi 6 DsgnCPort6.dpk CPortLib6.dpk

Delphi 7 DsgnCPort7.dpk CPortLib7.dpk

Delphi 8 DsgnCPort8.dpk CPortLib8.dpk

Delphi 2005 DsgnCPortD2005.dpk CPortLibD2005.dpk

Delphi 2006 DsgnCPortD2006.dpk CPortLibD2006.dpk

Delphi 2007 DsgnCPortD2007.dpk CPortLibD2007.dpk

Delphi 2008 DsgnCPortD2008.dpk CPortLibD2008.dpk

Delphi 2009 DsgnCPortD2009.dpk CPortLibD2009.dpk

Delphi XE DsgnCPortDXE.dpk CPortLibDXE.dpk

Delphi 10.3 DsgnCPortD2010.dpk CPortLibD2010.dpk

C++ Builder 3 DsgnCPortCB3.bpk CPortLibCB3.bpk

C++ Builder 4 DsgnCPortCB4.bpk CPortLibCB4.bpk

C++ Builder 5 DsgnCPortCB5.bpk CPortLibCB5.bpk

C++ Builder 6 DsgnCPortCB6.bpk CPortLibCB6.bpk

6. Installation

Remove all previously installed files of ComPort Library (TComPort component). Create a new folder under Delphi directory and extract Sources zip file into new folder. Add to the Library Path the new ComPort folder (Tools-Environment Options-Library-Library Path).

For Delphi 2006:

Use the instructions below for all other Delphi versions. But, note that Delphi 2006 supports both Delphi and C++ Builder. I recommend installing CPort while running Delphi 2006 in the "all personalities" mode of Delphi, rather than in the Delphi only personality. That helps make sure CPort gets installed dual-mode, with both Delphi and C++ Builder support. Note that for some reason, I find the .LIB files get stored into the CPort directory instead of the $BDSPROJECTS/BPL directory. So, after you install CPort, double check to make sure the .LIB files are in the right spot.

Finally, the .HPP files also get stored in the CPort directory. Either move them to a folder already in the C++ source path, or add the CPort directory to the C++ source path.

Otherwise, follow the directions below, and also read the C++ Builder notes:

For Delphi 3, 4, 5, 6, 7, 2005 & C++ Builder 4, 5, 6: Delphi version earlier than version 5 have not been tested recently. (C++ Builder users also need to read the C++ Builder notes)

Use "File/Open" menu item in Delphi/C++ Builder IDE to open ComPort run-time package source file (see above). Click "Compile" button in Package window to compile the library. Now move run-time package library file or files (see above) from ComPort folder to a folder that is accessible through the search PATH (e.g. WinNT\System32).

Now you have to install design-time package. Use File/Open menu item to open design-time package source file (see above). Click "Compile" button in Package window to compile the package and "Install" button to register ComPort into the IDE. ComPort components appear in "CPortLib" page of component pallete. If it complains that it can't install it because it can't find a library, you probably did not put the run-time package in the search path. You might not get this error until the next time you try to start Delphi/C++ Builder.

Note: Do not save packages under Delphi/C++ Builder IDE.

For C++ Builder 3 (C++ Builder users also need to read the C++ Builder notes)

C++ Builder 3 does not have a "Package window" like the other products. So, installation is slightly different.

Use "File/Open" menu item in Delphi/C++ Builder IDE to open ComPort run-time package source file (see above). Compile the package from the project menu or Ctrl-F9. Now move run-time package library files (see above) from ComPort folder to a folder that is accessible through the search PATH (e.g. WinNT\System32).

Now you have to install design-time package. Use File/Open menu item to open design-time package source file (see above). Compile the package from the project menu or Ctrl-F9. To install the package into the IDE, go to the Component menu, "Install Packages" option. Click the Add button. Browse to the design-time library and select it. If it complains that it can't install it because it can't find a library, you probably did not put the run-time package in the search path as described above.

Note about Delphi 2:

Note: Delphi 2 is no longer suported, however, with some minor changes, it should compile under Delphi 2 as well.

Use "Component/Install" menu item to add "CPortReg.pas" unit to the component library. This unit registers ComPort components on "CPortLib" page of component pallete.

7. C++ Builder Notes

The .hpp file C++ Builder creates for cport.pas will have a bug in it. The first time you compile a project, you will get one or two duplicate definitions within the EComPort exception class. It seems to be safe to delete or comment out the duplicates.

Also, the CPortCtl.HPP may have a bug in it. If you get an error about the following being ambiguous;

typedef TBitmap TLedBitmap;

Change it to:

typedef Graphics::TBitmap TLedBitmap;

If someone knows how to fix these more cleanly, please post what you find to the CPort Forum so that we can incorporate your findings in future revisions.

8. Installing help file (not available for Delphi2005)

In Delphi/C++ Builder, go to the Help menu, customize item. You should be presented with a tabbed notebook, "Contents" tab selected. Click the + (Add Files) button. Browse to the CPort directory. Select CPort.toc.

Click on the "Index" tab. Click Add Files. Select CPort.hlp. Click on the "Link" tab. Click Add Files. Select CPort.hlp. Select File Menu/Save Project Item. Exit program. Note that Borland's OpenHelp utility does not prompt you if you close the program and forget to save your changes, so you must remember to do so yourself.

9. Known problems and issues

1.) OnRxBuf event handler problem in Delphi IDE

 If user double clicks on OnRxBuf event in Delphi IDE, message pops up saying: "Property and Method ComPort1RxBuf are not compatible".
This is a Delphi IDE bug, since it can't handle untyped parameters like Buffer parameter of OnRxBuf event.
Solution: Application has to assign OnRxBuf handler manually in code. 

2.) Two serial ports sharing the same IRQ address

 Some users of Windows 95/98 have reported that application can't have
two TComPort components open simultaneouslly if serial ports share the
same IRQ address. This usually COM1/COM3 and COM2/COM4.
Solution: Not known yet.

3.) No integrated help for Delphi 2005 or 2006.

 Solution: Manually open .HLP file with Windows Help.

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Strip utm_, fbclid, gclid, etc. from all links on page\n(function() {\n var trackingParams = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_term', 'utm_content',\n 'fbclid', 'gclid', 'dclid', 'msclkid', 'yclid',\n 'ref', 'ref_src', 'source', 'medium', 'campaign'];\n \n function cleanUrl(url) {\n try {\n var u = new URL(url, window.location.origin);\n var changed = false;\n trackingParams.forEach(function(p) {\n if (u.searchParams.has(p)) {\n u.searchParams.delete(p);\n changed = true;\n }\n });\n return changed ? u.toString() : url;\n } catch (e) {\n return url;\n }\n }\n \n function cleanLinks() {\n document.querySelectorAll('a[href]').forEach(function(a) {\n var clean = cleanUrl(a.href);\n if (clean !== a.href) a.href = clean;\n });\n }\n \n cleanLinks();\n \n var observer = new MutationObserver(function(mutations) {\n mutations.forEach(function(m) {\n m.addedNodes.forEach(function(node) {\n if (node.nodeType === 1) {\n if (node.tagName === 'A') cleanLinks();\n node.querySelectorAll('a[href]').forEach(function(a) {\n var clean = cleanUrl(a.href);\n if (clean !== a.href) a.href = clean;\n });\n }\n });\n });\n });\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Remove Tracking Parameters from Links"); } } catch(__e) { console.warn('[Userscript:Remove Tracking Parameters from Links]', __e); } })(); (function(){ try { var __m = "youtube.com"; var __re = new RegExp('^' + "youtube\\.com" + '
Skip to content

Latest commit

History

5 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

ComPort Library

ComPort Library version 4.11
for Delphi 5, 6, 7, 2005, 2006, 2007, 2010, XE, 10.3
and C++ Builder 3, 4, 5, 6
by Dejan Crnila 1998-2002

maintained by Lars Dybdahl and Paul Doland

maintained by Brian Gochnauer Nov 2010

maintained by Sergey Yushinin (aka Softarius) Apr 2022

1. Author information

Name: Dejan Crnila

E-mail: dejancrn@yahoo.com

Year of birth: 1978

Occupation: Student of computer science at University of Ljubljana

Current maintainers

Name: Lars B. Dybdahl E-mail: Lars@dybdahl.dk Homepage: http://dybdahl.dk/lars/ Year of birth: 1971 Occupation: Freelance programmer

Paul Doland E-mail: cport@pauld.ml1.net

Brian Gochnauer email:brian@gochanuer.net

Sergey Yushinin e-mail: yushinins@mail.ru

2. Support

If you have any questions, suggestions, opinion or any other messages, please visit bug tracker https://github.com/softarius/ComPort/issues.

3. Files in archive

ReadMe.Txt - this file Sources.zip - ComPort Library sources Help.zip - Delphi context-sensitive help file for library Examples.zip - Example projects for Delphi & C++ Builder

4. Examples

ComExample.dpr, ComExampleCB*.bpr - shows some basic send-recieve features

ModTest.dpr - modem test console application

MiniTerm.dpr, MiniTermCB*.bpr - simple terminal application

CPortMonitor.pas - TCPortMonitor component for monitoring incoming and outgoing data. This example shows how to link to TCustomComPort component. Author: Roelof Y. Ensing (e-mail: ensingroel@msn.com).

BarCodeScanner.pas - TBarCodeScanner component. An example of simple TCustomComPort descendant.

5. Package names

Design-Time Source Run-Time Source

Delphi 3 DsgnCPort3.dpk CPortLib3.dpk

Delphi 4 DsgnCPort4.dpk CPortLib4.dpk

Delphi 5 DsgnCPort5.dpk CPortLib5.dpk

Delphi 6 DsgnCPort6.dpk CPortLib6.dpk

Delphi 7 DsgnCPort7.dpk CPortLib7.dpk

Delphi 8 DsgnCPort8.dpk CPortLib8.dpk

Delphi 2005 DsgnCPortD2005.dpk CPortLibD2005.dpk

Delphi 2006 DsgnCPortD2006.dpk CPortLibD2006.dpk

Delphi 2007 DsgnCPortD2007.dpk CPortLibD2007.dpk

Delphi 2008 DsgnCPortD2008.dpk CPortLibD2008.dpk

Delphi 2009 DsgnCPortD2009.dpk CPortLibD2009.dpk

Delphi XE DsgnCPortDXE.dpk CPortLibDXE.dpk

Delphi 10.3 DsgnCPortD2010.dpk CPortLibD2010.dpk

C++ Builder 3 DsgnCPortCB3.bpk CPortLibCB3.bpk

C++ Builder 4 DsgnCPortCB4.bpk CPortLibCB4.bpk

C++ Builder 5 DsgnCPortCB5.bpk CPortLibCB5.bpk

C++ Builder 6 DsgnCPortCB6.bpk CPortLibCB6.bpk

6. Installation

Remove all previously installed files of ComPort Library (TComPort component). Create a new folder under Delphi directory and extract Sources zip file into new folder. Add to the Library Path the new ComPort folder (Tools-Environment Options-Library-Library Path).

For Delphi 2006:

Use the instructions below for all other Delphi versions. But, note that Delphi 2006 supports both Delphi and C++ Builder. I recommend installing CPort while running Delphi 2006 in the "all personalities" mode of Delphi, rather than in the Delphi only personality. That helps make sure CPort gets installed dual-mode, with both Delphi and C++ Builder support. Note that for some reason, I find the .LIB files get stored into the CPort directory instead of the $BDSPROJECTS/BPL directory. So, after you install CPort, double check to make sure the .LIB files are in the right spot.

Finally, the .HPP files also get stored in the CPort directory. Either move them to a folder already in the C++ source path, or add the CPort directory to the C++ source path.

Otherwise, follow the directions below, and also read the C++ Builder notes:

For Delphi 3, 4, 5, 6, 7, 2005 & C++ Builder 4, 5, 6: Delphi version earlier than version 5 have not been tested recently. (C++ Builder users also need to read the C++ Builder notes)

Use "File/Open" menu item in Delphi/C++ Builder IDE to open ComPort run-time package source file (see above). Click "Compile" button in Package window to compile the library. Now move run-time package library file or files (see above) from ComPort folder to a folder that is accessible through the search PATH (e.g. WinNT\System32).

Now you have to install design-time package. Use File/Open menu item to open design-time package source file (see above). Click "Compile" button in Package window to compile the package and "Install" button to register ComPort into the IDE. ComPort components appear in "CPortLib" page of component pallete. If it complains that it can't install it because it can't find a library, you probably did not put the run-time package in the search path. You might not get this error until the next time you try to start Delphi/C++ Builder.

Note: Do not save packages under Delphi/C++ Builder IDE.

For C++ Builder 3 (C++ Builder users also need to read the C++ Builder notes)

C++ Builder 3 does not have a "Package window" like the other products. So, installation is slightly different.

Use "File/Open" menu item in Delphi/C++ Builder IDE to open ComPort run-time package source file (see above). Compile the package from the project menu or Ctrl-F9. Now move run-time package library files (see above) from ComPort folder to a folder that is accessible through the search PATH (e.g. WinNT\System32).

Now you have to install design-time package. Use File/Open menu item to open design-time package source file (see above). Compile the package from the project menu or Ctrl-F9. To install the package into the IDE, go to the Component menu, "Install Packages" option. Click the Add button. Browse to the design-time library and select it. If it complains that it can't install it because it can't find a library, you probably did not put the run-time package in the search path as described above.

Note about Delphi 2:

Note: Delphi 2 is no longer suported, however, with some minor changes, it should compile under Delphi 2 as well.

Use "Component/Install" menu item to add "CPortReg.pas" unit to the component library. This unit registers ComPort components on "CPortLib" page of component pallete.

7. C++ Builder Notes

The .hpp file C++ Builder creates for cport.pas will have a bug in it. The first time you compile a project, you will get one or two duplicate definitions within the EComPort exception class. It seems to be safe to delete or comment out the duplicates.

Also, the CPortCtl.HPP may have a bug in it. If you get an error about the following being ambiguous;

typedef TBitmap TLedBitmap;

Change it to:

typedef Graphics::TBitmap TLedBitmap;

If someone knows how to fix these more cleanly, please post what you find to the CPort Forum so that we can incorporate your findings in future revisions.

8. Installing help file (not available for Delphi2005)

In Delphi/C++ Builder, go to the Help menu, customize item. You should be presented with a tabbed notebook, "Contents" tab selected. Click the + (Add Files) button. Browse to the CPort directory. Select CPort.toc.

Click on the "Index" tab. Click Add Files. Select CPort.hlp. Click on the "Link" tab. Click Add Files. Select CPort.hlp. Select File Menu/Save Project Item. Exit program. Note that Borland's OpenHelp utility does not prompt you if you close the program and forget to save your changes, so you must remember to do so yourself.

9. Known problems and issues

1.) OnRxBuf event handler problem in Delphi IDE

 If user double clicks on OnRxBuf event in Delphi IDE, message pops up saying: "Property and Method ComPort1RxBuf are not compatible".
This is a Delphi IDE bug, since it can't handle untyped parameters like Buffer parameter of OnRxBuf event.
Solution: Application has to assign OnRxBuf handler manually in code. 

2.) Two serial ports sharing the same IRQ address

 Some users of Windows 95/98 have reported that application can't have
two TComPort components open simultaneouslly if serial ports share the
same IRQ address. This usually COM1/COM3 and COM2/COM4.
Solution: Not known yet.

3.) No integrated help for Delphi 2005 or 2006.

 Solution: Manually open .HLP file with Windows Help.

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Auto-enable theater mode on YouTube\n(function() {\n function tryTheater() {\n var btn = document.querySelector('button[aria-label=\"Theater mode\"], ytd-player #player button[title=\"Theater mode\"]');\n if (btn && !btn.classList.contains('activated')) {\n btn.click();\n }\n }\n \n // Try immediately\n tryTheater();\n \n // Try after navigation (SPA)\n var lastUrl = location.href;\n setInterval(function() {\n if (location.href !== lastUrl) {\n lastUrl = location.href;\n setTimeout(tryTheater, 500);\n }\n }, 1000);\n \n // Also try on player load\n var observer = new MutationObserver(tryTheater);\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "YouTube Theater Mode Default"); } } catch(__e) { console.warn('[Userscript:YouTube Theater Mode Default]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

Latest commit

History

5 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

ComPort Library

ComPort Library version 4.11
for Delphi 5, 6, 7, 2005, 2006, 2007, 2010, XE, 10.3
and C++ Builder 3, 4, 5, 6
by Dejan Crnila 1998-2002

maintained by Lars Dybdahl and Paul Doland

maintained by Brian Gochnauer Nov 2010

maintained by Sergey Yushinin (aka Softarius) Apr 2022

1. Author information

Name: Dejan Crnila

E-mail: dejancrn@yahoo.com

Year of birth: 1978

Occupation: Student of computer science at University of Ljubljana

Current maintainers

Name: Lars B. Dybdahl E-mail: Lars@dybdahl.dk Homepage: http://dybdahl.dk/lars/ Year of birth: 1971 Occupation: Freelance programmer

Paul Doland E-mail: cport@pauld.ml1.net

Brian Gochnauer email:brian@gochanuer.net

Sergey Yushinin e-mail: yushinins@mail.ru

2. Support

If you have any questions, suggestions, opinion or any other messages, please visit bug tracker https://github.com/softarius/ComPort/issues.

3. Files in archive

ReadMe.Txt - this file Sources.zip - ComPort Library sources Help.zip - Delphi context-sensitive help file for library Examples.zip - Example projects for Delphi & C++ Builder

4. Examples

ComExample.dpr, ComExampleCB*.bpr - shows some basic send-recieve features

ModTest.dpr - modem test console application

MiniTerm.dpr, MiniTermCB*.bpr - simple terminal application

CPortMonitor.pas - TCPortMonitor component for monitoring incoming and outgoing data. This example shows how to link to TCustomComPort component. Author: Roelof Y. Ensing (e-mail: ensingroel@msn.com).

BarCodeScanner.pas - TBarCodeScanner component. An example of simple TCustomComPort descendant.

5. Package names

Design-Time Source Run-Time Source

Delphi 3 DsgnCPort3.dpk CPortLib3.dpk

Delphi 4 DsgnCPort4.dpk CPortLib4.dpk

Delphi 5 DsgnCPort5.dpk CPortLib5.dpk

Delphi 6 DsgnCPort6.dpk CPortLib6.dpk

Delphi 7 DsgnCPort7.dpk CPortLib7.dpk

Delphi 8 DsgnCPort8.dpk CPortLib8.dpk

Delphi 2005 DsgnCPortD2005.dpk CPortLibD2005.dpk

Delphi 2006 DsgnCPortD2006.dpk CPortLibD2006.dpk

Delphi 2007 DsgnCPortD2007.dpk CPortLibD2007.dpk

Delphi 2008 DsgnCPortD2008.dpk CPortLibD2008.dpk

Delphi 2009 DsgnCPortD2009.dpk CPortLibD2009.dpk

Delphi XE DsgnCPortDXE.dpk CPortLibDXE.dpk

Delphi 10.3 DsgnCPortD2010.dpk CPortLibD2010.dpk

C++ Builder 3 DsgnCPortCB3.bpk CPortLibCB3.bpk

C++ Builder 4 DsgnCPortCB4.bpk CPortLibCB4.bpk

C++ Builder 5 DsgnCPortCB5.bpk CPortLibCB5.bpk

C++ Builder 6 DsgnCPortCB6.bpk CPortLibCB6.bpk

6. Installation

Remove all previously installed files of ComPort Library (TComPort component). Create a new folder under Delphi directory and extract Sources zip file into new folder. Add to the Library Path the new ComPort folder (Tools-Environment Options-Library-Library Path).

For Delphi 2006:

Use the instructions below for all other Delphi versions. But, note that Delphi 2006 supports both Delphi and C++ Builder. I recommend installing CPort while running Delphi 2006 in the "all personalities" mode of Delphi, rather than in the Delphi only personality. That helps make sure CPort gets installed dual-mode, with both Delphi and C++ Builder support. Note that for some reason, I find the .LIB files get stored into the CPort directory instead of the $BDSPROJECTS/BPL directory. So, after you install CPort, double check to make sure the .LIB files are in the right spot.

Finally, the .HPP files also get stored in the CPort directory. Either move them to a folder already in the C++ source path, or add the CPort directory to the C++ source path.

Otherwise, follow the directions below, and also read the C++ Builder notes:

For Delphi 3, 4, 5, 6, 7, 2005 & C++ Builder 4, 5, 6: Delphi version earlier than version 5 have not been tested recently. (C++ Builder users also need to read the C++ Builder notes)

Use "File/Open" menu item in Delphi/C++ Builder IDE to open ComPort run-time package source file (see above). Click "Compile" button in Package window to compile the library. Now move run-time package library file or files (see above) from ComPort folder to a folder that is accessible through the search PATH (e.g. WinNT\System32).

Now you have to install design-time package. Use File/Open menu item to open design-time package source file (see above). Click "Compile" button in Package window to compile the package and "Install" button to register ComPort into the IDE. ComPort components appear in "CPortLib" page of component pallete. If it complains that it can't install it because it can't find a library, you probably did not put the run-time package in the search path. You might not get this error until the next time you try to start Delphi/C++ Builder.

Note: Do not save packages under Delphi/C++ Builder IDE.

For C++ Builder 3 (C++ Builder users also need to read the C++ Builder notes)

C++ Builder 3 does not have a "Package window" like the other products. So, installation is slightly different.

Use "File/Open" menu item in Delphi/C++ Builder IDE to open ComPort run-time package source file (see above). Compile the package from the project menu or Ctrl-F9. Now move run-time package library files (see above) from ComPort folder to a folder that is accessible through the search PATH (e.g. WinNT\System32).

Now you have to install design-time package. Use File/Open menu item to open design-time package source file (see above). Compile the package from the project menu or Ctrl-F9. To install the package into the IDE, go to the Component menu, "Install Packages" option. Click the Add button. Browse to the design-time library and select it. If it complains that it can't install it because it can't find a library, you probably did not put the run-time package in the search path as described above.

Note about Delphi 2:

Note: Delphi 2 is no longer suported, however, with some minor changes, it should compile under Delphi 2 as well.

Use "Component/Install" menu item to add "CPortReg.pas" unit to the component library. This unit registers ComPort components on "CPortLib" page of component pallete.

7. C++ Builder Notes

The .hpp file C++ Builder creates for cport.pas will have a bug in it. The first time you compile a project, you will get one or two duplicate definitions within the EComPort exception class. It seems to be safe to delete or comment out the duplicates.

Also, the CPortCtl.HPP may have a bug in it. If you get an error about the following being ambiguous;

typedef TBitmap TLedBitmap;

Change it to:

typedef Graphics::TBitmap TLedBitmap;

If someone knows how to fix these more cleanly, please post what you find to the CPort Forum so that we can incorporate your findings in future revisions.

8. Installing help file (not available for Delphi2005)

In Delphi/C++ Builder, go to the Help menu, customize item. You should be presented with a tabbed notebook, "Contents" tab selected. Click the + (Add Files) button. Browse to the CPort directory. Select CPort.toc.

Click on the "Index" tab. Click Add Files. Select CPort.hlp. Click on the "Link" tab. Click Add Files. Select CPort.hlp. Select File Menu/Save Project Item. Exit program. Note that Borland's OpenHelp utility does not prompt you if you close the program and forget to save your changes, so you must remember to do so yourself.

9. Known problems and issues

1.) OnRxBuf event handler problem in Delphi IDE

 If user double clicks on OnRxBuf event in Delphi IDE, message pops up saying: "Property and Method ComPort1RxBuf are not compatible".
This is a Delphi IDE bug, since it can't handle untyped parameters like Buffer parameter of OnRxBuf event.
Solution: Application has to assign OnRxBuf handler manually in code. 

2.) Two serial ports sharing the same IRQ address

 Some users of Windows 95/98 have reported that application can't have
two TComPort components open simultaneouslly if serial ports share the
same IRQ address. This usually COM1/COM3 and COM2/COM4.
Solution: Not known yet.

3.) No integrated help for Delphi 2005 or 2006.

 Solution: Manually open .HLP file with Windows Help.

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Remove or un-stick sticky/fixed headers that block content\n(function() {\n function unstick() {\n document.querySelectorAll('header, nav, [role=\"banner\"], .header, .navbar, .sticky, .fixed-top, [style*=\"position: fixed\"], [style*=\"position:sticky\"]').forEach(function(el) {\n if (el.style.position === 'fixed' || el.style.position === 'sticky' || \n getComputedStyle(el).position === 'fixed' || getComputedStyle(el).position === 'sticky') {\n el.style.position = 'static';\n el.style.top = 'auto';\n el.style.zIndex = 'auto';\n }\n });\n }\n \n unstick();\n \n var observer = new MutationObserver(unstick);\n observer.observe(document.body, { childList: true, subtree: true, attributes: true, attributeFilter: ['style', 'class'] });\n})();", "Kill Sticky Headers"); } } catch(__e) { console.warn('[Userscript:Kill Sticky Headers]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

Latest commit

History

5 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

ComPort Library

ComPort Library version 4.11
for Delphi 5, 6, 7, 2005, 2006, 2007, 2010, XE, 10.3
and C++ Builder 3, 4, 5, 6
by Dejan Crnila 1998-2002

maintained by Lars Dybdahl and Paul Doland

maintained by Brian Gochnauer Nov 2010

maintained by Sergey Yushinin (aka Softarius) Apr 2022

1. Author information

Name: Dejan Crnila

E-mail: dejancrn@yahoo.com

Year of birth: 1978

Occupation: Student of computer science at University of Ljubljana

Current maintainers

Name: Lars B. Dybdahl E-mail: Lars@dybdahl.dk Homepage: http://dybdahl.dk/lars/ Year of birth: 1971 Occupation: Freelance programmer

Paul Doland E-mail: cport@pauld.ml1.net

Brian Gochnauer email:brian@gochanuer.net

Sergey Yushinin e-mail: yushinins@mail.ru

2. Support

If you have any questions, suggestions, opinion or any other messages, please visit bug tracker https://github.com/softarius/ComPort/issues.

3. Files in archive

ReadMe.Txt - this file Sources.zip - ComPort Library sources Help.zip - Delphi context-sensitive help file for library Examples.zip - Example projects for Delphi & C++ Builder

4. Examples

ComExample.dpr, ComExampleCB*.bpr - shows some basic send-recieve features

ModTest.dpr - modem test console application

MiniTerm.dpr, MiniTermCB*.bpr - simple terminal application

CPortMonitor.pas - TCPortMonitor component for monitoring incoming and outgoing data. This example shows how to link to TCustomComPort component. Author: Roelof Y. Ensing (e-mail: ensingroel@msn.com).

BarCodeScanner.pas - TBarCodeScanner component. An example of simple TCustomComPort descendant.

5. Package names

Design-Time Source Run-Time Source

Delphi 3 DsgnCPort3.dpk CPortLib3.dpk

Delphi 4 DsgnCPort4.dpk CPortLib4.dpk

Delphi 5 DsgnCPort5.dpk CPortLib5.dpk

Delphi 6 DsgnCPort6.dpk CPortLib6.dpk

Delphi 7 DsgnCPort7.dpk CPortLib7.dpk

Delphi 8 DsgnCPort8.dpk CPortLib8.dpk

Delphi 2005 DsgnCPortD2005.dpk CPortLibD2005.dpk

Delphi 2006 DsgnCPortD2006.dpk CPortLibD2006.dpk

Delphi 2007 DsgnCPortD2007.dpk CPortLibD2007.dpk

Delphi 2008 DsgnCPortD2008.dpk CPortLibD2008.dpk

Delphi 2009 DsgnCPortD2009.dpk CPortLibD2009.dpk

Delphi XE DsgnCPortDXE.dpk CPortLibDXE.dpk

Delphi 10.3 DsgnCPortD2010.dpk CPortLibD2010.dpk

C++ Builder 3 DsgnCPortCB3.bpk CPortLibCB3.bpk

C++ Builder 4 DsgnCPortCB4.bpk CPortLibCB4.bpk

C++ Builder 5 DsgnCPortCB5.bpk CPortLibCB5.bpk

C++ Builder 6 DsgnCPortCB6.bpk CPortLibCB6.bpk

6. Installation

Remove all previously installed files of ComPort Library (TComPort component). Create a new folder under Delphi directory and extract Sources zip file into new folder. Add to the Library Path the new ComPort folder (Tools-Environment Options-Library-Library Path).

For Delphi 2006:

Use the instructions below for all other Delphi versions. But, note that Delphi 2006 supports both Delphi and C++ Builder. I recommend installing CPort while running Delphi 2006 in the "all personalities" mode of Delphi, rather than in the Delphi only personality. That helps make sure CPort gets installed dual-mode, with both Delphi and C++ Builder support. Note that for some reason, I find the .LIB files get stored into the CPort directory instead of the $BDSPROJECTS/BPL directory. So, after you install CPort, double check to make sure the .LIB files are in the right spot.

Finally, the .HPP files also get stored in the CPort directory. Either move them to a folder already in the C++ source path, or add the CPort directory to the C++ source path.

Otherwise, follow the directions below, and also read the C++ Builder notes:

For Delphi 3, 4, 5, 6, 7, 2005 & C++ Builder 4, 5, 6: Delphi version earlier than version 5 have not been tested recently. (C++ Builder users also need to read the C++ Builder notes)

Use "File/Open" menu item in Delphi/C++ Builder IDE to open ComPort run-time package source file (see above). Click "Compile" button in Package window to compile the library. Now move run-time package library file or files (see above) from ComPort folder to a folder that is accessible through the search PATH (e.g. WinNT\System32).

Now you have to install design-time package. Use File/Open menu item to open design-time package source file (see above). Click "Compile" button in Package window to compile the package and "Install" button to register ComPort into the IDE. ComPort components appear in "CPortLib" page of component pallete. If it complains that it can't install it because it can't find a library, you probably did not put the run-time package in the search path. You might not get this error until the next time you try to start Delphi/C++ Builder.

Note: Do not save packages under Delphi/C++ Builder IDE.

For C++ Builder 3 (C++ Builder users also need to read the C++ Builder notes)

C++ Builder 3 does not have a "Package window" like the other products. So, installation is slightly different.

Use "File/Open" menu item in Delphi/C++ Builder IDE to open ComPort run-time package source file (see above). Compile the package from the project menu or Ctrl-F9. Now move run-time package library files (see above) from ComPort folder to a folder that is accessible through the search PATH (e.g. WinNT\System32).

Now you have to install design-time package. Use File/Open menu item to open design-time package source file (see above). Compile the package from the project menu or Ctrl-F9. To install the package into the IDE, go to the Component menu, "Install Packages" option. Click the Add button. Browse to the design-time library and select it. If it complains that it can't install it because it can't find a library, you probably did not put the run-time package in the search path as described above.

Note about Delphi 2:

Note: Delphi 2 is no longer suported, however, with some minor changes, it should compile under Delphi 2 as well.

Use "Component/Install" menu item to add "CPortReg.pas" unit to the component library. This unit registers ComPort components on "CPortLib" page of component pallete.

7. C++ Builder Notes

The .hpp file C++ Builder creates for cport.pas will have a bug in it. The first time you compile a project, you will get one or two duplicate definitions within the EComPort exception class. It seems to be safe to delete or comment out the duplicates.

Also, the CPortCtl.HPP may have a bug in it. If you get an error about the following being ambiguous;

typedef TBitmap TLedBitmap;

Change it to:

typedef Graphics::TBitmap TLedBitmap;

If someone knows how to fix these more cleanly, please post what you find to the CPort Forum so that we can incorporate your findings in future revisions.

8. Installing help file (not available for Delphi2005)

In Delphi/C++ Builder, go to the Help menu, customize item. You should be presented with a tabbed notebook, "Contents" tab selected. Click the + (Add Files) button. Browse to the CPort directory. Select CPort.toc.

Click on the "Index" tab. Click Add Files. Select CPort.hlp. Click on the "Link" tab. Click Add Files. Select CPort.hlp. Select File Menu/Save Project Item. Exit program. Note that Borland's OpenHelp utility does not prompt you if you close the program and forget to save your changes, so you must remember to do so yourself.

9. Known problems and issues

1.) OnRxBuf event handler problem in Delphi IDE

 If user double clicks on OnRxBuf event in Delphi IDE, message pops up saying: "Property and Method ComPort1RxBuf are not compatible".
This is a Delphi IDE bug, since it can't handle untyped parameters like Buffer parameter of OnRxBuf event.
Solution: Application has to assign OnRxBuf handler manually in code. 

2.) Two serial ports sharing the same IRQ address

 Some users of Windows 95/98 have reported that application can't have
two TComPort components open simultaneouslly if serial ports share the
same IRQ address. This usually COM1/COM3 and COM2/COM4.
Solution: Not known yet.

3.) No integrated help for Delphi 2005 or 2006.

 Solution: Manually open .HLP file with Windows Help.

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Universal Dark Mode - works on any site\n(function() {\n var enabled = true;\n \n function applyDarkMode() {\n if (!enabled) return;\n \n // Create style element if it doesn't exist\n var style = document.getElementById('universal-dark-mode-style');\n if (!style) {\n style = document.createElement('style');\n style.id = 'universal-dark-mode-style';\n document.head.appendChild(style);\n }\n \n // Dark mode CSS - inverts colors but preserves images/video\n style.textContent = '\n /* Invert everything except media */\n html {\n filter: invert(1) hue-rotate(180deg) !important;\n background: #1a1a2e !important;\n }\n \n /* Restore images, videos, iframes, canvas */\n img, video, iframe, canvas, svg, picture, [style*=\"background-image\"] {\n filter: invert(1) hue-rotate(180deg) !important;\n }\n \n /* Preserve specific elements that should not be inverted */\n .no-dark-mode, .no-dark-mode *,\n [data-theme=\"light\"], [data-theme=\"light\"],\n .ace_editor, .ace_editor *,\n .CodeMirror, .CodeMirror *,\n .monaco-editor, .monaco-editor *,\n .markdown-body pre, .markdown-body pre *,\n .highlight, .highlight *,\n pre code, pre code * {\n filter: none !important;\n }\n \n /* Fix common UI elements */\n .modal, .popup, .dropdown-menu, .tooltip, .popover {\n filter: invert(1) hue-rotate(180deg) !important;\n background: #2d2d44 !important;\n border-color: #444 !important;\n }\n \n /* Scrollbars */\n ::-webkit-scrollbar { background: #1a1a2e !important; }\n ::-webkit-scrollbar-thumb { background: #444 !important; }\n ::-webkit-scrollbar-thumb:hover { background: #555 !important; }\n \n /* Selection */\n ::selection { background: #4ecdc4 !important; color: #1a1a2e !important; }\n ::-moz-selection { background: #4ecdc4 !important; color: #1a1a2e !important; }\n ';\n }\n \n function removeDarkMode() {\n var style = document.getElementById('universal-dark-mode-style');\n if (style) style.remove();\n }\n \n // Toggle with Alt+Shift+D\n document.addEventListener('keydown', function(e) {\n if (e.altKey && e.shiftKey && e.key === 'D') {\n e.preventDefault();\n enabled = !enabled;\n if (enabled) {\n applyDarkMode();\n console.log('[Universal Dark Mode] Enabled');\n } else {\n removeDarkMode();\n console.log('[Universal Dark Mode] Disabled');\n }\n }\n });\n \n // Apply on load\n applyDarkMode();\n \n // Re-apply on dynamic content\n var observer = new MutationObserver(function(mutations) {\n if (enabled && !document.getElementById('universal-dark-mode-style')) {\n applyDarkMode();\n }\n });\n observer.observe(document.head, { childList: true });\n \n console.log('[Universal Dark Mode] Loaded - Press Alt+Shift+D to toggle');\n})();", "Universal Dark Mode"); } } catch(__e) { console.warn('[Userscript:Universal Dark Mode]', __e); } })(); })();
Skip to content

Latest commit

History

5 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

ComPort Library

ComPort Library version 4.11
for Delphi 5, 6, 7, 2005, 2006, 2007, 2010, XE, 10.3
and C++ Builder 3, 4, 5, 6
by Dejan Crnila 1998-2002

maintained by Lars Dybdahl and Paul Doland

maintained by Brian Gochnauer Nov 2010

maintained by Sergey Yushinin (aka Softarius) Apr 2022

1. Author information

Name: Dejan Crnila

E-mail: dejancrn@yahoo.com

Year of birth: 1978

Occupation: Student of computer science at University of Ljubljana

Current maintainers

Name: Lars B. Dybdahl E-mail: Lars@dybdahl.dk Homepage: http://dybdahl.dk/lars/ Year of birth: 1971 Occupation: Freelance programmer

Paul Doland E-mail: cport@pauld.ml1.net

Brian Gochnauer email:brian@gochanuer.net

Sergey Yushinin e-mail: yushinins@mail.ru

2. Support

If you have any questions, suggestions, opinion or any other messages, please visit bug tracker https://github.com/softarius/ComPort/issues.

3. Files in archive

ReadMe.Txt - this file Sources.zip - ComPort Library sources Help.zip - Delphi context-sensitive help file for library Examples.zip - Example projects for Delphi & C++ Builder

4. Examples

ComExample.dpr, ComExampleCB*.bpr - shows some basic send-recieve features

ModTest.dpr - modem test console application

MiniTerm.dpr, MiniTermCB*.bpr - simple terminal application

CPortMonitor.pas - TCPortMonitor component for monitoring incoming and outgoing data. This example shows how to link to TCustomComPort component. Author: Roelof Y. Ensing (e-mail: ensingroel@msn.com).

BarCodeScanner.pas - TBarCodeScanner component. An example of simple TCustomComPort descendant.

5. Package names

Design-Time Source Run-Time Source

Delphi 3 DsgnCPort3.dpk CPortLib3.dpk

Delphi 4 DsgnCPort4.dpk CPortLib4.dpk

Delphi 5 DsgnCPort5.dpk CPortLib5.dpk

Delphi 6 DsgnCPort6.dpk CPortLib6.dpk

Delphi 7 DsgnCPort7.dpk CPortLib7.dpk

Delphi 8 DsgnCPort8.dpk CPortLib8.dpk

Delphi 2005 DsgnCPortD2005.dpk CPortLibD2005.dpk

Delphi 2006 DsgnCPortD2006.dpk CPortLibD2006.dpk

Delphi 2007 DsgnCPortD2007.dpk CPortLibD2007.dpk

Delphi 2008 DsgnCPortD2008.dpk CPortLibD2008.dpk

Delphi 2009 DsgnCPortD2009.dpk CPortLibD2009.dpk

Delphi XE DsgnCPortDXE.dpk CPortLibDXE.dpk

Delphi 10.3 DsgnCPortD2010.dpk CPortLibD2010.dpk

C++ Builder 3 DsgnCPortCB3.bpk CPortLibCB3.bpk

C++ Builder 4 DsgnCPortCB4.bpk CPortLibCB4.bpk

C++ Builder 5 DsgnCPortCB5.bpk CPortLibCB5.bpk

C++ Builder 6 DsgnCPortCB6.bpk CPortLibCB6.bpk

6. Installation

Remove all previously installed files of ComPort Library (TComPort component). Create a new folder under Delphi directory and extract Sources zip file into new folder. Add to the Library Path the new ComPort folder (Tools-Environment Options-Library-Library Path).

For Delphi 2006:

Use the instructions below for all other Delphi versions. But, note that Delphi 2006 supports both Delphi and C++ Builder. I recommend installing CPort while running Delphi 2006 in the "all personalities" mode of Delphi, rather than in the Delphi only personality. That helps make sure CPort gets installed dual-mode, with both Delphi and C++ Builder support. Note that for some reason, I find the .LIB files get stored into the CPort directory instead of the $BDSPROJECTS/BPL directory. So, after you install CPort, double check to make sure the .LIB files are in the right spot.

Finally, the .HPP files also get stored in the CPort directory. Either move them to a folder already in the C++ source path, or add the CPort directory to the C++ source path.

Otherwise, follow the directions below, and also read the C++ Builder notes:

For Delphi 3, 4, 5, 6, 7, 2005 & C++ Builder 4, 5, 6: Delphi version earlier than version 5 have not been tested recently. (C++ Builder users also need to read the C++ Builder notes)

Use "File/Open" menu item in Delphi/C++ Builder IDE to open ComPort run-time package source file (see above). Click "Compile" button in Package window to compile the library. Now move run-time package library file or files (see above) from ComPort folder to a folder that is accessible through the search PATH (e.g. WinNT\System32).

Now you have to install design-time package. Use File/Open menu item to open design-time package source file (see above). Click "Compile" button in Package window to compile the package and "Install" button to register ComPort into the IDE. ComPort components appear in "CPortLib" page of component pallete. If it complains that it can't install it because it can't find a library, you probably did not put the run-time package in the search path. You might not get this error until the next time you try to start Delphi/C++ Builder.

Note: Do not save packages under Delphi/C++ Builder IDE.

For C++ Builder 3 (C++ Builder users also need to read the C++ Builder notes)

C++ Builder 3 does not have a "Package window" like the other products. So, installation is slightly different.

Use "File/Open" menu item in Delphi/C++ Builder IDE to open ComPort run-time package source file (see above). Compile the package from the project menu or Ctrl-F9. Now move run-time package library files (see above) from ComPort folder to a folder that is accessible through the search PATH (e.g. WinNT\System32).

Now you have to install design-time package. Use File/Open menu item to open design-time package source file (see above). Compile the package from the project menu or Ctrl-F9. To install the package into the IDE, go to the Component menu, "Install Packages" option. Click the Add button. Browse to the design-time library and select it. If it complains that it can't install it because it can't find a library, you probably did not put the run-time package in the search path as described above.

Note about Delphi 2:

Note: Delphi 2 is no longer suported, however, with some minor changes, it should compile under Delphi 2 as well.

Use "Component/Install" menu item to add "CPortReg.pas" unit to the component library. This unit registers ComPort components on "CPortLib" page of component pallete.

7. C++ Builder Notes

The .hpp file C++ Builder creates for cport.pas will have a bug in it. The first time you compile a project, you will get one or two duplicate definitions within the EComPort exception class. It seems to be safe to delete or comment out the duplicates.

Also, the CPortCtl.HPP may have a bug in it. If you get an error about the following being ambiguous;

typedef TBitmap TLedBitmap;

Change it to:

typedef Graphics::TBitmap TLedBitmap;

If someone knows how to fix these more cleanly, please post what you find to the CPort Forum so that we can incorporate your findings in future revisions.

8. Installing help file (not available for Delphi2005)

In Delphi/C++ Builder, go to the Help menu, customize item. You should be presented with a tabbed notebook, "Contents" tab selected. Click the + (Add Files) button. Browse to the CPort directory. Select CPort.toc.

Click on the "Index" tab. Click Add Files. Select CPort.hlp. Click on the "Link" tab. Click Add Files. Select CPort.hlp. Select File Menu/Save Project Item. Exit program. Note that Borland's OpenHelp utility does not prompt you if you close the program and forget to save your changes, so you must remember to do so yourself.

9. Known problems and issues

1.) OnRxBuf event handler problem in Delphi IDE

 If user double clicks on OnRxBuf event in Delphi IDE, message pops up saying: "Property and Method ComPort1RxBuf are not compatible".
This is a Delphi IDE bug, since it can't handle untyped parameters like Buffer parameter of OnRxBuf event.
Solution: Application has to assign OnRxBuf handler manually in code. 

2.) Two serial ports sharing the same IRQ address

 Some users of Windows 95/98 have reported that application can't have
two TComPort components open simultaneouslly if serial ports share the
same IRQ address. This usually COM1/COM3 and COM2/COM4.
Solution: Not known yet.

3.) No integrated help for Delphi 2005 or 2006.

 Solution: Manually open .HLP file with Windows Help.

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages