gpt4 book ai didi

c++ - DLL Import(在windows上导入动态dll库)

转载 作者:行者123 更新时间:2023-11-28 03:47:20 24 4
gpt4 key购买 nike

我需要制作 Erlang <- C++ Bridge

我正在制作 win32 动态库:

#include "stdafx.h"
#include <Tlhelp32.h>

#ifdef _MANAGED
#pragma managed(push, off)
#endif

#define DLLExport __declspec(dllexport)

extern "C"
{
DLLExport int RunOPC(int);
DLLExport void Save();
}

并且想从 Erlang 中导入和使用这个函数。如何导入这些函数并在 Erlang 上使用它们?

最佳答案

我认为你应该实现 erlang linkedin 驱动程序或 erlang 端口。

http://www.erlang.org/doc/tutorial/c_portdriver.html

关于c++ - DLL Import(在windows上导入动态dll库),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7170380/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com