K
K
Kalombyr2022-02-18 14:47:08
C++ / C#
Kalombyr, 2022-02-18 14:47:08

Is it possible to replace the WS2_32 library and is there a ready-made wrapper?

Hello.
A third party application uses UDP sockets on the localhost. Packets are lost/replaced during high-speed communications. Lots of data.
The application uses the system WS2_32.dll
thought maybe you can just replace this library with your own? And instead of UDP communicate directly from your library or will there be many pitfalls?
If not, maybe there is a header for it as a wrapper?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
res2001, 2022-02-18
@res2001

I thought maybe you can just replace this library with your own?

Just put your library with the same name in the directory with the program.
The Windows loader first looks for libraries in the directory with the running program and only then in other places specified in PATH. This also applies to system libraries, incl.
But you will have to replicate the WS2_32 interface and implement your own efficient exchange mechanism.
If the source code for the application is available, then it may be easier to change the exchange mechanism in the application itself.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question