and again dll and market - page 4

 
Nikolai Karetnikov:

Would the Market Advisor be able to write a text file as a resource?

Then I would form the file with closed code and change the extension with open code and play it back

A market Expert Advisor can:

1. Write data to an internal resource, which can be parsed by the user EA, if it knows the path to that resource and will work in parallel. What the Expert Advisor will do with the read information, only the user knows.
2. It can send data to an ordinary file, which the Expert Advisor will include as a resource and "digest" its content using its algorithms.


 
Реter Konow:
Try it. Trying, as they say, is not a torture)
Then, here, tell me whether it worked or not.

I've started to try it out and now I have a question.

The winapi\fileapi.mqh library

#include <WinAPI\windef.mqh>

//+------------------------------------------------------------------+
//|                                                                  |
//+------------------------------------------------------------------+
#import "kernel32.dll"
int    AreFileApisANSI(void);
int    CompareFileTime(FILETIME &file_time1,FILETIME &file_time2);
int    CreateDirectoryW(const string path_name,PVOID security_attributes);
HANDLE CreateFile2(const string file_name,uint desired_access,uint share_mode,uint creation_disposition,CREATEFILE2_EXTENDED_PARAMETERS &create_ex_params);
HANDLE CreateFileW(const string file_name,uint desired_access,uint share_mode,PVOID security_attributes,uint creation_disposition,uint flags_and_attributes,HANDLE template_file);
int    DefineDosDeviceW(uint flags,const string device_name,const string target_path);
int    DeleteFileW(const string file_name);
int    DeleteVolumeMountPointW(const string volume_mount_point);
int    FileTimeToLocalFileTime(FILETIME &file_time,FILETIME &local_file_time);
int    FindClose(HANDLE find_file);
int    FindCloseChangeNotification(HANDLE change_handle);
HANDLE FindFirstChangeNotificationW(const string path_name,int watch_subtree,uint notify_filter);
HANDLE FindFirstFileExW(const string file_name,FINDEX_INFO_LEVELS info_level_id,FIND_DATAW &find_file_data,FINDEX_SEARCH_OPS search_op,PVOID search_filter,uint additional_flags);
HANDLE FindFirstFileNameW(const string file_name,uint flags,uint &StringLength,ushort &LinkName[]);
HANDLE FindFirstFileW(const string file_name,FIND_DATAW &find_file_data);
HANDLE FindFirstStreamW(const string file_name,STREAM_INFO_LEVELS InfoLevel,FIND_STREAM_DATA &find_stream_data,uint flags);
HANDLE FindFirstVolumeW(ushort &volume_name[],uint &buffer_length);
int    FindNextChangeNotification(HANDLE change_handle);
int    FindNextFileNameW(HANDLE find_stream,uint &StringLength,ushort &LinkName[]);
int    FindNextFileW(HANDLE find_file,FIND_DATAW &find_file_data);
int    FindNextStreamW(HANDLE find_stream,FIND_STREAM_DATA &find_stream_data);
int    FindNextVolumeW(HANDLE find_volume,ushort &volume_name[],uint &buffer_length);
int    FindVolumeClose(HANDLE find_volume);
int    FlushFileBuffers(HANDLE file);
uint   GetCompressedFileSizeW(const string file_name,uint &file_size_high);
int    GetDiskFreeSpaceExW(const string directory_name,ulong &free_bytes_available_to_caller,ulong &total_number_of_bytes,ulong &total_number_of_free_bytes);
int    GetDiskFreeSpaceW(const string root_path_name,uint &sectors_per_cluster,uint &bytes_per_sector,uint &number_of_free_clusters,uint &total_number_of_clusters);
uint   GetDriveTypeW(const string root_path_name);
int    GetFileAttributesExW(const string file_name,GET_FILEEX_INFO_LEVELS info_level_id,FILE_ATTRIBUTE_DATA &file_information);
uint   GetFileAttributesW(const string file_name);
int    GetFileInformationByHandle(HANDLE file,BY_HANDLE_FILE_INFORMATION &file_information);
uint   GetFileSize(HANDLE file,uint &file_size_high);
int    GetFileSizeEx(HANDLE file,long &file_size);
int    GetFileTime(HANDLE file,FILETIME &creation_time,FILETIME &last_access_time,FILETIME &last_write_time);
uint   GetFileType(HANDLE file);
uint   GetFinalPathNameByHandleW(HANDLE file,ushort &file_path[],uint file_path,uint flags);
uint   GetFullPathNameW(const string file_name,uint buffer_length,ushort &buffer[],ushort &file_part[]);
uint   GetLogicalDrives(void);
uint   GetLogicalDriveStringsW(uint buffer_length,ushort &buffer[]);
uint   GetLongPathNameW(const string short_path,string &long_path,uint buffer);
uint   GetShortPathNameW(const string long_path,string &short_path,uint buffer);
uint   GetTempFileNameW(const string path_name,const string prefix_string,uint unique,ushort &temp_file_name[]);
uint   GetTempPathW(uint buffer_length,ushort &buffer[]);
int    GetVolumeInformationByHandleW(HANDLE file,ushort &volume_name_buffer[],uint volume_name_size,uint &volume_serial_number,uint &maximum_component_length,uint &file_system_flags,ushort &file_system_name_buffer[],uint file_system_name_size);
int    GetVolumeInformationW(const string root_path_name,ushort &volume_name_buffer[],uint volume_name_size,uint &volume_serial_number,uint &maximum_component_length,uint &file_system_flags,ushort &file_system_name_buffer[],uint file_system_name_size);
int    GetVolumeNameForVolumeMountPointW(const string volume_mount_point,string volume_name,uint buffer_length);
int    GetVolumePathNamesForVolumeNameW(const string volume_name,string volume_path_names,uint buffer_length,uint &return_length);
int    GetVolumePathNameW(const string file_name,ushort &volume_path_name[],uint buffer_length);
int    LocalFileTimeToFileTime(FILETIME &local_file_time,FILETIME &file_time);
int    LockFile(HANDLE file,uint file_offset_low,uint file_offset_high,uint number_of_bytes_to_lock_low,uint number_of_bytes_to_lock_high);
int    LockFileEx(HANDLE file,uint flags,uint reserved,uint number_of_bytes_to_lock_low,uint number_of_bytes_to_lock_high,OVERLAPPED &overlapped);
uint   QueryDosDeviceW(const string device_name,ushort &target_path[],uint max);
int    ReadFile(HANDLE file,ushort &buffer[],uint number_of_bytes_to_read,uint &number_of_bytes_read,OVERLAPPED &overlapped);
int    ReadFile(HANDLE file,ushort &buffer[],uint number_of_bytes_to_read,uint &number_of_bytes_read,PVOID overlapped);
int    ReadFileScatter(HANDLE file,FILE_SEGMENT_ELEMENT &segment_array[],uint number_of_bytes_to_read,uint &reserved,OVERLAPPED &overlapped);
int    ReadFileScatter(HANDLE file,FILE_SEGMENT_ELEMENT &segment_array[],uint number_of_bytes_to_read,uint &reserved,PVOID overlapped);
int    RemoveDirectoryW(const string path_name);
int    SetEndOfFile(HANDLE file);
void   SetFileApisToANSI(void);
void   SetFileApisToOEM(void);
int    SetFileAttributesW(const string file_name,uint file_attributes);
int    SetFileInformationByHandle(HANDLE file,FILE_INFO_BY_HANDLE_CLASS FileInformationClass,FILE_INFO &file_information,uint buffer_size);
int    SetFileIoOverlappedRange(HANDLE FileHandle,uchar &OverlappedRangeStart,ulong Length);
uint   SetFilePointer(HANDLE file,long distance_to_move,long &distance_to_move_high,uint move_method);
int    SetFilePointerEx(HANDLE file,long distance_to_move,long &new_file_pointer,uint move_method);
int    SetFileTime(HANDLE file,FILETIME &creation_time,FILETIME &last_access_time,FILETIME &last_write_time);
int    SetFileValidData(HANDLE file,long ValidDataLength);
int    UnlockFile(HANDLE file,uint file_offset_low,uint file_offset_high,uint number_of_bytes_to_unlock_low,uint number_of_bytes_to_unlock_high);
int    UnlockFileEx(HANDLE file,uint reserved,uint number_of_bytes_to_unlock_low,uint number_of_bytes_to_unlock_high,OVERLAPPED &overlapped);
int    WriteFile(HANDLE file,const ushort &buffer[],uint number_of_bytes_to_write,uint &number_of_bytes_written,OVERLAPPED &overlapped);
int    WriteFile(HANDLE file,const ushort &buffer[],uint number_of_bytes_to_write,uint &number_of_bytes_written,PVOID overlapped);
int    WriteFileGather(HANDLE file,FILE_SEGMENT_ELEMENT &segment_array[],uint number_of_bytes_to_write,uint &reserved,OVERLAPPED &overlapped);
int    WriteFileGather(HANDLE file,FILE_SEGMENT_ELEMENT &segment_array[],uint number_of_bytes_to_write,uint &reserved,PVOID overlapped);
#import
//+------------------------------------------------------------------+

how come the CopyFileW function is missing?

 
Nikolai Karetnikov:

Started trying it out and now I have a question.

The winapi\fileapi.mqh library

how come the CopyFileW function is missing?

I don't know it. If its prototype is not in the list, it must be from some other dll function assembly.
 
Judging from what Renat said in the parallel thread, this call is obsolete and only suits 32-bit versions of the terminal.

Here is a link to the topic: https://www.mql5.com/ru/forum/342311
 
Nikolai Karetnikov:

oops )

What gets in the way is that the vbs script accesses the windows voice engine

I think you're riding a very complicated wheel :)

there are free voice engines from mcrosoft and google

Microsoft's is googled in the first few querieshttp://speech-text.narod.ru/chap5.html


well and on the subject, you are not the first to find \MQL5\Include\WinAPI

but the MQ policy has not been changed:

- security of MQL programs must be ensured, so all freely distributed programs must work inside "MQL sandbox" (calls, access to files)

- for personal use or as tutorials, you may use the possibility to call .dll

 
It seems that the EA using the voice engine from Windows will not be able to enter the market. Here you have an insurmountable boundary in the development of marketable EAs).

A pity, of course. In the future, gesture control might be possible.
 
Реter Konow:
It looks like there's no way to enter the market with an EA that uses the voice engine of Windows. So much for the insurmountable boundary in the development of sellable EAs).

A pity, of course. In the future, gestural control might be possible.

To me the idea of giving voice commands to the terminal or listening to what EA is saying looks like a kind of neurosis about to turn into a complicated form of psychosis or other illnesses

)))

imho, only to poke fun at the possibilities of technology


ZS:

I use OK-Google on the phone, handy search, practical, probably a PC to use multimedia or Internet surfing

but what can i tell the terminal? open an order! price go faster to the take! WOW, WOW!

 
Igor Makanu:

I think you're making up some kind of complicated bicycle :)

there are free voice engines from microsoft and google

Microsoft is googled in the first few querieshttp://speech-text.narod.ru/chap5.html.


well and on the subject, you are not the first to find \MQL5\Include\WinAPI

but the MQ policy has not been changed:

- security of MQL programs must be ensured, so all freely distributed programs must work inside "MQL sandbox" (calls, access to files)

- for personal use or as tutorials, you may use the possibility to call .dll.

This would be a waste of time.

My owl only prepares text for playback by the engine built into the windup

 
Igor Makanu:

To me the idea of commanding a terminal with voice commands or listening to what EA is up to looks like some kind of neurosis about to develop into a complicated form of psychosis or related illnesses

)))

imho, only to poke fun at the possibilities of technology


ZS:

I use OK-Google on the phone, handy search, practical, probably a PC to use multimedia or Internet surfing

but what can i tell the terminal? open an order! the price goes faster to the take! WOW, WOW!

)))

the idea is not voice control of the terminal and the universe ))), but voice guidance. Let's say every five minutes to sound out the price of an instrument from a set, or have the ability to set up voice alerts. Such thing as "Alerts" exist in the terminal, when they are triggered a short sound signal is played, but what instrument it refers to, it is impossible to understand

 
Nikolai Karetnikov:

that would be a waste of time.

My owl only prepares the text for playback by the engine built into the windup

write it in a file, in MQL5/Files and explain how to put the windows engine on it. For unix/linux it's a script literally in a few lines, for powershell I suspect the same.