Article-22714-Volatility-Mo.../Include/slsqp_article/win32_utils.mqh
2026-06-03 20:14:05 +02:00

60 行
2.7 KiB
MQL5

//+------------------------------------------------------------------+
//| win32_utils.mqh |
//| Copyright 2025, MetaQuotes Ltd. |
//| https://www.mql5.com |
//+------------------------------------------------------------------+
#property copyright "Copyright 2025, MetaQuotes Ltd."
#property link "https://www.mql5.com"
#include<WinAPI\winapi.mqh>
//---
#define WORD ushort
#define DWORD uint
#define BYTE uchar
#define LPVOID uint
#define BOOL bool
#define PHANDLE HANDLE&
//+------------------------------------------------------------------+
//| security attributes |
//+------------------------------------------------------------------+
struct SECURITY_ATTRIBUTES {
DWORD nLength;
PVOID lpSecurityDescriptor;
BOOL bInheritHandle;
};
//---
#define LPSECURITY_ATTRIBUTES SECURITY_ATTRIBUTES&
#define STD_INPUT_HANDLE ((DWORD)-10)
#define STD_OUTPUT_HANDLE ((DWORD)-11)
#define STD_ERROR_HANDLE ((DWORD)-12)
#define HANDLE_FLAG_INHERIT 0x00000001
#define STARTF_USESTDHANDLES 0x00000100
#define CREATE_NO_WINDOW 0x08000000
#define DETACHED_PROCESS 0x00000008
#define WAIT_TIMEOUT 0x00000102
#define INFINITE 0xFFFFFFFF
//+------------------------------------------------------------------+
//| kernel32 dll imports |
//+------------------------------------------------------------------+
#import "kernel32.dll"
DWORD WaitForSingleObject(HANDLE hHandle,DWORD dwMilliseconds);
#import
//+------------------------------------------------------------------+
//| defines |
//+------------------------------------------------------------------+
// #define MacrosHello "Hello, world!"
// #define MacrosYear 2010
//+------------------------------------------------------------------+
//| DLL imports |
//+------------------------------------------------------------------+
// #import "user32.dll"
// int SendMessageA(int hWnd,int Msg,int wParam,int lParam);
// #import "my_expert.dll"
// int ExpertRecalculate(int wParam,int lParam);
// #import
//+------------------------------------------------------------------+
//| EX5 imports |
//+------------------------------------------------------------------+
// #import "stdlib.ex5"
// string ErrorDescription(int error_code);
// #import
//+------------------------------------------------------------------+