Basic programming questions

 

Hi,

I want to import some functions from a dll. Therefore I had to include some *.h files.

Is this possible, or do I have to write *.mqh instead of *.h?


The dll if for a c-programming language.
And there are functions with pointers and structs as datatyps. Is it possible to use that with mql4??

 

What you name the files is irrelevant as long as your include statement matches.

What is in the file(s) must be mql4 code, so including a .h with c language will NEVER work.

 
Is it possible to use pointers and structures in mql4?
 
 
sunshineh:

Hi,

I want to import some functions from a dll. Therefore I had to include some *.h files.

Is this possible, or do I have to write *.mqh instead of *.h?

The dll if for a c-programming language.
And there are functions with pointers and structs as datatyps. Is it possible to use that with mql4??

Hi sunshineh,

.h is for C/C++ header, while .mqh - which stand for MetaQuotes Header - is for MQL4 language, so we can not mix them.

You can't use pointers and structs in MQL4. You can call anything in .dll from MQL4. Here's how to write .dll in C++ (http://www.psnouvion.com/projects/view/mt4_sample_dll).

:D

 
Thank you for your helpful answer and your link!
Reason: