c# - 当Bloomberg API通过C#连接到BBCOM时调用问题

标签 c# error-handling invoke bloomberg

我正在使用VS开发C#。我下载了Bloomberg API的代码示例。

当我运行这个:

        string serverHost = "127.0.0.1";
        int serverPort = 8194;

        SessionOptions sessionOptions = new SessionOptions();
        sessionOptions.ServerHost = serverHost;
        sessionOptions.ServerPort = serverPort;

        System.Console.WriteLine("Connecting to " + serverHost + ":" + serverPort);
        Session session = new Session(sessionOptions);
        bool sessionStarted = session.Start();
        if (!sessionStarted)
        {
            System.Console.WriteLine("Failed to start session.");
            return;
        }

我进入中断模式,并遇到以下错误:

Managed Debugging Assistant 'PInvokeStackImbalance' : 'A call to PInvoke function 'Bloomberglp.Blpapi!Bloomberglp.Blpapi.Internal.DapiSupAdapter::blpdapisup_startBbcomm' has unbalanced the stack. This is likely because the managed PInvoke signature does not match the unmanaged



我真的不明白这是什么意思

最佳答案

有同样的问题-对我来说,构 build 置为“更喜欢32位”-取消选中该选项,以便构建64位

关于c# - 当Bloomberg API通过C#连接到BBCOM时调用问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54805205/

相关文章:

python - 请帮助我通过此错误消息来破解吗? - python

macos - 未调用热键回调的事件 Tap(CFMachPortRef) 问题

c# - 嵌入式单声道 : How to use 'mono_runtime_invoke' on different thread

c# - Android键盘覆盖文本框问题

c# - 502 错误 : Bad Gateway on Azure App Service with IronPDF

c# - 表示为细长三角形的线在 3D 中不可见?

c# - 哪个 C# 程序集包含 Invoke?

C# 到 Excel - 自定义格式?

php - Symfony自定义错误消息

vba - 为什么同一个Err.Description有多个Err.Number?