Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

当在 amd64 环境下调用收集数据方法时有异常,我参考了别人的代码更改如下并测试通过 #9

Open
kozyan opened this issue May 19, 2020 · 0 comments

Comments

@kozyan
Copy link

kozyan commented May 19, 2020

文件路径为:\CTPSharp\CTPTradeApi\DataCollect.cs

public DataCollect()
{
    try
    {
        string path = Path.GetFullPath(string.Format("{0}\\{1}", LibraryWrapper.ProcessorArchitecture,
                DllName));
        _wrapper = new LibraryWrapper(path);

        if(LibraryWrapper.ProcessorArchitecture == "x86") {
            getSystemInfo = _wrapper.GetUnmanagedFunction<DelegateGetSystemInfo>("?CTP_GetSystemInfo@@YAHPADAAH@Z");
        } else {
            getSystemInfo = _wrapper.GetUnmanagedFunction<DelegateGetSystemInfo>("?CTP_GetSystemInfo@@YAHPEADAEAH@Z");
        }
    }
    catch (Exception ex)
    {
        throw ex;
    }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant