Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
MSCommLib.MSComm.1?
Message
De
05/01/2001 17:13:35
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Contrôles ActiveX en VFP
Divers
Thread ID:
00459230
Message ID:
00460094
Vues:
23
Larry:

Hi and thanks again for your help.

Yes, it's working and that IS important. However, I'm still a little worried about the unreliability factor - I have not experienced it yet though.

If you do a search on MSComm (not MSComm32) you will find a few posts that HINTS at the unreliability of the MSComm32's OnCommEvent and using VFPCOM or a VB ActiveX to make it work better.

Also take a look at Message #255866 from Ed Rauh. Actually, the entire Thread (#255462) is interesting.

Mal


>Mal,
>First off, I'm glad you got it working. That's usually the most important thing.
>
>I don't remember the thread you are talking about so what is the unreliability of the OnComm event? Can you sum it up or point me to the thread?
>
>I guess I must be missing something this morning but it seems to me if there is a problem with OnComm firing then that would negate both techniques. Because BindEvents associates events of two classes, if the OnComm doesn't fire in the MSComm32 control (for whatever reason), then it won't fire in your Form class either.
>
>>Hi Larry:
>>
>>I origianlly had it the way you just described, however, there were a few posts here regarding the unreliablity of MSComm32's OnCommEvent and to use VFPCOM's BindEvent I listened - didn't want to run into problems later and went the recommended route.
>>
>>Now I'm not sure what is the best route, but, not being able to distribute MSComm32 is a BIG BIG problem. I am forced to go the original route, and as per your suggestion, of using the MSComm32's OnCommEvent.
>>
>>Very glad you had an answer for me regarding the "Appropriate license..." error message though, THANK YOU.
>>
>>Mal
>>
>>
>>>Mal,
>>>Instead of creating an object in memory and using VFPComm to bind to the object, add the control to a form and in the OnComm event of the OLEControl, call the OnComm (or some other) method in the form.
>>>
>>>I recommend using VFPCOM for things like ADO, Excel or Word.
>>>
>>>HTH.
>>>
>>>>Hi Larry:
>>>>
>>>>Thanks for your reply. Very interesting comments.
>>>>
>>>>Before I try this, however, I'd like to qualify some points, if you don't mind.
>>>>
>>>>This is what I my present code looks like regarding MSComm32:
>>>>oComm = CREATEOBEJCT("MSCommLib.MSComm.1")
>>>>goVFPCOM.BindEvents(.oComm,THISFORM)
>>>>*In THISFORM I have a OnComm property.
>>>>
>>>>Now, are you suggesting that I abandon the above "bindevents" and directly use the control (MSComm32) in THISFORM? ...or.. Is this to use my code AS IS but just add MSComm32 as a control in THISFORM but do nothing with it?
>>>>
>>>>TIA
>>>>
>>>>
>>>>>>Hi All
>>>>>>
>>>>>>I created an application using MSComm32.OCX. All works fine on my developement machine (w/Visual Studio loaded). MSComm32.OCX is instantiated as oComm = CREATEOBEJCT("MSCommLib.MSComm.1") in the application.
>>>>>>
>>>>>>However, when I install my application on another machine (a workstation w/o Visual Studio) and I copying MSComm32.OCX to the workstation's C:\Windows\System directory, I get an "Appropriate license for this class not found" error. I've also tried REGSCR32 C:\WINDOWS\SYSTEM\MSCOMM32.OCX but to no avail.
>>>>>>
>>>>>>License for MSComm32.OCX? Is this correct?
>>>>>>
>>>>>>Any advice would be appreciated.
>>>>>>
>>>>>>TIA
>>>>>
>>>>>When you create an ActiveX control via Createobject/Newobject, the new object believes it is being created in the development environment. If that is the case then it looks for the appropriate license file. In this case, MSCOMM32 looks for the appropriate registry entries because it doesn't use LIC files.
>>>>>
>>>>>In order to alleviate this, you need to add a MSCOMM32 control to a form. This way, if registered properly (e.g. using regsvr32), it won;t look for the license information because it will believe it is be distributed in a run-time capacity.
>>>>>
>>>>>HTH.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform