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 Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Unable to register MSComm

Status
Not open for further replies.

Raccoon

Programmer
Aug 18, 1999
92
US
I have the following code:


ComForm = CREATEOBJECT('Form') && Create object to hold MSComm
ComForm.ADDOBJECT("Testcom","Olecontrol","MSCOMMLib.MSComm") && Load MSComm
ComForm.Testcom.CommPort = 1 && Use Comm1, The first Serial Port.
ComForm.Testcom.Settings = "9600,N,8,1" && 9.6 Kbaud, No Parity, 8 data Bits, 1 Stop Bit
ComForm.Testcom.Sthreshold = 0 && send immediate - no char held in buffer
ComForm.Testcom.PortOpen = .T. && open the port
ComForm.Testcom.OUTPUT = CHR(27) + "R01" && move back up for centering purposes


I can build and run on my develope machine just fine. When I try to run from another workstation, I get the error object not registered. I then get an error from each of the remaining lines that Testcom does not exist, which it wouldn't if the first line bombed.

I have tried making sure Active-X was checked for Microsoft Communications in the setup wizard (VFP6). I have tried copying all the MSComm32 files to the WINNT\SYSTEM32 directory and running regsvr32 to manually register and am told that the register was successful.

Does anyone have any suggestions at this point? My boss is muttering Visual Basic and something about new programming team at this point.
 
Check in the registry on that machine to see if it really is registered;

Look at HKEY_CLASSES_ROOT\MSCOMMLib.MSComm and see if it makes sense.

You need administrator access to register activex controls.
 
This "problem" is a variant (different OCX) of the one described in - "INFO: OLE Control Licensing in Visual FoxPro (Q139154)". The final example shows a way around the problem.

You may want to also read - "BUG: License Error with ActiveX Control Added at Run-Time (Q192693)"

Rick
 
I checked in the registry, and it shows the MSCOMMLib.MSComm entry.

My error does not say anything about license, just that the object is not registered.

????
 
I tried the workaround rgbean suggested. Now, on the client only, I get an error "String too long". Again, it is when the comm object is trying to be set up.

ComForm = CREATEOBJECT('Form') && Create object to hold MSComm
ComForm.NEWOBJECT("Testcom","serialcontrol","utilities.vcx") && Load MSComm

ComForm.Testcom.CommPort = 1 && Use Comm1, The first Serial Port.
ComForm.Testcom.Settings = "9600,N,8,1" && 9.6 Kbaud, No Parity, 8 data Bits, 1 Stop Bit
ComForm.Testcom.Sthreshold = 0 && send immediate - no char held in buffer
ComForm.Testcom.PortOpen = .T. && open the port
ComForm.Testcom.OUTPUT = CHR(27) + "R01" && move back up for centering purposes

I can not re-create this error on my develope machine. My boss is muttering Access and asking for international phone directories.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top