Drew Wutka
DWUTKA at Marlow.com
Tue Jun 30 14:10:13 CDT 2009
Yes, but it's returning IP information, not performing TCP/IP comms. The basics are there, but to 'return' comms, using strictly API's, you have to have a Callback function, because an incoming connection has to alert your code to something happening. Callback functions in VBA worked great in Access 97 (with a custom 'AddressOf' function), but suck in 2000 and on, because if they are 'active' and you go into debug mode, it will wreak havoc with Access. Drew -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Max Wanadoo Sent: Tuesday, June 30, 2009 2:00 PM To: 'Discussion concerning Visual Basic and related programming issues.' Subject: Re: [dba-VB] Messaging For JWC WAS: Syslogs Drew, have you looked at Stuart's posting. It is all API and works fine. Max -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Drew Wutka Sent: 30 June 2009 19:46 To: Discussion concerning Visual Basic and related programming issues. Subject: Re: [dba-VB] Messaging For JWC WAS: Syslogs Native does put a crimp in things. TCP/IP communications is pretty easy with a Winsock control. It can be done with API's but it's a pain, and you need to deal with callback functions, which have issues in and of themselves in Access 2000 and on. If you were ok with an .ocx, I could whip that up, if you need something native, that would require callbacks, and a lot more coding. If you want to play around with it, what you need to do is use UDP to 'broadcast' a hello and goodbye message, to alert everything on the subnet. (And you have to filter that message on the broadcasting machine, cause it'll pick up it's own message). In that hello/goodbye message, you can include all the info you want (username, computername, IP,etc). Then it's just a matter of using TCP for direct comms between two machines. Drew -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Tuesday, June 30, 2009 12:45 PM To: Discussion concerning Visual Basic and related programming issues. Subject: Re: [dba-VB] Messaging For JWC WAS: Syslogs Drew, I really want this but it has to be vba native, no OCXs. I am familiar with OCXs that are part of Access, and that is OK. This would be used with my framework and I cannot guarantee that i can register anything. It has to just work. John W. Colby www.ColbyConsulting.com Drew Wutka wrote: > Is this something you really want? > > It would be pretty simple to create an OCX that you could have on a > hidden form, that would 'see' all running instances of your application, > and be able to 'communicate' to them. > > There is one quirk. It'll work on a standard network. However, if your > network is subnetted, it would only 'see' what's in the local subnet > (because the best way to do this is to send out a broadcast 'hello' and > 'goodbye' message). To work with a subnetted network, you'd have to > come up with a 'server/client' scenario, so the server would see all the > connected users (sort of like a custom DNS server). > > If you aren't worried about a subnetted network, let me know, I am > pretty sure I can whip up an OCX to do what you want. > > Drew _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com The information contained in this transmission is intended only for the person or entity to which it is addressed and may contain II-VI Proprietary and/or II-VI Business Sensitive material. If you are not the intended recipient, please contact the sender immediately and destroy the material in its entirety, whether electronic or hard copy. You are notified that any review, retransmission, copying, disclosure, dissemination, or other use of, or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com The information contained in this transmission is intended only for the person or entity to which it is addressed and may contain II-VI Proprietary and/or II-VI Business Sensitive material. If you are not the intended recipient, please contact the sender immediately and destroy the material in its entirety, whether electronic or hard copy. You are notified that any review, retransmission, copying, disclosure, dissemination, or other use of, or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited.