RTC Forums

Subscription => Support => Topic started by: SteveG on March 08, 2018, 06:35:21 AM



Title: UDP from DLL.
Post by: SteveG on March 08, 2018, 06:35:21 AM
Hi Danijel,

I realise that the UDP components included with the RTC SDK are not "officially supported" but I thought I'd ask because they are really good components that I find very useful.

Using the TRtcUDPClient and TRtcUDPServer components in executables I can successfully broadcast messages over a local network (using either the "global" broadcast address or the local network broadcast address).

However, if I try to use the same code in a DLL (which is loaded by a Windows service) it doesn't appear to work.  Is there something specific I need to do to use the TRtcUDPClient component from a DLL?

Thanks.

Regards,

Steve




Title: Re: UDP from DLL.
Post by: D.Tkalcec (RTC) on March 08, 2018, 08:51:32 AM
TRtcUdpClient and TRtcUdpServer components are implemented using the Async WinSock API, which requires a Windows message queue to work, so you need to set their MultiThreaded property to TRUE when they are used from a Windows Service and/or a DLL, and ... make sure that your code using the components is thread-safe.


Title: Re: UDP from DLL.
Post by: SteveG on March 13, 2018, 01:37:06 AM
Hi Danijel,

Sorry for the late response.  Thanks for the explanation and solution!

Regards,

Steve