Sample MS Visual Studio 2022 C++ solution for a DLL

 
I am looking for a sample MS Visual Studio 2022 C++ solution for a DLL that works with both MT5 and MT4, sending and receiving various types of datasets, e.g. string, structs, ints, bools, unions etc. Thanks
 

Have a look in the Articles for examples. Here are just two examples ...

Articles

WebSockets for MetaTrader 5 — Using the Windows API

Francis Dube, 2022.01.18 12:38

In this article, we will use the WinHttp.dll to create a WebSocket client for MetaTrader 5 programs. The client will ultimately be implemented as a class and also tested against the Binary.com WebSocket API.

Articles

Using AutoIt With MQL5

Francis Dube, 2021.12.01 09:22

Short description. In this article we will explore scripting the MetraTrader 5 terminal by integrating MQL5 with AutoIt. In it we will cover how to automate various tasks by manipulating the terminals' user interface and also present a class that uses the AutoItX library.
MQL5 Articles
MQL5 Articles
  • www.mql5.com
MQL5 Programming Articles
 
Fernando Carreiro #:

Have a look in the Articles for examples. Here are just two examples ...

Thanks, however these are existing DLLs. I am looking for a C++ Visual Studio solution that can produce these DLLs with various data type exchanges.

 
Faisal Mahmood #: Thanks, however these are existing DLLs. I am looking for a C++ Visual Studio solution that can produce these DLLs with various data type exchanges.

Then put in the effort and search the Articles more. We are not going to do your research for you. Here are two more examples ...

Articles

A DLL for MQL5 in 10 Minutes (Part II): Creating with Visual Studio 2017

Andrei Novichkov, 2019.05.13 11:39

The original basic article has not lost its relevance and thus if you are interested in this topic, be sure to read the first article. However much time has passed since then, so the current Visual Studio 2017 features an updated interface. The MetaTrader 5 platform has also acquired new features. The article provides a description of dll project development stages, as well as DLL setup and interaction with MetaTrader 5 tools.

Articles

How to Exchange Data: A DLL for MQL5 in 10 Minutes

Renat Fatkhullin, 2010.01.27 13:31

Now not so many developers remember how to write a simple DLL, and what are special features of different system binding. Using several examples, I will try to show the entire process of the simple DLL's creation in 10 minutes, as well as to discuss some technical details of our binding implementation. I will show the step-by-step process of DLL creation in Visual Studio with examples of exchanging different types of variables (numbers, arrays, strings, etc.). Besides I will explain how to protect your client terminal from crashes in custom DLLs.