I have a number of questions on interfacing to a DLL and have not been able to find the answers elsewhere.
1. Does the DLL.STRING declaration pass pass a string or a pointer to a string to the DLL? If it passes a pointer to the string and the DLL modifies it, how is the string space malloc'd? (The easiest way is to init the string in the efs with at elast as many spaces as the DLL needs - is this okay?)
2. Is DLL.INT 32 bits?
3. If I want to pass a pointer to a float to a dll, do I declare a DLL.FLOATARRAY and pass only the single var?
4. When a pointer is passed to a DLL, is it a far pointer?
5. Does the javascript engine automatically cast the types for a DLL call? For example, if I pass a variable containing an integer as a parameter declared as DLL.FLOAT, will the integer be automatically cast to a float?
A few non-dll questions:
1. My DLL assumes all price data is in integer format for speed reasons. Thus, I don't wnat to pass, say, close() to my DLL - I need to integer-ize it first. For example, e-mini prices multiplied by 100 will eliminate the decimal point and I can now pass the data via DLL.INT. For any given symbol, how can I automatically determine the multiplication constant?
2. The plot functions reference bars by bar number. If I wnat ot plot a line from some date and time to another, is there a means to convert that to the appropriate bar numbers or do I need to manually calculate that?
Thanks in advance.
1. Does the DLL.STRING declaration pass pass a string or a pointer to a string to the DLL? If it passes a pointer to the string and the DLL modifies it, how is the string space malloc'd? (The easiest way is to init the string in the efs with at elast as many spaces as the DLL needs - is this okay?)
2. Is DLL.INT 32 bits?
3. If I want to pass a pointer to a float to a dll, do I declare a DLL.FLOATARRAY and pass only the single var?
4. When a pointer is passed to a DLL, is it a far pointer?
5. Does the javascript engine automatically cast the types for a DLL call? For example, if I pass a variable containing an integer as a parameter declared as DLL.FLOAT, will the integer be automatically cast to a float?
A few non-dll questions:
1. My DLL assumes all price data is in integer format for speed reasons. Thus, I don't wnat to pass, say, close() to my DLL - I need to integer-ize it first. For example, e-mini prices multiplied by 100 will eliminate the decimal point and I can now pass the data via DLL.INT. For any given symbol, how can I automatically determine the multiplication constant?
2. The plot functions reference bars by bar number. If I wnat ot plot a line from some date and time to another, is there a means to convert that to the appropriate bar numbers or do I need to manually calculate that?
Thanks in advance.
Comment