Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

RegFn causes an error "Entry Point OpenComm not Found"

Status
Not open for further replies.

VicGarra

Programmer
Jun 6, 2001
6
AU
I am tring to send data to com1 using VFP3 - which works however when I run the same program using FPW26.

Code is as follows:

set library to sys(2004)+ "foxtools.fll" additive

opencomm = RegFn("OpenComm", "CII", "I")
writecomm = RegFn("WriteComm", "ICI", "I")

The opencomm line above reports the error message
"Entry Point OpenComm Not Found"

We have hunted everywhere ( all manuals ) to find what the message means - top no avail. Desperation has now set in !!!

This is part of a procedure provided with FPW26 called DIALER.PRG which works perfectly under FPW26.

Can someone please help - thanks.
 
I'm not sure how they were working in FPW 2.6, these are not standard WinAPI functions - unless they were strictly 16-bit calls in Win 3.x. (i.e. They are not part of Win95 -> XP API.)

In a 32-bit environment (VFP under anything greater than Win 3.1), you'd normally use the DLL DECLARE function rather than using the RegFn() in FoxTools. Also here, you'll want to use MSCOMM32 to access the COM ports.

Some sample code for accessing serial data in VFP using MSCOMM32 can be found in the following:
- HOWTO: Receive from the Serial Port by Using MScomm32.ocx.
Also useful may be
- HOWTO: Send to the Serial Port by Using Mscomm32.ocx.
And of course, - HOWTO: Transmit and Receive Binary Data using MSCOMM32.

If MSCOMM32 doesn't provide you with enough control, you'll need to find another 3rd party control to handle the serial communication. Remember that in the Windows environment, it controls the I/O ports - you can't do it directly - especially in WinNT and Win2000.

Rick
 
The message literally means that Fox can't find the OpenComm function in any of the registered .DLLs. You may have to figure out which one it is, and include it in your RegFn call, or copy it to the system directory.

opencomm = RegFn("OpenComm", "CII", "I", "SomeDll.DLL")

Since COM port I/O is not at all reliable with FoxPro < 3.0, I would suggest you look into a third party package from the start.

Dave S.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top