implementation - VC2015 中的 FMI 实现
问题描述
我正在 vc2015 中实现联合仿真。当我尝试使用 LoadLibraryA 加载从 fmi1.0 生成的 dll 文件时,它成功了。但是当我尝试从 fmi2.0 加载 dll 时,它总是以 hMod=NULL 失败。任何人都知道如何解决它?
#include "stdafx.h"
#include <atlstr.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include "fmi2Functions.h"
#include "fmi2FunctionTypes.h"
#include "fmi2TypesPlatform.h"
#include "zh.h"
int main() {
CString dll_name= "Node1.dll";
HMODULE hMod;
char strVer[50] = "";
strcat_s(strVer, "Node1");
strcat_s(strVer, "_fmi2InstantiateSlave");
hMod = LoadLibraryA("Unnamed.dll");
}
解决方案
推荐阅读
- jquery - CodeIgniter - AJAX 注册表单验证
- angular - 如何修复 SyntaxError:位置 0 处 JSON 中的意外标记 b
- amazon-web-services - 如何在使用 lambda@edge 调整图像大小时修复访问被拒绝错误
- html - 如果用户的系统字体大小增加,网页会变得太大(即字体大小:Windows 推荐的 150%)
- python - For循环迭代类列表属性
- angularjs - 使用量角器单击 Angular js 应用程序中的菜单项
- angular - 我的模板无法读取“id”的属性
- c++ - 尝试使用 .substr 将字符串转换为 char
- java - java - 如何使用java从两个列表中仅查找修改的记录?
- c# - Bot Framework:持久存储最佳实践