从vb.net调用VC ++ dll的函数 [英] Calling a VC++ dll's function from vb.net
问题描述
我有一个VC ++ dll,用于为我们的应用程序创建GUID.
VC ++函数如下所示.该dll的名称为GUIDDll.dll.用来调用的函数是"metodo".
Hi,
I am having a VC++ dll which is used to create GUID for our application.
The VC++ funciton is given below. The name of the dll is GUIDDll.dll. The function used to call is "metodo".
CString metodo(CString &strGUID,short ID)
{
ACNCreateNewGUID(strGUID,ID);
return strGUID;
}
输入参数是ID,输出参数是strGUID.谁能告诉我如何从vb.net调用函数"metodo".如果可能,请分享给我示例代码片段以调用该函数.
当我尝试调用此函数时,它将引发错误无法找到DLL GUIDDll.dll的入口点".
谢谢,
Sivakumar.M.
The input parameter is ID and the output parameter is strGUID. Can anyone please tell me how to call the function "metodo" from vb.net. If possible, please share me sample code snippet to call the function.
When I am trying to call this function, it is throwing an error "Unable to find out the entry point of the dll GUIDDll.dll".
Thanks,
Sivakumar.M.
推荐答案
您实际上是第一个遇到此问题的人; P
看看:
http://www.codeproject.com/script/Answers/List.aspx?kw = call + c + dll + from + v [
You are really the first one here to encounter this problem ;P
Have a look:
http://www.codeproject.com/script/Answers/List.aspx?kw=call+c+dll+from+v[^]
Good luck!
您需要学习pInvoke.该主题过于广泛和冗长,因此无法在此处进行回答.您是否尝试过谷歌搜索?
You need to learn about pInvoke. The topic is too broad and lengthy to discuss in an answer here. Have you tried googling it?
这篇关于从vb.net调用VC ++ dll的函数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!