Can't find DLL

Questions about MultiCharts and user contributed studies.
bruce.mtpredictor
Posts: 9
Joined: 20 Oct 2014

Can't find DLL

Postby bruce.mtpredictor » 28 Oct 2014

Here is the Power language code test the DLL call:

Code: Select all

external: "MTPredictor.DataFeed.Producer.Bridge.Unmanaged.dll", int, "InitializeDataFeed", string{platform};

vars: bool firstTime(true);

if firstTime then begin
InitializeDataFeed("Multicharts");
firstTime = false;
end;
See attached image of DLL location.

Why can't it find this DLL?
Attachments
DataFeed_DLL_location.png
(193.06 KiB) Downloaded 576 times

User avatar
Henry MultiСharts
Posts: 9165
Joined: 25 Aug 2011
Has thanked: 1264 times
Been thanked: 2957 times

Re: Can't find DLL

Postby Henry MultiСharts » 28 Oct 2014

Hello Bruce,

Is the DLL you are trying to use 64 bit ?

bruce.mtpredictor
Posts: 9
Joined: 20 Oct 2014

Re: Can't find DLL

Postby bruce.mtpredictor » 28 Oct 2014

Ah, maybe it isn't. I am using the same DLL from TS which is a 32 bit platform. I will compile a 64 bit version.

Also, where does MC search for DLLs? In TS it uses the following for PATH:
PATH is the Windows directory path to the DLL file. PATH is an optional parameter. If
a path is not specified, the subdirectory “C:\Program Files\TS\Program\” is
presumed to be the subdirectory that contains the DLL file. If the DLL is not found in
the \TS\Program subdirectory, then the directories in the computer’s
system path statement will be searched. If the DLL is not located in any of those
directories, a run-time error will occur.
We like to put our DLLs on the system path so that we don't have to install them into Multicharts. Can this be done?

Finally, do strings have to passed as Unicode to DLLs or can they be single byte chars?

Thanks

User avatar
Henry MultiСharts
Posts: 9165
Joined: 25 Aug 2011
Has thanked: 1264 times
Been thanked: 2957 times

Re: Can't find DLL

Postby Henry MultiСharts » 29 Oct 2014

Ah, maybe it isn't. I am using the same DLL from TS which is a 32 bit platform. I will compile a 64 bit version.
If a dll used by a study is 32bit then it will work with MC 32bit only. 64bit dll is compatible only with MC 64bit.
Also, where does MC search for DLLs? We like to put our DLLs on the system path so that we don't have to install them into Multicharts. Can this be done?
If the file path is not explicitly specified in the study code then MultiCharts searches in it's installation folder, then in the PATH environmental variable (Control Panel->System->Advanced System Settings->Environment Variables->User Variables).
Finally, do strings have to passed as Unicode to DLLs or can they be single byte chars?
Strings can be single byte chars.


Return to “MultiCharts”