Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Exchanging LAN messages with winsock
Message
De
26/07/2009 20:33:30
 
 
À
24/07/2009 10:53:10
Information générale
Forum:
Visual FoxPro
Catégorie:
Contrôles ActiveX en VFP
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Vista
Network:
Windows XP
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01413389
Message ID:
01414658
Vues:
35
>>>>>years ago... Into a client`s plant... I saw an instant messenger to exchange messages between users of a LAN
>>>>>
>>>>>since that I`ve wondering how hard was to have that in our VFP app.
>>>>>
>>>>>By winsock, does anyone had any experience under VFP9 that mind to share here.. I mean, any small, or even complex one IM.
>>>>>
>>>>>TIA
>>>>>
>>>>>Claudio
>>>>
>>>>Below is a link to a FAQ I wrote on Tek-Tips some years ago. The example simply sends the messages back and forth via the loopback address (127.0.0.1) but you can change those to be local ip addresses to send messages back and forth between two machines on your LAN. It is a fairly simple/straightforward example and should give you the basics you need...
>>>>
>>>>http://www.tek-tips.com/faqs.cfm?fid=3883
>>>
>>>Cooooolll... exactly what I've been searching for... Thanks...
>>Hi Claudio
>>
>>Be very very careful of the Winsock Activex as it is a heavy memory leaker. It has never been updated and still leaks like a sieve especially for an application as you want to make.
>>
>>I had created an Intranet chat app in my vfp app using the winsock OCX . In testing with a couple of users it "seemed" to work. However when deployed on the server and used by many users, it started leaking memory.
>>
>>Since the app was running off a server in Terminal Services it brought down 2 TS Servers in our farm before I caught it.
>>
>>It was so bad that when runningthe task manager in TS you could actually see certain user's sessions memory just winding up till they crashed.
>>
>>I have removed that module and never installed it again.
>>
>>Please be very careful especially when using it on a LAN.
>>
>>This is my experience. I would suggest you call the winsock.dll API directly rather than use the WINSOCK.OCX.
>>
>Hi Bernard...
>
>Many thanks for your advice... By now, I have an application running that control microtherminals IP and you mention the exactly behavior now under this server.
>
>I don't have any idea how to migrate from OCX to DLL.. Do you have any website where should I see some resource on how may I change it??
>
>Thanks in advance

Hi Claudio

I do not have any specific site, but basically you would have to write your own wrapper class to substitute for making the calls to the winsoc API.

I suggest you do a search on google for "VFP Winsock API". Also search at News2News and the foxpro wiki.

Here is one useful link I found using the above search with some example VFP code to get you started:
http://www.xfrx.net/vfpWinsock/SendMaildownload_e.asp

Otherwise search for some cheap alternative OCX and use that - search for WINSOCK API (without the VFP). I am sure there are a number of such activex components under $100. Also that is much faster (and cheaper) in the long run to buy a tested component with support.
And much safer when bringing down your servers with huge memory leaks is the alternative.

http://www.catalyst.com/products/socketwrench/standard/index.html do an activex for $99 only. A great saving in time and money.

Always test these anyway for memory leaks.


Good luck.
Bernard
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform