在用C++做标准的DLL时,使用了OPENMP实现多线程计算,为什么在部分XP系统下调用这个DLL会出现一个 找不到 ***.dll的错误呢? [问题点数:40分]

Bbs6
本版专家分:7724
Blank
蓝花 2005年1月 VB大版内专家分月排行榜第三
结帖率 96.82%
Bbs10
本版专家分:139163
Blank
进士 2018年总版新获得的技术专家分排名前十
Blank
银牌 2019年7月 总版技术专家分月排行榜第二
2019年5月 总版技术专家分月排行榜第二
Blank
铜牌 2019年8月 总版技术专家分月排行榜第三
2019年4月 总版技术专家分月排行榜第三
2019年3月 总版技术专家分月排行榜第三
Blank
红花 2019年8月 VC/MFC大版内专家分月排行榜第一
2019年7月 VC/MFC大版内专家分月排行榜第一
2019年6月 VC/MFC大版内专家分月排行榜第一
2019年5月 VC/MFC大版内专家分月排行榜第一
2019年4月 VC/MFC大版内专家分月排行榜第一
2019年3月 VC/MFC大版内专家分月排行榜第一
2019年1月 VC/MFC大版内专家分月排行榜第一
2018年12月 VC/MFC大版内专家分月排行榜第一
2018年11月 VC/MFC大版内专家分月排行榜第一
2018年10月 VC/MFC大版内专家分月排行榜第一
2018年9月 VC/MFC大版内专家分月排行榜第一
2018年8月 VC/MFC大版内专家分月排行榜第一
2018年5月 VC/MFC大版内专家分月排行榜第一
2018年4月 VC/MFC大版内专家分月排行榜第一
2018年3月 VC/MFC大版内专家分月排行榜第一
2018年2月 VC/MFC大版内专家分月排行榜第一
2018年1月 VC/MFC大版内专家分月排行榜第一
2017年12月 VC/MFC大版内专家分月排行榜第一
2017年11月 VC/MFC大版内专家分月排行榜第一
2017年7月 VC/MFC大版内专家分月排行榜第一
2012年7月 VC/MFC大版内专家分月排行榜第一
Bbs1
本版专家分:0
Bbs7
本版专家分:29442
版主
Blank
优秀版主 2014年11月论坛优秀版主
Blank
黄花 2013年12月 VC/MFC大版内专家分月排行榜第二
Blank
蓝花 2014年2月 VC/MFC大版内专家分月排行榜第三
2013年11月 VC/MFC大版内专家分月排行榜第三
调用DLL时出现一个错误
我在<em>调用</em><em>一个</em>DLL时<em>出现</em>了<em>一个</em><em>错误</em>,具体如下,rn————源程序—————rn#include rn#include rnvoid main(void)rnrn typedef void (*pFECOM_GetDLLVersion)(char* cVersion);rn int iBack;rn char cVersion[256];rn HINSTANCE hDll;rn pFECOM_GetDLLVersion FECOM_GetDLLVersion;rn hDll=LoadLibrary("FECOM.DLL");rn FECOM_GetDLLVersion=(pFECOM_GetDLLVersion)GetProcAddress(hDll,"FECOM_GetDLLVersion");rn FECOM_GetDLLVersion(cVersion);rn printf("版本为%s\n",cVersion);rn FreeLibrary(hDll);rnrn————以上是的原代码———rnrn其中FECOM.DLL是<em>一个</em>硬件厂商提供的操作硬件的文件,其中FECOM_GetDLLVersion(cVersion)函数的功能是通过参数返回版本信息,该函数具体说明如下:rnrnFunctionrnGets the version number of the DLLrnrnSyntaxrn void FECOM_GetDLLVersion(char* cVersion)rnrnDescriptionrnThe function returns the version number of the DLL.rncVersion is an empty, null-terminated string for returning the version number. Thernstring should be able to hold at least 256 characters.rnIn the current version the string is filled with “02.00.01”. Newer versions mayrnprovide additional information.rnrnReturn valuernnonernrnExamplern#include “fecom.h”rn...rn...rnchar cVersion[256];rnFECOM_GetDLLVersion(cVersion)rn// code here for displaying version numberrn————————————————————————————————————————————rnrn我的程序执行后产生的问题是跳出<em>一个</em>对话框提示:rnDebug Error!rnrnProgram:...rosoft Visual Studio\...\Debug\TestFecom.exernModule:rnFile: i386\chkesp.crnLine:42rnrnThe value of ESP was not properly saved across a function.This is usually a result of calling a function declared with one calling convention with a function pointer declared with a different calling convention.rn...rnrn我按了“忽略”按钮后其实可以得到版本信息,但不知道<em>为什么</em>每次都会产生<em>这个</em><em>错误</em>提示,请高手帮忙一下,谢谢!
求助XP系统DLL错误
求助XP系统DLL<em>错误</em>rnrnrn我的电脑XP系统在加载或安装有些软件时<em>出现</em>以下三个”regsvr32.exe-损坏图像的提示,rn(1) 应用程序DLL C:\WINDOWS\system32\shinEng.<em>dll</em>为无效的windows映象,请再检测一遍您的安装盘.rn(2) 应用程序DLL C:\WINDOWS\system32\IMM32.DLL为无效的windows映象,请再检测一遍您的安装盘.rn(3) 应用程序DLL C:\WINDOWS\system32\LPK.DLL为无效的windows映象,请再检测一遍您的安装盘.rn请版主和各位高手予以指教!谢谢!有劳各位了.rn
调用dll找不到路径错误
已成功部暑到模拟器,但运行时<em>出现</em>“无法找到PInvoke DLL"OEMHand.<em>dll</em>"”<em>错误</em>提示。rn试了各种路径,都是同样<em>错误</em>。rn[img=https://img-bbs.csdn.net/upload/201403/07/1394169052_436084.jpg][/img]rn[img=https://img-bbs.csdn.net/upload/201403/07/1394169070_453795.jpg][/img]rn
为什么使用DLL会出现这个情况??
<em>为什么</em>使用DLL会<em>出现</em><em>这个</em>情况??rn#include rnrntypedef BOOL (WINAPI* PFN)(HDC,int,int,int,int);rnrnint WINAPI WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance,rn PSTR szCmdLine, int iCmdShow)rnrn HANDLE hLib;rn PFN pfn;rn hLib=LoadLibrary("EdrLib.<em>dll</em>");rn pfn=(PFN)GetProcAddress(hLib,"Rectangle");rn pfn(NULL,1,1,1,1);rn FreeLibrary(hLib);rn return 0 ;rnrn<em>出现</em>Access Violation!<em>错误</em>。函数名和DLL均无误!到底该如何使用呢?
为什么找不到这个dll文件??
在我的windows/system文件夹下有<em>一个</em>iphlpapi.<em>dll</em>文件,的确是存在的。rn当我用vb去<em>调用</em>他里面的函数时声明rnPublic Declare Function GetNetworkParams Lib "iphlpapi.<em>dll</em>" _rn(pFixedInfo As Any, pOutBufLen As Long) As Longrn我要使用<em>这个</em><em>dll</em>文件里的GetNetworkParams 函数,系统提示<em>找不到</em>iphlpapi.<em>dll</em>。rn但是它的确是在windows/system里有的亚!!!rn不知道<em>为什么</em>?请指教
调用dll找不到函数
<em>dll</em>代码:rnusing System.Security.Permissions;rnrn[System.AttributeUsageAttribute(System.AttributeTargets.Class|System.AttributeTargets.Struct, AllowMultiple=true)]rnpublic class Author : System.Attribute rn public static void Main() rn public Author(string name) this.name = name; version = (float) 1.0; rn public Author(int name) rn public Author() rn public float version;rn private string name;rn public int[] rgnField;rn public double [] rgdField;rnrnrn[System.Security.Permissions.PermissionSetAttribute(SecurityAction.Demand)]rn[ABC(SomeStuff.e17)]rn[ABC(1, rgdField=new double[2] 6, 1.2)]rn[ABC, ABC("99"), ABC(1, rgnField=new int[2] 1, 2)]rn[ABC, ABC("99"), Author(1, rgnField=new int[2] 1, 2)]rnpublic class MYStuff rnrnrnvc中代码:rnHINSTANCE hInst = LoadLibrary("Author.<em>dll</em>");rntypedef (*MYFUNC)(int name); rnMYFUNC fun;rnfun = (MYFUNC)GetProcAddress(hInst, "Author"); rnif(fun != NULL)rnrn cout << fun(30) << endl;rnrnFreeLibrary(hInst); rnrn这样写<em>找不到</em>Author<em>这个</em>函数,请问是什么原因,thanks
一个调用DLL的很基本的程序,为什么出现错误呢?
在VB中创建activex <em>dll</em>工程,取默认工程名project1,类名class1,加入<em>一个</em>函数:rnPublic Sub ss()rnOpen "f:\tt.txt" For Output As #1rnWrite #1, "Hello World"rnEnd Subrn在win2000的环境下编译注册后在asp中<em>调用</em>:rnrnrnrnrnrn<em>出现</em>这样的<em>错误</em>:rn<em>错误</em>类型:rnMicrosoft VBScript 运行时<em>错误</em> (0x800A01B6)rn/try1.asp, 第 4 行rn请问这是什么原因呢?rnrn
DLL调用一个DLL中的函数时出现错误
本人新手,在编<em>一个</em>DLL2,<em>调用</em>另<em>一个</em>DLL1中的两个函数,使用隐式链接,有DLL1的.LIB和.DLL文件,<em>调用</em>语句如下:rn_declspec(<em>dll</em>import) bool FUNC1(DWORD dwDevice);rn_declspec(<em>dll</em>import) long FUNC2(DWORD dwDevice, PCHAR response, UINT maxchar, PCHAR command); rnFUNC1和FUNC2是DLL1的两个导出函数,DLL2编号编译链接时<em>出现</em>如下<em>错误</em>:rnerror LNK2019: 无法解析的外部符号 "__declspec(<em>dll</em>import) bool __cdecl FUN1(unsigned long)" (__imp_?FUN1@@YA_NK@Z),该符号在函数 "public: bool __thiscall pmacstate::LinkToPmac(void)" (?LinkToPmac@pmacstate@@QAE_NXZ) 中被引用.希望大家帮着看看,谢了.
Dll的调用为什么会出错?
我用VC写了<em>一个</em>DLL文件(DbOpt.<em>dll</em>),其中有一函数 int Func(char * DataS,char *Tname)rn当我调 用时用rntypedef int (showme)(char*,char*);rnshowme *m=0;rnrnrn HMODULE hr;rn hr=::LoadLibrary("DbOpt.<em>dll</em>");rn int c;rn char DataS[]="e:\\b.mdb\0";rn char TableN[]="stu\0";rn m=(showme *)::GetProcAddress(hr,"ZebCreateTable");rn c=(*m)(DataS,TableN);rn FreeLibrary(hr);rn<em>出现</em><em>错误</em>!rn<em>错误</em>信息:rnThe value of ESP was not properly saved across a function call. This is usually a result of calling a function declared with one calling convention with a function pointer declared with a deifferent calling convention.rn怎么回事?各位大侠请指点为!先谢了!rn
为什么调用dll会乱码
[img=http://img.my.csdn.net/uploads/201303/27/1364354924_9291.PNG][/img]rnMFC程序<em>调用</em>Dll,<em>为什么</em>赋值会<em>出现</em>乱码。。。后面那些符号干嘛的
找不到DLL入口点"的错误.">VB调用C语言的dll时,出现"找不到DLL入口点"的错误.
1、Hello.crn#include rnint retIntValue()rnrn return 1;rnrnrn2、Hello.defrn; Hello.def - defines the exports for Hello.<em>dll</em>rnrnLIBRARY HellornDESCRIPTION 'A C++ <em>dll</em> that can be called from VB'rnrnEXPORTSrn retIntValuernrn3、VB中的<em>调用</em>。rnPrivate Declare Function retIntValue Lib "Hello.<em>dll</em>" Alias "HelloA" () As IntegerrnrnPrivate Sub Command1_Click()rn MsgBox (retIntValue())rnEnd Subrn
asp调用dll出现错误
asp<em>调用</em>delphi 6.0编写的<em>dll</em>时提示“<em>出现</em><em>一个</em>意外<em>错误</em>”(方法名)rn不知如何解决?
调用DLL时出现错误(内详)
我<em>调用</em>DLL里的函数时<em>出现</em><em>错误</em>:rnUnhandled exception in <em>dll</em>test.exe(***.<em>dll</em>):oxC0000005:Access Violationrnrn***.<em>dll</em>是我所<em>调用</em>的<em>dll</em>rnrnrn<em>部分</em>代码:rnhDog2=LoadLibrary(TEXT("win32<em>dll</em>.<em>dll</em>"));//加载动态库rnif(hDog2 != NULL)rnrnFunc1=(DWORD(*)(MH_DLL_PARA))GetProcAddress(hDog2,"Func1");rnif(GS_MHDog!=NULL)rnrn b1=GS_MHDog(cc1);rnrn
调用自己的dll出现错误
我用bcb的new/<em>dll</em> wizardrnsource 类型我选择了c++rnuse VCL 打勾rnrn<em>dll</em>程序这样的rn#include rn#include rn#pragma hdrstoprn#pragma argsusedrnrnextern "C" __declspec(<em>dll</em>export) int __cdecl OpenPort(char port);rnrnBOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fwdreason, LPVOID lpvReserved)rnrnrnrn return 1;rnrn//-----------------------------------------------------------------------rnint OpenPort(char port)rnrnrn。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。rn我自己<em>调用</em><em>dll</em>rnrnrn#include rn#pragma hdrstoprnrn#include "Unit1.h"rn//-----------------------------------------------------------------------rn#pragma package(smart_init)rn#pragma resource "*.dfm"rnrnint __stdcall (*useport)( char port);rnHINSTANCE HmyDLL;rnrnTForm1 *Form1;rn//-----------------------------------------------------------------------rn__fastcall TForm1::TForm1(TComponent* Owner)rn : TForm(Owner)rnrnHmyDLL=LoadLibrary("com<em>dll</em>.<em>dll</em>");rnrn//----------------------------------------------------------------------rnrnvoid __fastcall TForm1::FormDestroy(TObject *Sender)rnrnFreeLibrary(HmyDLL); rnrn//-----------------------------------------------------------------------rnvoid __fastcall TForm1::Button1Click(TObject *Sender)rnrnrn FARPROC P;rn if(HmyDLL!=NULL)rn rn P=GetProcAddress(HmyDLL,"OpenPort");rn if(P==NULL)rn rn ShowMessage("打开OpenPort()函数<em>错误</em>!");rn rn elsern rn ////第六步:强制类型转换,即将所获取的函数地址强制转换为函数rn useport=(int __stdcall (__cdecl *)( char port))P;rn ////第七步:函数<em>调用</em>rn useport(1) ;rn rn rn elsern rn ShowMessage("打开动态链接库文件com<em>dll</em>.<em>dll</em><em>错误</em>!");rn rnrn一编译,,就ShowMessage("打开OpenPort()函数<em>错误</em>!");rn断点一下,,rnLoadLibrary没问题,,但是P没值rnrnrn<em>这个</em><em>调用</em>,windows的<em>dll</em>都没问题。rn<em>为什么</em><em>调用</em>自己的<em>出现</em>问题,rn谁帮看看rnrnrn
调用dll出现以下错误
<em>dll</em>ExTest.obj : error LNK2001: unresolved external symbol "public: virtual __thiscall MFNetTraffic::~MFNetTraffic(void)" (??1MFNetTraffic@@UAE@XZ)rn<em>dll</em>ExTestDlg.obj : error LNK2001: unresolved external symbol "public: virtual __thiscall MFNetTraffic::~MFNetTraffic(void)" (??1MFNetTraffic@@UAE@XZ)rn<em>dll</em>ExTestDlg.obj : error LNK2001: unresolved external symbol "public: __thiscall MFNetTraffic::MFNetTraffic(void)" (??0MFNetTraffic@@QAE@XZ)rn<em>dll</em>ExTestDlg.obj : error LNK2001: unresolved external symbol "public: unsigned long __thiscall MFNetTraffic::GetInterfaceTotalTraffic(int)" (?GetInterfaceTotalTraffic@MFNetTraffic@@QAEKH@Z)rn<em>dll</em>ExTestDlg.obj : error LNK2001: unresolved external symbol "public: double __thiscall MFNetTraffic::GetTraffic(int)" (?GetTraffic@MFNetTraffic@@QAENH@Z)rnDebug/<em>dll</em>ExTest.exe : fatal error LNK1120: 4 unresolved externalsrnError executing link.exe.rnrn<em>这个</em><em>dll</em>的类型是extension <em>dll</em>rn我第一次写<em>dll</em>,不知道什么文件没被包含进来,各位指导一下?
java调用dll出现错误
[color=#FF0000]Exception in thread "main" java.lang.UnsatisfiedLinkError: com.pakage.Tets.getCommand()V[/color]我把生成的<em>dll</em>放到了项目中、jre的bin中都试过,我想是不是我<em>调用</em>的<em>这个</em>方法有错啊?
标准dll , ActiveX dll
在社区内看到rn“<em>标准</em><em>dll</em> 不需要注册 rnActiveX <em>dll</em>需要注册 ”rnrn大牛们给讲解下 两者的区别 谢谢rnrnc#写的<em>dll</em>属于什么呢?rn
C#调用delphi的dll出现找不到指定模块这个错误
在我的虚拟机中,装了delphi7.0和vs2005,用delphi写了<em>一个</em>简单的<em>dll</em>,然后用C#<em>调用</em>没问题,rn但是把<em>dll</em>复制到本机中(只装了vs2005),却<em>出现</em><em>找不到</em>指定模块了<em>这个</em><em>错误</em>。求解啊。。。rn在线等。。。众大神。。。
c# 调用c dll 出错,显示找不到c dll
新学c#,建了个工程,由于要操作硬件,自己用vs2005做了个c 的<em>dll</em>,工程编译没有问题,但下到WINCE5.0的设备上去之后,程序无法运行,弹了个无法找到<em>dll</em>的<em>错误</em>框。我c 的<em>dll</em>是按照<em>标准</em>流程建立的。请各位帮我看看问题出在哪里?谢谢rnrnc 代码:rn[img=https://img-bbs.csdn.net/upload/201402/24/1393214823_621984.png][/img]rnrnc# 代码:rn[img=https://img-bbs.csdn.net/upload/201402/24/1393214867_65796.png][/img]rnc# 引用代码:rn[img=https://img-bbs.csdn.net/upload/201402/24/1393214924_153910.png][/img]rn
这个DLL为什么错误
// Hook1.cpp : Defines the entry point for the DLL application.rn//rnrn#include "stdafx.h"rn#include "Hook1.h"rn//#include "HookApp.h"rnrnBOOL APIENTRY DllMain( HANDLE hModule, rn DWORD ul_reason_for_call, rn LPVOID lpReservedrn )rnrn return TRUE;rnrnrnrnLRESULT CALLBACK MouseProc(int nCode,WPARAM wParam,LPARAM lParam) rn rn LRESULT RetVal= CallNextHookEx(hhk,nCode,wParam,lParam); rn return RetVal; rn rn rn// 添加鼠标钩子的安装和卸载函数: rnBOOL InstallHook() rn rn rn hhk=::SetWindowsHookEx(WH_MOUSE,MouseProc,hinst,0); rn rn// …. rn return true; rn rn rn void UninstallHook() rn rn ::UnhookWindowsHookEx(hhk); rn rn rn// 再实例化中获得一些参数 rnBOOL CHookApp::InitInstance() //CHookApp:: rn rn// 获得<em>dll</em> 实例,进程句柄 rn hinst=::AfxGetInstanceHandle(); rn DWORD dwPid=::GetCurrentProcessId(); rn hProcess=OpenProcess(PROCESS_ALL_ACCESS,0,dwPid); rn //<em>调用</em>注射函数 rn Inject(); rn return CWinApp::InitInstance(); rn rn rn// 好,最重要的注射函数: rnvoid Inject() rn rn if (m_bInjected==false) rn //保证只<em>调用</em>1次 rn m_bInjected=true; rn rn //获取add.<em>dll</em>中的add()函数 rn HMODULE hmod=::LoadLibrary("add.<em>dll</em>"); rn add=(AddProc)::GetProcAddress(hmod,"add"); rn pfadd=(FARPROC)add; rn rn if (pfadd==NULL) rn rn AfxMessageBox("cannot locate add()"); rn rn rn // 将add()中的入口代码保存入OldCode[] rn _asm rn rn lea edi,OldCode rn mov esi,pfadd rn cld rn movsd rn movsb rn rn rn NewCode[0]=0xe9;//实际上0xe9就相当于jmp指令 rn //获取Myadd()的相对地址 rn _asm rn rn lea eax,Myadd rn mov ebx,pfadd rn sub eax,ebx rn sub eax,5 rn mov dword ptr [NewCode+1],eax rn rn //填充完毕,现在NewCode[]里的指令相当于Jmp Myadd rn HookOn(); //可以开启钩子了 rn rn rn rn// 开启钩子的函数 rnvoid HookOn() rn rn ASSERT(hProcess!=NULL); rn rn DWORD dwTemp=0; rn DWORD dwOldProtect; rn rn //将内存保护模式改为可写,老模式保存入dwOldProtect rn VirtualProtectEx(hProcess,pfadd,5,PAGE_READWRITE,&dwOldProtect); rn //将所属进程中add()的前5个字节改为Jmp Myadd rn WriteProcessMemory(hProcess,pfadd,NewCode,5,0); rn //将内存保护模式改回为dwOldProtect rn VirtualProtectEx(hProcess,pfadd,5,dwOldProtect,&dwTemp); rn rn bHook=true; rn rn rn// 关闭钩子的函数 rnvoid HookOff()//将所属进程中add()的入口代码恢复 rn rn ASSERT(hProcess!=NULL); rn rn DWORD dwTemp=0; rn DWORD dwOldProtect; rn rn VirtualProtectEx(hProcess,pfadd,5,PAGE_READWRITE,&dwOldProtect); rn WriteProcessMemory(hProcess,pfadd,OldCode,5,0); rn VirtualProtectEx(hProcess,pfadd,5,dwOldProtect,&dwTemp); rn bHook=false; rn rn rn// 然后,写我们自己的Myadd()函数 rnint WINAPI Myadd(int a,int b) rn rn //截获了对add()的<em>调用</em>,我们给a,b都加1 rn a=a+1; rn b=b+1; rn rn HookOff();//关掉Myadd()钩子防止死循环 rn rn int ret; rn ret=add(a,b); rn rn HookOn();//开启Myadd()钩子 rn rn return ret; rn rnrn我在网上抄的鼠标钩子DLL,但<em>为什么</em>会有<em>错误</em>。rn<em>错误</em>提示rnerror C2065: 'hhk' : undeclared identifierrnerror C2065: 'hinst' : undeclared identifierrnerror C2653: 'CHookApp' : is not a class or namespace namern等等等。。。rnrn我又在Hook1.h文件里面添加了 rnHHOOK hhk;rnHINSTANCE hinst;rn但还是有下面一些<em>错误</em> 等等。。。rnerror C2653: 'CHookApp' : is not a class or namespace namernerror C2039: 'AfxGetInstanceHandle' : is not a member of '`global namespace''rnerror C2065: 'AfxGetInstanceHandle' : undeclared identifierrnerror C2440: '=' : cannot convert from 'int' to 'struct HINSTANCE__ *'rn麻烦哪位先知帮我解决一下啊???
调用dll出现的问题。
情况描述:rn <em>一个</em>用VC写的程序,调<em>用了</em><em>一个</em>DLL文件EssApin.<em>dll</em>,编译成A.exe,可以成功执行。rn 将<em>这个</em>A.exe改写编译为B.<em>dll</em>,用另<em>一个</em>VC写的程序C.exe<em>调用</em>B.<em>dll</em>,也可以成功执行。rn 但是,用Delphi写<em>一个</em>程序<em>调用</em>B.<em>dll</em>,却<em>出现</em><em>错误</em>,给出的<em>错误</em>信息是EssApin.<em>dll</em>模块中<em>出现</em>"Access Violation"。<em>调用</em>B.<em>dll</em>使用 过external关键字、LoadLibrary函数这2种方法,但是<em>错误</em>依旧。rn rn 疑点:rn 1.<em>为什么</em>B.<em>dll</em>用VC写的程序可以<em>调用</em>,而Delphi写的却不行。rn 2.<em>为什么</em><em>错误</em>是出在EssApin.<em>dll</em>模块中,而不是B.<em>dll</em>模块中。rn rn 郁闷中,请高手指点迷津,不胜感激。
如何实现DLL调用DLL?
最好能够具体<em>实现</em>,希望各位大侠给与帮助,谢谢!
Qt调用标准DLL
<em>一个</em>简单的例子演示,Qt中怎样<em>调用</em>VC或者其他语言写的<em>标准</em>DLL动态库中函数的方法
调用标准DLL的问题
我用VC显式<em>调用</em><em>一个</em><em>标准</em>DLL,<em>出现</em><em>一个</em>编译<em>错误</em>,请高手帮忙解决rnrn源码如下:rn// VCTest.cpp : Defines the entry point for the console application.rn//rnrn#include "WinShellOper.h"rnrnint main(int argc, char* argv[])rnrn char c;rn DWORD i;rn BOOL res;rnrn HINSTANCE hDll=LoadLibrary("WinShellOper.<em>dll</em>"); //显式<em>调用</em>WinShellOper.<em>dll</em>rn if (hDll==NULL) rn rn printf("load library fail \n");rn rn elsern rn printf("load library success \n");rn pfDisableShell = (pfDisableShell)GetProcAddress(hDll,"disableShell");rn if (pfDisableShell==NULL)rn rn printf("load function \"disableShell\" fail\n");rn FreeLibrary(hDll);rn return 0;rn rn elsern rn res=pfDisableShell();rn if (res!=NULL) rn rn printf("execute function \"disableShell\" success\n");rn printf("please input a letter to continue\n");rn scanf("%c",&c);rn rn elsern rn printf("execute function \"disableShell\" fail\n");rn FreeLibrary(hDll);rn return 0;rn rn //if pfDisableShellrnrn pfEnableShell=(pfEnableShell)GetProcAddress(hDll,"enableShell");rn if (pfEnableShell==NULL)rn rn printf("load function \"enableShell\" fail");rn FreeLibrary(hDll);rn return 0;rn rn elsern rn res=pfEnableShell();rn if (res!=NULL) rn rn printf("execute function \"enableShell\" success\n");rn rn elsern rn printf("execute function \"enableShell\" fail\n");rn FreeLibrary(hDll);rn return 0;rn rn //if pfEnableShellrnrn printf("please input 0~4 to shutdown,reboot,logoff,force,poweroff your computer\n input 5 to exit");rn scanf("%d",&i);rn if (i==5)rn rn FreeLibrary(hDll);rn return 0;rn rn pfDoShutDown2K=(pfDpShutDown2K)GetProcAddress(hDll,"doShutDown2K");rn if (pfDoShutDown2K==NULL)rn rn printf("load function \"doShutDown2K\" fail");rn FreeLibrary(hDll);rn return 0;rn rn elsern rn res=pfDoShutDown2K(i);rn if (res!=NULL)rn rn printf("execute function \"doShutDown2K\" success\n");rn rn elsern rn printf("execute function \"doShutDown2K\" fail\n");rn FreeLibrary(hDll);rn return 0;rn rn //if pfDoShutDown2Krnrnrn //if (hDll==NULL)rn rn FreeLibrary(hDll);rn return 1;rnrnrnrn//WinShellOper.hrnrn#include "StdAfx.h"rnrnrntypedef __declspec(<em>dll</em>import) BOOL (__stdcall *pfDisableShell)(void);rnrntypedef __declspec(<em>dll</em>import) BOOL (__stdcall *pfEnableShell)(void);rnrntypedef __declspec(<em>dll</em>import) BOOL (__stdcall *pfDoShutDown2K)(DWORD);rnrn编译后<em>出现</em><em>错误</em>信息rnfatal error C1010: unexpected end of file while looking for precompiled header directivern
如何实现.dll调用另外一个.dll
小弟,菜鸟<em>一个</em>,想求高手们帮忙!rn谁能帮小弟解决以下几个问题:rn1:如何<em>实现</em>.<em>dll</em><em>调用</em>另外<em>一个</em>.<em>dll</em>rn2: 如何使<em>一个</em>多文档<em>调用</em>已有.<em>dll</em>rn小弟,这里有个现成的示例,可惜小弟不才,看不懂,望有高人指点一二!rn解答这两个问题者救小弟于危难之中,万分感激!
一个多线程调用DLL的问题
<em>多线程</em>中<em>调用</em>同<em>一个</em>DLL,该DLL是共享的还是每一线程都有一分DLL的拷贝.rn
在动态调用dll为什么出现这样的错误
[Linker Error] Delayed load module MWIC_32.DLL was not foundrn[Linker Error] Delayed load module was not foundrn我在<em>调用</em>动态连接库时,<em>出现</em>上述<em>错误</em>,不知道是<em>为什么</em>,该如何解决呢,请各位帮帮我呀
调用DLL 找不到
[DllImport("Display.<em>dll</em>", CallingConvention = CallingConvention.StdCall)]rnrnrn写成rnrn [DllImport(@"D:\Display.<em>dll</em>", CallingConvention = CallingConvention.StdCall)]rnrn都<em>找不到</em>rnrn但Dll确实放在那个目录下的rnrn求教
调用dll找不到dll中的导出函数???
已经将<em>dll</em> inculde到应用程序中,相应的.<em>dll</em>和.lib也放在应用程序的当前目录下面rn请问下面的<em>错误</em>可能是由于什么原因造成的?rnrnLinking...rnDSPTESTDlg.obj : error LNK2001: unresolved external symbol __imp__dsp_initrnDebug/DSPTEST.exe : fatal error LNK1120: 1 unresolved externalsrnError executing link.exe.rnCreating browse info file...rnrnDSPTEST.exe - 2 error(s), 0 warning(s)rn
一个dll调用一个dll
<em>一个</em><em>dll</em><em>调用</em>另<em>一个</em><em>dll</em>,或<em>一个</em>lib<em>调用</em>另<em>一个</em>lib,可以这样吗,要注意些什么
找不到dll在哪里调用的。
刚刚拿到一份代码,由几个<em>dll</em>项目和<em>一个</em>win32项目组成。可是我怎么找也<em>找不到</em>那几个<em>dll</em>是什么<em>调用</em>的。rn<em>dll</em>有两种方式<em>调用</em>,显式和隐式,这两种我都找过了,都<em>找不到</em>,项目的设置里面<em>找不到</em>载入<em>dll</em>和lib的地方,在代码里面也<em>找不到</em>显式<em>调用</em>的地方。
dll调用的新问题:找不到dll入口点
rndelphi7中声明函数语句说明:rnrnfunction Getdefurl(user_id:string;password:string; software:string; ver:string;group_id:string;creditkey:string;var userdata:string;var errmsg:string):integer;stdcall;rnrnfunction GenCR(user_id:string;password:string; software:string=''; ver:string='';group_id:string=''):string;stdcall;rnrn并已经exports 以上函数了。rnrnrnrnVB6中调试的代码如下:rnrnPrivate Declare Function GenCR Lib "encrypt.<em>dll</em>" Alias "GenCRA" (ByVal user_id As String, ByVal password As String, ByVal software As String, ByVal ver As String, ByVal group_id As String) As StringrnrnPrivate Declare Function Getdefurl Lib "usky<em>dll</em>.<em>dll</em>" Alias "GetdefurlA" (ByVal user_id As String, ByVal password As String, ByVal software As String, ByVal ver As String, ByVal group_id As String, ByVal Creditkey As String, ByRef userdata As String, ByRef errmsg As String) As IntegerrnrnrnPrivate Sub bnGenCR_Click()rnrn Dim s1 As Stringrn Dim s2 As Stringrn Dim s3 As Stringrn Dim s4 As Stringrn Dim s5 As Stringrn rn s1 = Me.Text1.Textrn s2 = Me.Text2.Textrn s3 = Me.Text3.Textrn s4 = Me.Text4.Textrn s5 = Me.Text5.Textrn rn Me.Text6.Text = GenCR(s1, s2, s3, s4, s5)rn rnEnd SubrnrnrnPrivate Sub bnTestSvc_Click()rnrn Dim s1 As Stringrn Dim s2 As Stringrn Dim s3 As Stringrn Dim s4 As Stringrn Dim s5 As Stringrn Dim s6 As Stringrn Dim s7 As Stringrn Dim s8 As Stringrn Dim retval As Integerrn rn Me.Text6.Text = GenCR(s1, s2, s3, s4, s5)rn rn s1 = Me.Text1.Textrn s2 = Me.Text2.Textrn s3 = Me.Text3.Textrn s4 = Me.Text4.Textrn s5 = Me.Text5.Textrn s6 = Me.Text6.Textrn rn retval = Getdefurl(s1, s2, s3, s4, s5, s6, s7, s8)rn rn Me.Label1.Caption = s7rn Me.Label2.Caption = s8rnrnrnEnd Subrnrn执行 Sub bnGenCR_Click 脚本后,发生<em>错误</em>:rnrn实时<em>错误</em>‘453’rn<em>找不到</em>DLL入口点 GenCRA in encrypt.<em>dll</em>rnrn请各路英雄豪杰来把一起萝卜
dll调用找不到程序入口??
<em>dll</em>用cb编rnextern "C" __declspec(<em>dll</em>export) void __stdcall crprt(TDataSet *DataSet ,TDBGrid *DBGrid);rnrndelphi中<em>调用</em>rntypern PDBGrid = ^TDBGrid;rn PDataset = ^Tdataset;rnrnprocedure crprtForm(dataset:PDataset;dbgrid:PDBGrid);stdcall;external '<em>dll</em>test.<em>dll</em>';rnrn crprtForm(@ADODataSet1,@DBGrid1);rnrncb中都可以,<em>为什么</em>delphi中不行?rnrn
jni调用dlldll调用dll出现的问题
java使用jni<em>调用</em><em>一个</em>NativeTest.<em>dll</em>,<em>这个</em>NativeTest.<em>dll</em>集成了图像优化处理的这么<em>一个</em>ocr.<em>dll</em>和图像识别代码,rn在NativeTest.DLL里面<em>调用</em>ocr.DLL的函数的时候就<em>出现</em>这么<em>一个</em><em>错误</em>:如下,恳请大侠们帮忙拉,解决马上结贴给分,不够分数可以再加。rnrn------------------------------------------------------------------------rn Fatal Java Exception detected at Wed Sep 03 13:30:55 2008rn------------------------------------------------------------------------rnPlease follow these steps in reporting this problem to The MathWorks sornthat we have the best chance of correcting it:rnrn 1. Send us this crash report. For your convenience, this informationrn has been recorded in: C:\DOCUME~1\user\LOCALS~1\Temp\java.log.2864rnrn 2. Provide a brief description of what you were doing when thisrn problem occurred.rnrn 3. If possible, include M-files, MEX-files, or MDL-files that aidrn in reproducing it.rnrn 4. E-mail or FAX this information to us at:rn E-mail: support@mathworks.comrn FAX: 508-647-7201rnrnThank you for your assistance.
标准c如何写dll
我想在<em>标准</em>c下写个<em>dll</em>,可不知道格式,能否给点帮助。急,分不够在加!!!
dll生成与dll调用dll
本程序<em>实现</em><em>dll</em>的生成,<em>dll</em>调<em>dll</em>,以及c程序调<em>dll</em>
调用一个dll的时候出现错误
<em>错误</em>提示是:“java.exe无法找到入口”,“无法定位程序输入点-DisConnect@4于动态链接库ht32<em>dll</em>.<em>dll</em>上”rnht32<em>dll</em>.h是:rn//file ht32<em>dll</em>.hrn#define _MaxPackLen 600rn#define ID_TIMER 101rnrn#define CRC_PATTERN 0x1021rnrn#define _WriteReq 1rn#define _ReadReq 2rn#define _ListReq 3rn#define _DeleReq 4rn#define _SnoReq 5rn#define _FreeReq 6rn#define _SetDir 7rn#define _ReadDir 8rn#define _MkDir 9rn#define _ListDir 10rn#define _SetTime 11rn#define _ReadInfo 12rn#define _ReadLogo 13rn#define _ExitHTSevr 14rnrnrnrn#define _4Read 0rn#define _4Write 1rnrn#define ACCEPT_ID 'a'rn#define REJECT_ID 'r'rn#define EXF_RDY_ID 'R'rn#define EXF_HOF_ID 'H'rn#define EXF_DOF_ID 'D'rn#define EXF_ACK_ID 'A'rn#define EXF_NAK_ID 'N'rn#define EXF_PAU_ID 'P'rn#define EXF_WAIT_ID 'W'rn#define EXF_BYE_ID 'B'rn#define EXF_CAN_ID 'C'rnrn#define MAX_WRITE_BUFFER 1024rn#define MAX_READ_BUFFER 1024rnrnrntypedef structrnrnchar FileName[8];rnchar FileType[3];rnunsigned char FileAttr;rnunsigned long FileTime;rnunsigned long FileDate;rnunsigned long FileSize;rnunsigned long ValidSerialNo;rn HOFBuff;rnrntypedef structrnrnunsigned int TxMark;rnunsigned int TxSNo;rnchar TxType;rnchar TxID;rnunsigned int TxLength;rnchar TxDataPtr[_MaxPackLen];rnunsigned int TxCRC;rn TxHdBuffer;rnrnrntypedef structrnrnunsigned int AckMark;rnunsigned int AckSNo;rnunsigned char AckType;rnunsigned char AckID;rnunsigned int AckLength;rnunsigned int AckCRC;rn TxHd;rnrnvoid Inithtcomm(HINSTANCE hld);rnrn// land apirnextern "C" rn__declspec( <em>dll</em>export ) int WINAPI OpenCommPort(char cComPort);rn__declspec( <em>dll</em>export ) int WINAPI CloseCommPort(void);rn__declspec( <em>dll</em>export ) int WINAPI SetComMode(long BaudRate,rn char ByteSize, char Parity, char StopBits);rn__declspec( <em>dll</em>export ) int WINAPI PutPack(char * TxData, unsigned int TxLen, unsigned int TxCount);rn__declspec( <em>dll</em>export ) int WINAPI GetPack(char * RxData);rn__declspec( <em>dll</em>export ) long WINAPI SendClientReq(int ReqType ,char * ExFileName);rn__declspec( <em>dll</em>export ) int WINAPI OpenExFile(int OpenType ,char * HOF);rn__declspec( <em>dll</em>export ) int WINAPI ReadExFile(char * RxBuff);rn__declspec( <em>dll</em>export ) int WINAPI CloseExFile(int CloseType);rn__declspec( <em>dll</em>export ) int WINAPI WriteExFile(char * RxBuff, int iRLen);rn__declspec( <em>dll</em>export ) void WINAPI ErrorString(int iErrCode, char * cErrMsg);rn__declspec( <em>dll</em>export ) int WINAPI GetRetry(void);rnrnrn// pos apirnextern "C" rn__declspec( <em>dll</em>export ) long WINAPI CreateConnect(long iBaud,int iPort,int iSerialNo,int iDelay,int IsNew);rn__declspec( <em>dll</em>export ) void WINAPI DisConnect(long Handle);rn__declspec( <em>dll</em>export ) long WINAPI QueryFileNum(long Handle);rn__declspec( <em>dll</em>export ) long WINAPI QueryFileName(long Handle, char * HTFileName); rn__declspec( <em>dll</em>export ) long WINAPI UpTrans(long Handle, int IsNext, char * HTFileName, int IsHold, char * Pcdirectory);rn__declspec( <em>dll</em>export ) long WINAPI ProofDate(long Handle, char * PcDateTime);rn__declspec( <em>dll</em>export ) long WINAPI DownTrans(long Handle, char * PcFile, char * HTFile);rnrn__declspec( <em>dll</em>export ) int WINAPI ExFGet(char PCFile[], char HTFile[], unsigned int iPort, long iBaud, unsigned iSerialNo);rn__declspec( <em>dll</em>export ) int WINAPI ExFPut(char PCFile[], char HTFile[], unsigned int iPort, long iBaud, unsigned iSerialNo);rnrn// HT time set&&get by chenzhe rn__declspec( <em>dll</em>export ) long WINAPI wSetDateTime(char szDate[],char szTime[], long speed,long port);rn__declspec( <em>dll</em>export ) long WINAPI wGetDateTime(char *szDate, char *szTime, long speed,long port;rn__declspec( <em>dll</em>export ) long WINAPI HTMessage(char *iserial,char *itpye, long speed,long port);rn__declspec( <em>dll</em>export ) long WINAPI GetHtFile(char *filebuff,long speed,long port); rn__declspec( <em>dll</em>export ) long WINAPI DelHtFile(char filename[],long speed,long port)rn__declspec( <em>dll</em>export ) long WINAPI GetHtSN(unsigned int iPort, long iBaud);rn__declspec( <em>dll</em>export ) long WINAPI ExitHTSevr(long port,long speedrn__declspec( <em>dll</em>export ) long WINAPI HTTest(long port,long speedrn请各位帮我看看找找原因。rnrn
adoquery 是不是不能作为DLL 参数带入DLL? 如果是,那么我在MAKE DLL 时为什么出现这样的错误呢?
[C++ Error] QueryInSalaryForm.cpp(18): E2147 'TADOQuery' cannot start a parameter declaration ????
为什么找不到dll的函数
我用vb写了<em>一个</em>activex <em>dll</em>:excl<em>dll</em>rn在excl<em>dll</em>工程中的通用段中写的:rnpublic sub toexcel()rn...rnend subrn之后<em>调用</em>该函数:rnPrivate Declare Sub toexcel Lib "excl<em>dll</em>.<em>dll</em>" ()rnPrivate Sub Command1_Click()rntoexcelrnEnd Subrn<em>为什么</em>提示<em>找不到</em>toexcel函数的入口
为什么找不到DLL?
用VS2005创建了智能设备DLL,生成之后用loadlibrary<em>调用</em>,返回非法句柄rn用loadlibraryex<em>调用</em>,说<em>找不到</em>文件,可是文件明明就在那阿~rnrn请问是怎么回事?难道我的DLL有问题?
多线程调用DLL问题?
我自己用VB.NET写了<em>一个</em>DLL,主要是里面有几个类和类里的方法和属性需要给其它程序<em>调用</em>。rn其它程序是<em>多线程</em>的,每个线程都需要<em>调用</em><em>这个</em>DLL,使用同样的类,方法和属性。rn请问当同时<em>多线程</em><em>调用</em><em>这个</em>DLL时,会发生冲突吗?rn谢谢
编译一个DLL文件时出现错误
GobangGameServer error LNK2019: 无法解析的外部符号 "public: virtual __thiscall CGobangGameLogic::~CGobangGameLogic(void)" (??1CGobangGameLogic@@UAE@XZ) ,该符号在函数 "public: virtual __thiscall CTableFrameSink::~CTableFrameSink(void)" (??1CTableFrameSink@@UAE@XZ) 中被引用
多线程调用dll
<em>多线程</em><em>调用</em><em>dll</em>中的函数源码,值得初学者学习。
多线程调用DLL,在DLL操作文件的问题
我在DLL中有对文件的操作,但操作的并不是同<em>一个</em>文件,请教一下怎么<em>实现</em>线程同步
多线程调用DLL
主程序里<em>调用</em>DLL是可以成功的,rn但是线程中就不成功,DLL是用DEIPHI写的<em>一个</em>FTP下载的东东,里面就<em>一个</em>函数.rn请问哪位大哥知道解决办法?
关于多线程调用dll
有<em>一个</em>DLL里面有<em>部分</em>变量是全局变量,rn如果我用多个线程去访问或修改<em>这个</em>全局变量那么<em>这个</em>变量会不断的改变,rn我想<em>实现</em>在多个线程<em>调用</em><em>这个</em>变量的每个变量都是与当前的线程有关,不会影响到别的线程,就像多个进程<em>调用</em>同一DLL一样,全局变量不共享,请问大家<em>dll</em>能够<em>实现</em>这样的功能吗.
多线程调用同一dll
现有<em>一个</em>a.<em>dll</em>,是处理串口通讯的,里面有一函数p_OpenCom(int iPort)用来打开串口,<em>调用</em>它时会自动关闭前一串口。rn如:p_OpenCom(1);//打开Com1rn p_OpenCom(2);//打开Com2rn结果就是在打开Com2前会将Com1关闭。rn在两个线程中分别<em>调用</em>p_OpenCom(1)和p_OpenCom(2),也会<em>出现</em>同样的情况,即在打开Com2之前会关闭Com1(先启动打开Com1的线程)。rn请问有什么办法在打开Com2的时候不关闭前一串口呢?谢谢!
多线程调用DLL
请问,在<em>多线程</em>中<em>调用</em>DLL会有什么注意的呢。rn我的两个子线程都访问同<em>一个</em>DLL,然后程序过段时间就死掉了。请问发生<em>这个</em>问题,可能的原因是什么呢。
delphi多线程调用dll
delphi<em>多线程</em><em>调用</em><em>dll</em> delphi<em>多线程</em><em>调用</em><em>dll</em> 有点复杂
多线程调用DLL(面向对象)
前言:        关于DLL的说明,这里所使用的DLL,并非是一些功能函数的集合,每次<em>调用</em><em>一个</em>函数<em>实现</em>相应功能即可。而是封装了<em>一个</em>“小程序对象”,其前身是OCX,我们将OCX封装为<em>一个</em>DLL。        因此,此DLL中会存在某个对象A,生存周期伴随<em>调用</em>它的程序。        可以认为,A便是我们封装的“小程序对象”。DLL所有的接口,实际上都是对应<em>调用</em>A的成员函数。      
一个调用dll出现的问题
我用VC编译bbmpeg工程时,报的<em>错误</em>。rnAvi2mpg2_vfw.cpprne:\bc5\include\services\defs.h(180) : error C2059: syntax error : 'constant'rne:\bc5\include\services\defs.h(182) : error C2143: syntax error : missing ';' before ''rne:\bc5\include\services\defs.h(182) : error C2143: syntax error : missing ';' before ''rne:\bc5\include\services\defs.h(188) : error C2371: 'bool' : redefinition; different basic typesrn g:\myworkfloder\vc\bpu\dora20030506\bbmpeg\bbmpg12418_src2\avi2mpg2\source\avi2mpg2_vfw.cpp(0) : see declaration of 'bool'rne:\bc5\include\services\memory.h(47) : error C2146: syntax error : missing ';' before identifier '_tcscmp'rne:\bc5\include\services\memory.h(47) : error C2433: '_RTLENTRYF' : 'inline' not permitted on data declarationsrne:\bc5\include\services\memory.h(47) : fatal error C1004: unexpected end of file foundrnError executing cl.exe.rnrn其中def.h&memory.h文件内容如下:rn#if defined(BI_NO_BOOL)rnenum TBool rn false,rn truern;rn# if defined(EMULATE_BOOL)rn typedef TBool bool;rn# define BI_UNIQUE_BOOLrn# elsern typedef int bool;rn# undef BI_UNIQUE_BOOLrn# endifrnrnrnrn# if defined(_Windows)rninline int _RTLENTRYF _tcscmp(const _TCHAR far* s1, const _TCHAR far* s2)rn return lstrcmp(s1, s2);rninline int _RTLENTRYF _tcsicmp(const _TCHAR far* s1, const _TCHAR far* s2)rn return lstrcmpi(s1, s2);rn# if !defined(strcmpi)rninline int strcmpi(const _TCHAR far* s1, const _TCHAR far* s2)rn return lstrcmpi(s1, s2);rn# endif //strcmpirn# else //This is DOSrninline int _RTLENTRYF _tcscmp(const _TCHAR far* s1, const _TCHAR far* s2)rn return strcmp(s1, s2);rninline int _RTLENTRYF _tcsicmp(const _TCHAR far* s1, const _TCHAR far* s2)rn return strcmpi(s1, s2);
找不到dll入口点"">调用vc++编制的dll,出现"找不到dll入口点"
我的vc程序是这样的.rnserial.cpp:rn #define CIPHER_API __declspec(<em>dll</em>export) rnrn //声明我的函数rn CIPHER_API int __stdcall DecryptData(char* buf_i , char* buf_o , int len);rn....rnint __stdcall DecryptData(char* buf_i , char* buf_o , int len)rnrn...rnrn我的vb程序声明是这样的:rnPrivate Declare Function DecryptData Lib "xiudou.DLL" (ByRef buf_i As Byte, ByRef buf_o As Byte, len1 As Long) As Longrn<em>调用</em>时:rnPrivate Sub Form_Load()rn Dim buf_i(128) As Bytern Dim buf_o(128) As Bytern rn Dim l As Longrn buf_i(0) = 1rn l = DecryptData(buf_i(0), buf_o(0), 128)rnEnd Subrn可是在最后<em>调用</em>的时候DecryptData, 总报错"<em>找不到</em><em>dll</em>入口点",如何解决呢?rn我在网上搜了一下, 有的说要改写.def文件,可我看了,我的vc工程中没有.def文件,到底需不需要呢?
DLL创建需要调用其他dll,会出现的问题?
我现在有创建A.<em>dll</em>,B.<em>dll</em> 都需要<em>调用</em>C.<em>dll</em>,这样这两个<em>dll</em>都将引用c.<em>dll</em>,rn最后生成的A.DLL,B.DLL是否与c.<em>dll</em>有关,因为打包时只能有<em>一个</em>c.<em>dll</em>,rn我想问的问题就是:c.<em>dll</em>是否需要多处存放?如果只要<em>一个</em>的话,路径如何设置?rn 因为a.<em>dll</em>,b.<em>dll</em>都与他有关.(ac是继承关系,bc是包含关系)rn请指教!rn rn rn
调用DLL中的过程时,提示找不到Dll入口点
vb代码rn自己写了<em>一个</em><em>dll</em>,内有<em>一个</em>过程rnPrivate Sub Resize(frm As Form) 测试可以运行rn编译成Resize.<em>dll</em>后,在机器上注册成功,然后在<em>一个</em>工程中引<em>用了</em><em>这个</em><em>dll</em>,rn并添加了定义:rnPrivate Declare Sub First Lib "Resize.<em>dll</em>" (frm As Form)rnrn然后<em>调用</em>rnCall First(form1)rn结果提示:rn实时<em>错误</em>453rn<em>找不到</em>Dll入口点rnrn<em>这个</em>是什么问题
为什么jsp调用dll出现UnsatisfiedLinkError错误
我在java程序中可以通过jni<em>调用</em><em>dll</em>,但在jsp中却不行,<em>出现</em><em>错误</em>:rnjava.lang.UnsatisfiedLinkError: E:\j2sdk1.4.2\bin\sios.<em>dll</em>: ÕҲ»µ½ָ¶¨µijÌÐò¡£rn java.lang.ClassLoader$NativeLibrary.load(Native Method)rn java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560)rn java.lang.ClassLoader.loadLibrary(ClassLoader.java:1485)rn java.lang.Runtime.loadLibrary0(Runtime.java:788)rn java.lang.System.loadLibrary(System.java:834)rn jni.CheckUser.(CheckUser.java:5)rn jni.CheckOnServer.(CheckOnServer.java:8)rn org.apache.jsp.chkUser_jsp._jspService(chkUser_jsp.java:109)rn org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)rn javax.servlet.http.HttpServlet.service(HttpServlet.java:802)rn org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)rn org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)rn我已经把<em>dll</em>放到C:\WINDOWS\system32、E:\j2sdk1.4.2\bin等处都试了,不起作用rn====================CheckOnServer.java==================rnpackage jni;rnrnpublic class CheckOnServer rn public CheckUser a=null;rn public String passwd="";rn rn public CheckOnServer()rn a=new CheckUser();rn rn rn public String getPasswd(String accCount)rn passwd=a.getPassword(accCount);rn return passwd; rn rnrn========================CheckUser.java========================rnpackage jni;rnrnpublic class CheckUser rn staticrn System.loadLibrary("sios"); // (1)rn rn public native String getPassword(String str); // (2)rnrn=================jni_CheckUser.h==================rn/* DO NOT EDIT THIS FILE - it is machine generated */rn#include rn/* Header for class jni_CheckUser */rnrn#ifndef _Included_jni_CheckUserrn#define _Included_jni_CheckUserrn#ifdef __cplusplusrnextern "C" rn#endifrn/*rn * Class: jni_CheckUserrn * Method: getPasswordrn * Signature: (Ljava/lang/String;)Ljava/lang/String;rn */rnJNIEXPORT jstring JNICALL Java_jni_CheckUser_getPasswordrn (JNIEnv *, jobject, jstring);rnrn#ifdef __cplusplusrnrn#endifrn#endifrnrn我的jsp:rn。。。。。。rnrn。。。。。。
多线程调用DLL,这个DLL是不是就像全局变量一样。
在<em>多线程</em>中<em>调用</em>DLL,<em>这个</em>DLL是不是就像全局变量一样。<em>一个</em>进程中只有<em>一个</em>DLL副本。而不是每<em>一个</em>线程拥有<em>一个</em>DLL副本。即使每<em>一个</em>线程<em>调用</em>LoadLibrary。rn不知道<em>这个</em>概念是否正确。有点迷糊。rnrn如果我用<em>多线程</em><em>调用</em>DLL,DLL里面是否也要写成<em>多线程</em>控制的。
调用dll导出函数时,为什么出现Access Violation错误.
您好,我在<em>一个</em>MFC DLL中建立了<em>一个</em>对话框类,当用MFC EXE <em>调用</em>此对话框时不会<em>出现</em>问题,但是当我向MFC DLL 中添加了一些对话框的消息事件后,再<em>调用</em>此DLL ,rn运行时就会<em>出现</em> 应用程序<em>错误</em>消息框:"0x7c938fea" 指令引用的0x00000010内存。该内存不能为writen.rn调试时会<em>出现</em>:First-chance exception :0xC0000005:Access Violationrn请问有没有相关资料,或者您也可以告诉我如何将<em>一个</em>MFC 对话框应用程序转换为MFC DLL ,谢谢。rn
activex中调用dll为什么找不到dll文件?
环境:delphi7 rn问题:做<em>一个</em>ocx控件,其中程序要<em>调用</em><em>dll</em>。可是在浏览器中浏览时能看到activex,可是程序中<em>调用</em><em>dll</em>却是不能找到<em>dll</em>文件。rn想问问这是什么方面的问题?
为什么会提示找不到指定的dll????
如下:rnPublic Declare Function PrinterSend Lib "C:\winnt\system\PrinterDll.<em>dll</em>" (ByVal SerHandle As Long, ByVal CommandString As String) As Integerrnrn改为rnPublic Declare Function PrinterSend Lib "C:\winnt\system32\PrinterDll.<em>dll</em>" (ByVal SerHandle As Long, ByVal CommandString As String) As Integerrnrn也不行,编译成可执行文件,一运行后都提示:rn<em>找不到</em>C:\winnt\system\PrinterDll.<em>dll</em>文件rn 或C:\winnt\system32\PrinterDll.<em>dll</em>文件rnrn但在vb的环境里,调试不会报错。。。rnrnrn
ASP.net调用C语言写的DLL,找不到DLL模块
是不是ASP.net无法<em>调用</em>这种格式的DLL呀?我什么目录都试过了rnrn我的<em>dll</em>main.c:rn#include rnrnBOOL APIENTRY DllMain( HMODULE hModule,rn DWORD ul_reason_for_call,rn LPVOID lpReservedrn )rnrn switch (ul_reason_for_call)rn rn case DLL_PROCESS_ATTACH:rn case DLL_THREAD_ATTACH:rn case DLL_THREAD_DETACH:rn case DLL_PROCESS_DETACH:rn break;rn rn return TRUE;rnrnrn<em>调用</em>:rn [DllImport("NgSpiceDll.<em>dll</em>",EntryPoint="AddNumbers")]rn static extern int AddNumbers(int left, int right);rn rnrn protected void Button_cmd_Click(object sender, EventArgs e)rn rnrn int num1, num2;rn if (Int32.TryParse(TextBox_src.Text, out num1) &&rn Int32.TryParse(TextBox_out.Text, out num2))rn rn TextBox_cmd.Text += AddNumbers(num1, num2).ToString();rn rn rnrn
关于一个DLL调用错误
我动态加载的办法是rnrnHANDLE hMap;rn DWORD n;rn LPVOID MapAddress;rn typedef PIMAGE_NT_HEADERS (*MYPROC)(PVOID); rn MYPROC ProcAdd; rn HMODULE hFile,h;rn rn h = LoadLibrary("C:\\WINNT\\system32\\dbghelp.<em>dll</em>");rnrn if ( h == NULL )rn cout <); // file namern rnrn PVOID Address = hFile;rnrn PIMAGE_NT_HEADERS PE = ProcAdd(Address); // 到这句就蹦了,<em>找不到</em><em>dll</em>中的<em>这个</em>函数rnrnrn 用静态加载<em>出现</em>LNK2001的<em>错误</em>,我查阅了MSDN文档,发现可能是.DEF文件没有,我不知道该怎么办了rnrn请大家帮帮忙啊...谢了
DLL如何调用DLL
请问各位高手 在PB中DLL如何<em>调用</em>DLL ?rn写了<em>一个</em>程序把它封装成DLL,在代码中调<em>用了</em>另外<em>一个</em>DLL,该如何声明,听说要初始化一下,如何初始化呢,请各位高手指教?
dll调用dll的问题
自己写了个顺序栈的<em>dll</em>,头文件定义int为Elemtype,就是栈内元素都是int。rn之后又写了个二叉树的<em>dll</em>,在遍历树节点的时候要<em>调用</em>栈的<em>dll</em>,我想用二叉链表的指针类型代替int型,就是遍历的时候压栈出栈都用指向二叉链表的指针。那应该怎么修改?
dll调用dll问题?
被<em>调用</em>动态库:mwrf32.<em>dll</em>rn<em>调用</em>mwrf32.<em>dll</em>的DLL:rnlibrary Unit<em>dll</em>;rnrnusesrn Unit1 in 'Unit1.pas';rnrn$R *.resrnexportsrn ReadCard;rnrnbeginrnend.rnunit Unit1;rnvarrn function rf_read(icdev:longint;adr:smallint;data:pchar):smallint;stdcall;rn far;external 'mwrf32.<em>dll</em>' name 'rf_read';rnrn function ReadCard: String; stdcall; export;rn rnimplementationrnrnfunction ReadCard: String;rnbeginrn //<em>调用</em>rf_read;rn ...rnendrnend.rn<em>调用</em>Unit<em>dll</em>的<em>dll</em>:rnunit Unit1;rnimplementationrnrn$R *.dfmrnfunction ReadCard:String;stdcall;far;external 'Unit<em>dll</em>.<em>dll</em>'name 'readcard';rnprocedure TForm1.Button1Click(Sender: TObject);rnvarrn kh: String;rnbeginrn kh:= ReadCard;rn if kh='' then ShowMessage('readcard faile')rn else ShowMessage('readcard success');rnend;rn在程序直接<em>调用</em>mwrf32.<em>dll</em>没问题,想改成程序<em>调用</em><em>dll</em><em>调用</em>mwrf32.<em>dll</em>,rn程序运行就出错,这样写不知对不对,第一次写请多多指教,谢谢rn
DLL回调出现错误
高手求救!!!!!!!rn//DLLrnlibrary PDM;rnrn Important note about DLL memory management: ShareMem must be thern first unit in your library's USES clause AND your project's (selectrn Project-View Source) USES clause if your DLL exports any procedures orrn functions that pass strings as parameters or function results. Thisrn applies to all strings passed to and from your DLL--even those thatrn are nested in records and classes. ShareMem is the interface unit torn the BORLNDMM.DLL shared memory manager, which must be deployed alongrn with your DLL. To avoid using BORLNDMM.DLL, pass string informationrn using PChar or ShortString parameters. rn rnusesrn Windows,rn Messages,rn SysUtils,rn Classes,rn Graphics,rn Controls,rn Forms,rn oleCtrls,rn Dialogs,rn Activex,rn sconnect,rn DB,rn DBClient,rn form_dm in 'form_dm.pas' DM: TDataModule;rnrntypern TSockCon=procedure(Asock:TSocketConnection);stdcall;rn procedure SetConnected(Ahandle:Thandle); export;stdcall;rn varrn vSock:TSockCon;rn beginrn Application.Handle:=Ahandle;rn DM:=TDM.Create(application);rn @vSock:=GetProcAddress(GetModuleHandle(nil),'SockCon');rn if @vSock =nil thenrn vSock(DM.SOCKETCONNECTION);rn end;rn $R *.resrnexportsrn SetConnected name 'SetConnected';rnbeginrnend;rnrn//EXErnunit Unit1;rnrninterfacernrnusesrn Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,rn Dialogs,sconnect, StdCtrls, Grids, DBGrids, DB, DBClient;rnrntypern TForm1 = class(TForm)rn Button1: TButton;rn ClientDataSet1: TClientDataSet;rn procedure Button1Click(Sender: TObject);rn privatern Private declarations rn publicrn Public declarations rn end;rn TSD=procedure(Ahandle:Thandle);stdcall;rnvarrn Form1: TForm1;rn PROCEDURE VSOCK(ASOCK:TSocketConnection);STDCALL;rnimplementationrnrn$R *.dfmrnrnPROCEDURE VSOCK(ASOCK:TSocketConnection);rnBEGINrn Form1.ClientDataSet1.RemoteServer:=ASOCK;rnEND;rnrnprocedure TForm1.Button1Click(Sender: TObject);rnvarrn theHandle:THandle;rn MyProc:TSD;rnbeginrn theHandle:=LoadLibrary('PDM.<em>dll</em>');rn if theHandle <> 0 thenrn beginrn @MyProc := GetProcAddress(theHandle,'SetConnected');rn if @MyProc <> nil thenrn beginrn SHOWMESSAGE('PDM.DLL<em>调用</em>成功');rn FreeLibrary(theHandle);rn endrn else MessageBox(0,'exe 在载入 PDM 。<em>dll</em> 时失败','信息',MB_OK);rn end;rnend;rnrnend.rn<em>出现</em> Access violation at address 00000000.read of address 00000000 <em>错误</em>提示 没分了。。请教。。。
delphi做的dll调用
请问谁懂delphi呀,现在有<em>一个</em>用delphi开发的Convert.<em>dll</em>,rnConvert.<em>dll</em>说明rn函数:rnfunction WerToI(xInPutFileName,xOutPutFileName:PChar;MarcPro:TMarcProc):Integer;rnxInPut1:需要转换的文件名称(d:\1.txt);rnxOutPut2:转换后保存文件的名称(d:\2.ilo);rnMarcPro:回调过程(procedure(Max,Position:Integer;Caption:pchar);stdcall;)rn返回值:1:成功rn 0:失败rn请问在c#里应该怎么<em>调用</em>呢?
释放DLL 调用DLL
  HINSTANCE hDllInst; void CstopApp::CreateDll() { HANDLE f; if( (f=CreateFile( _T(&quot;./Skin.<em>dll</em>&quot;), GENERIC_READ | GENERIC_WRITE, FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE...
dll 调用一个dll
我自己用JNI做了<em>一个</em>A.DLL,里面封装了在java下定义的本地方法getResult(),最后能在java里面<em>调用</em>我的A.DLL。现在我想再做<em>一个</em>B.DLL,用它<em>调用</em>A.DLL里的函数,然后用java<em>调用</em>B.DLL里的函数,请问它的原理是什么呢,我该怎么来<em>实现</em>?能给我个具体的例子吗?谢谢各位帮忙了!!!
dll调用别的dll
在DLL中怎样<em>调用</em>别人写的DLL?
JNA调用C实现的DLL
(此处以C写的DLL为例子) 第一<em>部分</em>:简单了解DLL里的函数1、创建<em>一个</em>动态链接库项目testJNA 2、在头文件里声明函数 IRIS_SDK_API int STDCALL ik_release_enroll_device (IK_ENROLL_DEVICE_HANDLE dev_handle);3、在源码里<em>实现</em>函数 int STDCALL ik_re...
调用约定错误"">vb调用vc dll ,"DLL 调用约定错误"
被<em>调用</em>的VC DLL,出错的函数的函数原型为:rnint __stdcall GetRecvFrame(int iComNo,int *pInfoType, int *pRespType,unsigned char *pRecvBuff, int *pLen,int nWaitTime = 2000);rnrnVB里的函数声明:rnPrivate Declare Function GetRecvFrame Lib "DsrcApi.<em>dll</em>" (ByVal iComNo As long, ByRef pInfoType As long, ByRef pRespType As long, ByRef pRecvBuff As String, ByRef pLen As long, Optional ByRef nWaitTime As long= 2000)rnrnVB里面的函数<em>调用</em>为:rn Dim value As longrn Dim infoType As longrn Dim respType As longrn Dim recvBuff As Stringrn Dim buffLen As longrnrn recvBuff = String(2000, 0)rnrn [color=#FF0000] value = GetRecvFrame(com, infoType, respType, recvBuff, buffLen)[/color]rnrn但是VB里面运行到红色那一行的时候就报错!!<em>错误</em>为“DLL <em>调用</em>约定<em>错误</em>”rnrn请指教
VB的DLL调用怎么“DLL调用约定错误
"PrinterUsb.<em>dll</em>"里的数据类型及函数如下:rnconst int DEVNUM = 10;rnconst int PATHLEN = 200;rnrntypedef structrnrn char strDevPath[PATHLEN];rnDEVPATH;rnrntypedef structrnrn DEVPATH DevPath[DEVNUM];rn int DevNum;rnDEVINFO;rnrnint GetDevicePath(DEVINFO&);rnbool Open(int PortNum);rnbool Write(char *pBuf,DWORD nNumberOfBytesToWrite,DWORD &NumberOfBytesWritten);rnvoid Close();rnrnrn我在USB里<em>调用</em>DLL,作如下声明:rnrnrnPublic Const DevNum = 10rnPublic Const PATHLEN = 200rnPublic Type DEVPATHrn strDevPath(0 To PATHLEN) As StringrnEnd TypernrnPublic Type DEVINFOrn iDevPath(0 To DevNum) As DEVPATHrn DevNum As IntegerrnEnd TypernrnPublic Declare Function GetDevicePath _rn Lib "PrinterUsb.<em>dll</em>" _rn (ByRef sDevInfo As DEVINFO) _rnAs LongrnrnPublic Declare Function OpenUSB _rn Lib "PrinterUsb.<em>dll</em>" Alias "Open" _rn (ByVal PortNum As Integer) _rnAs BooleanrnrnPublic Declare Function WriteUSB _rn Lib "PrinterUsb.<em>dll</em>" Alias "Write" _rn (ByVal pBuf As String, _rn ByVal nNumberOfBytesToWrite As Long, _rn ByVal nNumberOfBytesWritten As Long) _rnAs BooleanrnrnPublic Declare Sub CloseUSB _rn Lib "PrinterUsb.<em>dll</em>" Alias "Close" ()rnrnrn程序如下:rnPrivate Sub cmdUSBTest_Click()rn Dim MyDevInfo As DEVINFOrn Dim ESC As String: ESC = Chr(27)rn Dim strCmd As Stringrn Dim nNumberOfBytesToWrite As Long: nNumberOfBytesToWrite = 0rn Dim nNumberOfBytesWritten As Long: nNumberOfBytesWritten = 10rn rn strCmd = "hello"rn rn rn GetDevicePath MyDevInforn If MyDevInfo.DevNum = 0 Thenrn MsgBox "未检测到USB设备!"rn Endrn End Ifrn rn If OpenUSB(0) = False Thenrn MsgBox "打开USB设备失败!"rn Endrn End Ifrn rn WriteUSB strCmd, nNumberOfBytesToWrite, nNumberOfBytesWrittenrn rn CloseUSBrn rn rnEnd Subrnrnrnrn执行GetDevicePath MyDevInfo时就<em>出现</em>“实时<em>错误</em>49,DLL<em>调用</em>约定<em>错误</em>”rn我把rnPublic Declare Function GetDevicePath _rn Lib "PrinterUsb.<em>dll</em>" _rn (ByRef sDevInfo As DEVINFO) _rnAs Longrn改成rnPublic Declare Function GetDevicePath _rn Lib "PrinterUsb.<em>dll</em>" _rn (ByVal sDevInfo As DEVINFO) _rnAs Longrn就<em>出现</em>“编译<em>错误</em>:用户类型不能用”。rnrn现在怎么办,哪儿错了,要怎么改,原因是什么呢,谢谢!rn
DLL调用DLL的问题
最近写程序遇到了<em>一个</em>问题,我再写<em>一个</em><em>dll</em>文件,<em>这个</em><em>dll</em>文件用到了opengl的opengl32.<em>dll</em>和glaux32.<em>dll</em>,但是写的程序<em>出现</em>了很多<em>错误</em>,<em>错误</em><em>出现</em>在gl.h和glaux.h中。。。 rn<em>错误</em>类型是一些未定义的符号。。。 rn我是用VC++2005下用win32写的<em>dll</em>,请大家帮帮我。。。。 rnrn还有,我在<em>dll</em>文件中<em>调用</em>我自己写的<em>dll</em>文件时没有任何<em>错误</em>。。。rnrnrn下面是一些<em>错误</em>信息,其余的<em>错误</em>和这些类似:rn1>e:\program study\projects\<em>dll</em>s\mglmultitex\mglmultitex\gl.h(1135) : error C2144: syntax error : 'void' should be preceded by ';'rn1>e:\program study\projects\<em>dll</em>s\mglmultitex\mglmultitex\gl.h(1135) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-intrn1>e:\program study\projects\<em>dll</em>s\mglmultitex\mglmultitex\gl.h(1135) : error C2146: syntax error : missing ';' before identifier 'glAccum'rn1>e:\program study\projects\<em>dll</em>s\mglmultitex\mglmultitex\gl.h(1135) : error C2182: 'APIENTRY' : illegal use of type 'void'rn1>e:\program study\projects\<em>dll</em>s\mglmultitex\mglmultitex\gl.h(1135) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-intrnrngl.h中第1135行代码:rnWINGDIAPI void APIENTRY glAccum (GLenum op, GLfloat value);rnrnrn如果我在程序中添加#include〈windows.h〉rn就会<em>出现</em>如下<em>错误</em>(只有这<em>一个</em><em>错误</em>):rn#error Building MFC application with /MD[d] (CRT <em>dll</em> version) requires MFC shared <em>dll</em> version. Please #define _AFXDLL or do not use /MD[d]rnrn双击本<em>错误</em>,来到如下位置(#error那一行):rn#ifdef _DLLrn#ifndef _AFXDLLrn#error Building MFC application with /MD[d] (CRT <em>dll</em> version) requires MFC shared <em>dll</em> version. Please #define _AFXDLL or do not use /MD[d]rn#endifrn#endifrnrn然后,我再程序中添加宏定义,#define _AFXDLL,就会<em>出现</em>如下<em>错误</em>:rn#error WINDOWS.H already included. MFC apps must not #include rnrnrn请高手帮我看看这是怎么回事。。。rn谢~~~
dll调用dll的问题?
有<em>一个</em>c/c++ <em>dll</em>,通讯方面的. 应不会c/c++ 所以只能用vb来封装要发送的数据。刚开始写了<em>一个</em>test的事例rnC/c++ <em>dll</em>都<em>调用</em>正常例如:rnPrivate Sub Command5_Click()rn If conntion = False Thenrn pvParam = 1rn '1.设置回调函数rn[color=#800000] Call Dev_SetCallBack(AddressOf OnConnect, AddressOf OnDisconnect, 0, AddressOf OnRecv,rn AddressOf OnError)[/color]rn '2.创建句柄rn Select Case strConfig.Modern Case MODE_UDPrn 'TsHDEV = Dev_Create(MODE_UDP, strConfig.PeerIP, c, strConfig.PeerPort,rn strConfig.LocalPort, 0)rn rn Case MODE_TCP_SERVER '创建客户端连接rn [color=#FF0000]TsHDEV = Dev_Create(MODE_TCP_CLIENT, 0, GetIPdress(strConfig.LocalIP), 0,rn strConfig.LocalPort, 0)[/color] rn Case MODE_TCP_CLIENT '创建服务器侦听rn 'TsHDEV = Dev_Create(MODE_TCP_SERVER, Dev_GetAnyIP(), Dev_GetAnyIP(),rn strConfig.PeerPort, 0, 2)rn End Selectrn ' '3.设定激活回调函数的参rn rn '4.打开通讯端口rn Call Dev_Open(TsHDEV)rn Elsern Call Dev_Close(TsHDEV)rn Form1.Caption = "连接已断开"rn Command5.Caption = "连接"rn conntion = Falsern Text1.Text = ""rn End Ifrn可是用封装成<em>标准</em>低利率执行到该函数地方就不能运行了如:rnPrivate Declare Function Dev_SetCallBack Lib "DevDll.<em>dll</em>" ( _rn ByVal fnConnect As Long, _rn ByVal fnDisconnect As Long, _rn ByVal fnAccept As Long, _rn ByVal fnRecv As Long, _rn ByVal fnError As Long _rn )rnPrivate Function OpenCon(ByVal num As Byte) As Longrnrn Dim peerIP As IPddressrn peerIP.b0 = 192rn peerIP.b1 = 168rn peerIP.b2 = 0rn peerIP.b3 = num 'ip设置rn '---------------------------------------------------------------------------------rn '设置回调函数rn [color=#0000FF]MsgBox "ok"/////////[/color]该行运行rn Call Dev_SetCallBack(AddressOf OnConnect, AddressOf OnDisconnect, AddressOf OnAccept, AddressOf OnRecv, AddressOf OnError)rn [color=#FF0000]MsgBox "ok"[/color] ////////该行不运行这是什么原因呀? rn '创建连接句柄rn TsHDEV = Dev_Create(MODE_TCP_CLIENT, 0, GetIPdress(peerIP), 0, PortNum, 0)rn MsgBox TsHDEVrn If TsHDEV <> 0 Thenrn '打开连接rn Call Dev_Open(TsHDEV)rn Elsern OpenCon = -1rn Exit Functionrn End Ifrn OpenCon = 0rnEnd Function
DLL调用DLL
我写了windows应用程序,引<em>用了</em><em>一个</em>别人做的.net DLL,使用正常。rnrn然后我把<em>这个</em>windows程序改了改,各模块改成了类库,由核心程序<em>调用</em>,结果发现这些DLL再<em>调用</em>DLL用不了,谁能教教我。
dll如何调用DLL
想将<em>dll</em>外面再包装一层<em>dll</em>,该如何做,谢谢
dll调用dll的问题!
我自己做了个a.<em>dll</em>,在a.<em>dll</em>中我动态调<em>用了</em>b.<em>dll</em>.rn在发布的时候需要a.<em>dll</em>和b.<em>dll</em>,rn能不能就1个<em>dll</em> ?rn如果这样,那在我的a.<em>dll</em>中应该怎么做?rn
dll 调用出现“实时错误 453 找不到DLL入口点 ” 为什么???
我在运行<em>一个</em>程序时,程序由编辑态变为运行状态,可是当我在运行界面上单击操作时却<em>出现</em>了“实时<em>错误</em> 453 <em>找不到</em>DLL入口点 releasecapture in user32”包错对话框?releasecapture是我在模块中声明的<em>一个</em>函数rnPublic Declare Function releasecapture Lib "user32" () As Longrn不知<em>这个</em>声明有什么问题?请指教!谢谢
VC做的dll在VB中调用,显示“DLL调用约定错误
我用AppWizard(<em>dll</em>)做的<em>dll</em>,然后加入:rnint ModulBasicCheck(WORD ModuleNo,ULONG DogPassword,BYTE DogCascade)rnrn....rnrn.def中rnModulBasicCheck @1rn编译成功后,在vc中<em>调用</em>没有问题,但在vb中不行rnvb中的代码:rnPrivate Declare Function ModulBasicCheck Lib "<em>dll</em>api.<em>dll</em>" _rn(mid As Integer, pwd As Long, csa As String) As BooleanrnPrivate Sub Form_Load()rnDim m1 As IntegerrnDim p1 As LongrnDim s1 As Stringrnm1 = 1rnp1 = 0rns1 = "0"rnMsgBox ModulBasicCheck(m1, p1, s1)rnEnd Subrnrnrn
dll调用dll?
我要在vb中<em>调用</em><em>dll</em>,但提示文件<em>找不到</em>,文件名、路径没有问题。此<em>dll</em>文件是<em>调用</em>另<em>一个</em>ImageLoad.<em>dll</em>文件生成的。rn怎样在<em>dll</em>中<em>调用</em>ImageLoad.<em>dll</em>?rn我直接vb中<em>调用</em>ImageLoad.<em>dll</em> 是出错,好像是<em>dll</em>文件的.def有问题,不是为vb做的?rn
关于DLL调用DLL
如果有两个扩展DLL:A.DLL, and B.DLL。类定义形式如下:rn<em>一个</em>工程中:rn// A.Hrnclass AFX_EXT_CLASS CExampleA : public CObjectrn rnDECLARE_DYNCREATE(CExampleA )rn... class definition ... rn;rnrn另<em>一个</em>工程中:rn// B.Hrnclass AFX_EXT_CLASS CExampleB : public CExampleArn rnDECLARE_DYNCREATE(CExampleB )rn... class definition .. rn;rnrnrn结果<em>出现</em>下面的问题:rnGenerating Code...rnLinking...rnExampleB.obj : error LNK2001: unresolved external symbol "public: static struct CRuntimeClass const CExampleA::classCExampleA" (?classCExampleA@CExampleA@@2UCRuntimeClass@@B)rnDebug/B.<em>dll</em> : fatal error LNK1120: 1 unresolved externalsrnError executing link.exe.rnCreating browse info file...rnrnB.<em>dll</em> - 2 error(s), 0 warning(s)rnrn后来,我又尝试下面的方法rn// A.Hrn#ifdef A_IMPLrn #define CLASS_DECL_A __declspec(<em>dll</em>export)rn#elsern #define CLASS_DECL_A __declspec(<em>dll</em>import)rn#endifrnrnclass CLASS_DECL_A CExampleA : public CObjectrn rnDECLARE_DYNCREATE(CExampleA )rn... class definition ... rn;rnrnrnrn// B.Hrn#ifdef B_IMPLrn #define CLASS_DECL_B __declspec(<em>dll</em>export)rn#elsern #define CLASS_DECL_B __declspec(<em>dll</em>import)rn#endifrnrnclass CLASS_DECL_B CExampleB : public CExampleArnrnDECLARE_DYNCREATE(CExampleB )rn... class definition ..rn;rnrnrn<em>出现</em>了rnerror C2491: CExampleA::classCExampleA' : definition of <em>dll</em>import static data member not allowedrnerror C2491: 'CExampleB::classCExampleB' : definition of <em>dll</em>import static data member not allowed
一个标准DLL
适合新手<em>调用</em>的 微软<em>标准</em>DLL ,, 如果使用过程中 有问题,可以联系本人
请教这个DLL的错误
我写了<em>一个</em>DLL显示数据库的程序,在另<em>一个</em>工程窗体里<em>调用</em><em>这个</em>DLL语句,我的写法了先在DLL写这些代码,然后通过新建的单元来引入,再在窗体里<em>调用</em>,但是在运行的时候<em>出现</em>了,"尚未<em>调用</em> COIinitialize的<em>错误</em>",并且想还教如何<em>调用</em>完后,释放<em>这个</em>DLL所占的内存空间出来, 可以给我修改一下吗.rnrn我的DLL写成如下:rnrnlibrary minmax;rn uses .......rnrnshowdataform in 'showdataform.pas' Form1;rnrn$R *.resrnrn varrn ado:Tadoquery;rn data:Tdatasource;rn DBgrid1:TDbgrid;rnFunction ShowData:integer;export;rn Varrn S,Sql:string;rn Beginrn Tryrn Ado:=Tadoquery.Create(application);rn Data:=TDatasource.Create(application);rn Dbgrid1:=Tdbgrid.Create(application);rn S:='Provider=Microsoft.Jet.OLEDB.4.0;'+'Data Source='+ExtractFilePath(ParamStr(0))+'money.mdb;';rn Sql:='select * from moneysum';rn Ado.Close;rn ADO.ConnectionString:=S;rn Ado.SQL.Clear;rn Ado.SQL.Add(Sql);rn Data.DataSet:=Ado;rn ado.Open;rn Result:=Ado.RecordCount;rn Exceptrnrn Showmessage('ERROR SHOWDATA SHOW');rn Exit;rn end;rnend;rnrnexportsrnrnShowdata;rnrnbeginrnrnend.rnrn<em>调用</em>DLL的窗体代码如下:rn unit showdataform;rnrninterfacernrnusesrn Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,rn Dialogs, StdCtrls;rnrntypern TForm1 = class(TForm)rn Edit1: TEdit;rn procedure FormCreate(Sender: TObject);rn privatern Private declarations rn publicrn Public declarations rn end;rnrnvarrn Form1: TForm1;rnrnimplementationrnrn$R *.dfmrnrn Function ShowData:integer;External 'Minmax.Dll';rnrn Function ShowForm:Boolean;External 'Minmax.<em>dll</em>';rnrn procedure TForm1.FormCreate(Sender: TObject);rnrnbeginrnrn Showdata;rnend;rnrnrnrnrnrn
DLL中调用DLL出现_BLOCK_TYPE_IS_VALID(pHead->nBlockUse)错误
由于工程的需要我把<em>一个</em>主程序写也了2上DLL.就是一播放器.这2个DLL主要有rnNetCtrl.DLL Download.DLL. rn其中NetCtrl中有<em>一个</em>GetMP3path是控制得到MP3地址的.Download中的DownloadWithID是下载的rn我在Download.DLL中用隐式连接了NetCtrl.DLL这样就可以在Download.DLL中省略了得到地址了rn在编译的时候没有任何的<em>错误</em>rn但我用EXE程序去<em>调用</em>Download.DLL中的DownloadWithID<em>这个</em>函数时,当然也是用的隐式连接Download.DLLrn的.问题就出来了.当EXE中没有用DownloadWithID<em>这个</em>函数的时候,就是[color=#FF0000]代码中没有DownloadWithID这写字的[/color]rn时候程序运行正常.如果我在Button中[color=#FF0000]加入[/color]DownloadWithID<em>这个</em>函数时.运行就会提示rn[color=#FF0000]_BLOCK_TYPE_IS_VALID(pHead->nBlockUse)[/color]rn<em>这个</em><em>错误</em>.程序直接打不开,[color=#FF0000]一打开就提示<em>这个</em><em>错误</em>.然后就中指退出[/color]了.编译也没有任何<em>错误</em>和警告rn[img=http://images.cnblogs.com/cnblogs_com/tibetanmastiff/QQ%E6%88%AA%E5%9B%BE%E6%9C%AA%E5%91%BD%E5%90%8D.jpg][/img]rn有哪位大侠知道这是哪里的回事吗?小弟先谢过了.
dll调用出现的问题
我写了<em>一个</em>MFC regular <em>dll</em>,编译调试都没有问题,但是我在别的程序中<em>调用</em>的时候rn却老是弹出<em>一个</em>debug assertion failed!的对话框,我已经在输出函数中rn<em>用了</em>AFX_MANAGE_STATE(AfxGetStaticModuleState())宏了,大侠救救我!!!
调用DLL出现内存泄漏
我所说的内存泄漏不是程序关闭后还有内存没有释放, 而是程序执行中每次打开<em>dll</em>,再关闭<em>dll</em>后,内存占用比<em>调用</em><em>dll</em>前大4k、8k、12k,不知道<em>为什么</em>?
调用简单的DLL的错误
我用VC做了<em>一个</em>简单的DLL(WIN32的DLL,就是在DLLMAIN后加了几个函数),在另<em>一个</em>MFC的EXE程序中<em>调用</em>(简单对话框程序的button command函数中<em>调用</em>),只要我<em>调用</em>其中的<em>一个</em>函数均<em>出现</em>如下<em>错误</em>,而且是在button command函数的最末尾<em>出现</em>。rnrnDebug Error!rnrnProgram:F:\aaa\Debug\aaa.exernModule:rnFile:i36\chkesp.crnLine:42rnrnThe value of ESP was not properly saved across a function call, This is usually a result of calling a function declared with one convention with a function pointer declared with a different calling convention.
DLL调用错误?
动态<em>调用</em>DLL,在VC环境下调试没错,但在没有VC里就报"Error".rnHMODULE hDLL =::LoadLibrary("Operate.<em>dll</em>"); rnif(hDLL == NULL)rnrnAfxMessageBox("Error");rnrnrnDLL里的设置Link-General-Object/library modules:rnkernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib libufun.lib rnrn编写<em>一个</em>普通的DLL,两者都没错,我怀疑是上面LIB的问题.rnrn高手们帮下忙!rn
C#调用C++的DLL,出现错误(System.DllNotFoundException 无法加载 DLL)
由于需要<em>调用</em>ras的拨号函数,所以使用C++创建了<em>一个</em>动态链接库,用来创建拨号连接和modem检测.rnVS2005 C#创建的项目在本机上运行正常,打包移植到别的机器上后,总是提示System.DllNotFoundException 无法加载 DLL的<em>错误</em>(除了安装了VS2005的机器不会出错).rnrn由于该<em>dll</em>文件引<em>用了</em>rasapi32.lib,所以打包时也引入了该文件,但无论放置与windows.system32目录或是本目录都,都仍旧会<em>出现</em><em>这个</em><em>错误</em>.rn在函数引用时使<em>用了</em>该<em>dll</em>的绝对路径,但还是同样的<em>错误</em>.函数的声明方式如下rn1.rn[DllImport("D:\\Caney\\C#\\CreateConnect\\bin\\Debug\\RasEntry.<em>dll</em>")]rnpublic static extern bool EnumModem([In, Out] IntPtr[] strDevArray);rnrn2.rn[DllImport("RasEntry.<em>dll</em>")]rnpublic static extern bool EnumModem([In, Out] IntPtr[] strDevArray);rnrn实在不明白是什么原因导致,请大侠指点!
DLL调用出现的问题
我在<em>调用</em>自己编的DLL文件时,<em>出现</em>“Invalid pointer operation”提示,我的<em>调用</em>语句是:function StrToRMB(curs: string) :string;external 'brdwh.<em>dll</em>';使用语句是:value:= StrToRMB(value);rnrn<em>为什么</em>会出这样的提示,该如何去修改?
VB调用VC DLL出现DLL 的调用约定错误(49),怎么办?
使用静态MFC DLL(第一选项) rnrnDLL函数 rnextern "C" void __declspec(<em>dll</em>export) __stdcall Func() rnrn rn rnrnVB<em>调用</em>声明 rnDeclare Function Func Lib "FuncDLL" () rnrnVB<em>调用</em> rnPrivate Sub Command3_Click() rn Call Func rnEnd Sub rnrn<em>出现</em>“DLL 的<em>调用</em>约定<em>错误</em>(<em>错误</em> 49)” <em>为什么</em>? rnrn49: rn传送给动态链接库 (DLL)的参数必须符合例程的需要。<em>调用</em>约定要检查个数、类型、参数的顺序等。 rn
dll静态调用错误
我用C++写了<em>一个</em>DLLrn在<em>调用</em>的时候不出错,但在<em>调用</em>过程执行完后出错:rnread address of 0x00000001rn请教怎么解决?rn(动态<em>调用</em>时不出错,但我需要静态<em>调用</em>)
Power5 FSP Basics and HMC Connectivity Overview Version下载
Power5 FSP Basics and HMC Connectivity Overview Version 相关下载链接:[url=//download.csdn.net/download/haian1/2091927?utm_source=bbsseo]//download.csdn.net/download/haian1/2091927?utm_source=bbsseo[/url]
网络刺客II下载
1.取得对方IP地址如XX.XX.XX.XX,方法太多不细讲了。 2.判断对方上网的地点,开个DOS窗口键入 TRAcerT XX.XX.XX.XX 第4和第5行反映的信息既是对方的上网地点。 3.得到对方电脑的名称,开个DOS窗口键入 NBTSTAT -A XX.XX.XX.XX 第一行是对方电脑名称 第二行是对方电脑所在工作组 第三行是对方电脑的说明 4.在Windows目录下有一文件名为LMHOSTS.SAM,将其改名为LMHOSTS,删除其内容,将对方的IP及电脑名按以下格式写入文件: XX.XX.XX.XX 电脑名 5.开DOS窗口键入 NBTSTAT -R 6.在开始-查找-电脑中 相关下载链接:[url=//download.csdn.net/download/yueguoqing1/3027587?utm_source=bbsseo]//download.csdn.net/download/yueguoqing1/3027587?utm_source=bbsseo[/url]
ehcache-1.1.jar下载
ehcache-1.1.jar 相关下载链接:[url=//download.csdn.net/download/ni__hao/4264453?utm_source=bbsseo]//download.csdn.net/download/ni__hao/4264453?utm_source=bbsseo[/url]
相关热词 c++和c#哪个就业率高 c# 批量动态创建控件 c# 模块和程序集的区别 c# gmap 截图 c# 验证码图片生成类 c# 再次尝试 连接失败 c#开发编写规范 c# 压缩图片好麻烦 c#计算数组中的平均值 c#获取路由参数
我们是很有底线的