RTC Forums
November 23, 2024, 01:05:39 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
 
   Home   Help Login Register  
Pages: [1]
  Print  
Author Topic: UDP from DLL.  (Read 4868 times)
SteveG
RTC License++
*****
Posts: 17


« 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


Logged
D.Tkalcec (RTC)
Administrator
*****
Posts: 1881


« Reply #1 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.
Logged
SteveG
RTC License++
*****
Posts: 17


« Reply #2 on: March 13, 2018, 01:37:06 AM »

Hi Danijel,

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

Regards,

Steve
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!
Page created in 0.024 seconds with 16 queries.