Login Page - Create Account

Support Board


Date/Time: Thu, 16 Jan 2025 08:48:45 +0000



Renamed function problem in custom study DLL

View Count: 1315

[2017-10-19 12:56:53]
User921987 - Posts: 238
I changed the name for one of my custom functions in ms.dll and now everytime I pick up functions from that DLL it will give me the following LOG file error:

Failed to get the Advanced Custom Study function address for scsf_msPosInfo() in ms.dll. Error: Windows error code 127: Cannot find a procedure. | 2017-10-19 15:48:23 *

Recompile did not give any help nor clearing the chart or restarting the application. I can pick up the functions in this DLL and they are working properly.

So how to get rid of this error ?
[2017-10-19 15:25:50]
Sierra Chart - Max - Posts: 5778
Refer to the Custom Study Function Not Found section here:
How to Use an Advanced Custom Study or a Study Collection: Custom Study Function Not Found
Sierra Chart Support
[2017-10-19 15:58:19]
User921987 - Posts: 238
I have read and done what the help page is saying about this situation, but it seems no help.

I have removed everything as you can see form the enclosed "ChartStudies.gif" file. And after I press <Add Custom Study> button I will receive the error in log. Please see enclosed "CustomStudies.gif".

Recompile, program restart or new chart does not give any help.

There is only 1 chart in the chartbook with no spreadsheets or anything else.
Date Time Of Last Edit: 2017-10-19 16:04:24
imageChartStudies.gif / V - Attached On 2017-10-19 15:51:32 UTC - Size: 62.09 KB - 322 views
imageAddCustomStudy.gif / V - Attached On 2017-10-19 15:51:40 UTC - Size: 36.19 KB - 298 views
[2017-10-19 17:16:42]
Sierra Chart Engineering - Posts: 104368
How many functions in the CPP file have a name like this:
scsf_msPosInfo
Sierra Chart Support - Engineering Level

Your definitive source for support. Other responses are from users. Try to keep your questions brief and to the point. Be aware of support policy:
https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation

For the most reliable, advanced, and zero cost futures order routing, *change* to the Teton service:
Sierra Chart Teton Futures Order Routing
[2017-10-20 07:01:17]
User921987 - Posts: 238
None.

The function which I added to this DLL was at first named as scsf_ms_PosInfo but some times later I changed it's name to PosInfo and then these problems started.

But now I changed the name of the DLL to SCDLLName("MS2"). I did not change anything else in the source code. Then I renemaed the file ms.cpp to ms2.cpp and removed all old ms.* files including the ms.dll in /data directory. Then I compiled ms2.cpp.

Now when I go and pick functions from this new DLL there is no problems anymore.

So it seems in some cases (when you know how to do it:) there is a problem when renaming function names: the old name is still referenced even your charts are empty and no study collections exists.
Date Time Of Last Edit: 2017-10-20 07:06:28
[2017-10-20 07:25:04]
User921987 - Posts: 238
Uh oh. I am doomed :D
The problem came back...

Now I went and did a test DLL (ms3.dll) which source code is enclosed (ms3.cpp). I compiled it and that awful scsf_msPosInfo function is still haunting me... please see also the enclosed picture of the situation in this new test DLL.
attachmentms3.cpp - Attached On 2017-10-20 07:23:58 UTC - Size: 1.7 KB - 472 views
imageSimpleDLLTest.gif / V - Attached On 2017-10-20 07:24:14 UTC - Size: 10.81 KB - 310 views
[2017-10-20 07:26:42]
User921987 - Posts: 238
Dammit. The code is using the MS2 DLL name... I'll change it to MS3 lets see what then happens...

Edit:
It did not help. The new changed code attached.
Date Time Of Last Edit: 2017-10-20 07:31:24
attachmentms3.cpp - Attached On 2017-10-20 07:31:09 UTC - Size: 1.7 KB - 323 views
[2017-10-20 08:24:22]
User921987 - Posts: 238
Now I removed all the previous DLL:s, rebooted the whole machine, did a fresh new "Koe" DLL and went to new fresh chartbook with a new fresh chart (without any StudyCollections) and tried to add custom function from the "Koe" DLL to the chart.

Please see the attached picture about the situation.

Log file has an error about the haunting scsf_PosInfo() function.
imagekoe_dll_test.gif / V - Attached On 2017-10-20 08:23:57 UTC - Size: 114.88 KB - 320 views
[2017-10-20 09:42:07]
Sierra Chart Engineering - Posts: 104368
Could you provide us the DLL file. We have to test this and see how to resolve this.

Just attach it here.
Sierra Chart Support - Engineering Level

Your definitive source for support. Other responses are from users. Try to keep your questions brief and to the point. Be aware of support policy:
https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation

For the most reliable, advanced, and zero cost futures order routing, *change* to the Teton service:
Sierra Chart Teton Futures Order Routing
[2017-10-20 10:09:31]
User921987 - Posts: 238
Here you are.
Private File
[2017-10-20 20:10:53]
Sierra Chart Engineering - Posts: 104368
You have a text message with this embedded in it: scsf_PosInfo(). You need to remove that. Sierra Chart is searching the file for what appears to be function names and it is picking that up.
Sierra Chart Support - Engineering Level

Your definitive source for support. Other responses are from users. Try to keep your questions brief and to the point. Be aware of support policy:
https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation

For the most reliable, advanced, and zero cost futures order routing, *change* to the Teton service:
Sierra Chart Teton Futures Order Routing

To post a message in this thread, you need to log in with your Sierra Chart account:

Login

Login Page - Create Account