zoukankan      html  css  js  c++  java
  • 动态链接库的概念

    动态链接库,英文缩写未.dll,能够供多个应用程序同时使用的代码或数据的集合,不是执行文件,可供程序调用

    动态链接库的优点是更新某一动态链接库时,不会影响到该应用程序的其他部分,该应该程序的其他模块不会受到影响。

    动态链接库,可以实现资源共享,不同的应用程序应用同一个.dll

    方便更新或者修改,修改时只需要修s改编译某一库,其他模块功能不受或者少受到影响。

    产品或者网站分为应用多个.dll模块,可以应用不同的编程语言

    就vb来说

    调用.dll可以在工程-引用中增加对该.dll的引用

    然后创建该.dll中的类对象,调用该.dll中的可访问函数

    调用windowsAPI接口函数一般会

    private declare function myfunctionname lib "a.dll" alias "othername"()

    as long

    private function othername() as long

    end function

    如没有返回值,可以定义为sub

     如有参数,可以写在othername中例如:Public Declare Function RegConnectRegistry Lib "advapi32.dll" Alias "RegConnectRegistryA" (ByVal lpMachineName As String, ByVal hKey As Long, phkResult As Long) As Long

    就.net来说

    也要首先添加引用

    然后引入命名空间 using ...

    创建对象,调用对象的属性和方法。

  • 相关阅读:
    ubutu16.04编译安装apache
    python格式化字符串
    git服务器搭建
    merge into 导致序列跳号
    Apache 强制SSL访问
    pyhton之解析html的表格
    Two modules in a project cannot share the same content root报错解决方案
    hdoj
    hdoj
    QHUOJ
  • 原文地址:https://www.cnblogs.com/yinxingyeye/p/2251669.html
Copyright © 2011-2022 走看看