Support Board
Date/Time: Fri, 31 Jan 2025 00:26:19 +0000
tell SC not to load a DLL in Data/?
View Count: 1094
[2019-04-02 12:30:34] |
uM8137 - Posts: 183 |
I've made a test .DLL that will in the future contain my compilation of my external trading-computation library. Let's call it bigcode.dll. I'm generated bigcode.lib to link against my bigcode.dll. Now bigcode.dll is not an ACSIL DLL, it just contains my own library functions that I want to invoke from an ACSIL DLL. Then I made a ACSIL DLL called client.dll, and linked it against the bigcode.lib. This went fine at Visual Studio local compile/link time. I place both client.dll (the ACSIL) and its dependencies bigcode.dll into C:\SierraChart\Data However, the problem is: when I go to Add Custom Study, SC will scan my bigcode.dll and hang. Presumably it hangs because bigcode.dll is not an ACSIL DLL, without the required entry point functions scdll_DLLVersion() and scdll_DLLName(). So Windows will always look for DLLs c:\Windows\System32, so if I move bigcode.dll to C:\Windows\System32, then SC doesn't choke on scanning \Data for DLLs, and client.dll loads fine, and locates its dependency in C:\Windows\System32. But its kind of nasty to pollute C:\windows\system32 this way (shudders, cringes). Is there a way to tell SC to not bother (or at least not hang) if a .DLL in the Data\ directory doesn't have scdll_DLLName() etc? Or is there a way to mark the .DLL as "should be ignored, I am not an ACSIL DLL!" ? Or if there was a subdirectory of C:\SierraChart where I could put bigcode.dll where the dynamic loader would still find it, that would be fine too. Please advise. Thank you. Date Time Of Last Edit: 2019-04-02 12:32:44
|
[2019-04-02 16:25:39] |
Sierra Chart Engineering - Posts: 104368 |
However, the problem is: when I go to Add Custom Study, SC will scan my bigcode.dll and hang. We would not expect this to happen. Make sure it does not have any functions that begin with scsf_If there still is a problem, attach that DLL file and we will test. 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 Date Time Of Last Edit: 2019-04-02 17:33:56
|
[2019-04-02 17:53:15] |
uM8137 - Posts: 183 |
I've uploaded the "bigcode.dll", which here is really called small.dll for your testing. "dumpbin.exe /exports small.dll | grep scsf_" does not show any exports beginning with "scsf_". It is really a hello world program, as generated by Google's Go, v1.10.8. Source: // built with command: go build -o small.dll -buildmode=c-shared // using go1.10.8 on windows 2016. package main import ( "fmt" "os" ) import "C" func main() {} //export HelloWorld func HelloWorld() { f, _ := os.Create("golang_rocks_was_here") f.Write([]byte("hello from scsf_GolangRocks\n")) f.Close() fmt.Println("HelloWorld called!") } update: but I notice I do have a string in there with scsf_ ! Date Time Of Last Edit: 2019-04-02 17:54:42
|
Attachment Deleted. |
[2019-04-02 18:01:12] |
uM8137 - Posts: 183 |
hah! If I take the "scsf_" *string* out of small.go, then I do not get a hang. It shows up in the custom study menu as: small.dll (No study functions present) comment: seems like a timebomb waiting to happen. Would you mind only scanning the exported function table and not every single string? Date Time Of Last Edit: 2019-04-02 18:04:35
|
[2019-04-02 18:43:29] |
Sierra Chart Engineering - Posts: 104368 |
We did test your DLL and resolved the problem with the freezing condition.
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 |
[2019-04-02 19:20:20] |
uM8137 - Posts: 183 |
Great! Thank you.
|
To post a message in this thread, you need to log in with your Sierra Chart account: