动太加载比较复杂呀 有没有比较简单方法    
我想让我的程序 执行的 时候 当需要的一些DLL不存在时也不会报错

解决方案 »

  1.   

    我测试没有成功呀 
     theHandle:=Loadlibrary('project1.dll');
    PFunc:=GetProcAddress(theHandle,'xx' );
    还要做什么  才能执行我的 DLL 中的 XX 函数
      

  2.   

    if pfunc=nil then  showmessage('error')
      

  3.   

    可以自己写个方法的,用来调用这两个函数
    比如:GetDllFunction(dllName, funcName: String)
      

  4.   

    theHandle:=Loadlibrary('project1.dll');
    PFunc:=GetProcAddress(theHandle,'xx' );
    try 
      if  theHandel = 0 then
        raise EDLLLoadError.create('unable to load dll');
        PFunc := GetProcAddress(theHandle,'xx' );
    finally
      FreeLibrary(LibHandle);
      end;
    end;
      

  5.   

    http://www.swissdelphicenter.ch/en/showcode.php?id=1745