烦躁呀!!!我用VC写了一个DLL,但是在WIN32里怎么也调用不了。
在VB里也不懂得调用。
那一位帮忙一下,高分相送。

解决方案 »

  1.   


    先定义要调用的函数类型
    typedef int (WINAPI *PFNLIB)(void);
    注:此函数原型为:int fnLib(void);是dll中的导出函数app中调用此导出函数的代码HINSTANCE hMod = LoadLibrary( "lib.dll" );
    if( hMod )
    {
    pfnLib = (PFNLIB)GetProcAddress( hMod, "fnLib" );
    if( pfnLib )
    {
    pfnLib(); // 此处就是调用dll中的函数
    }
    } FreeLibrary( hMod );
      

  2.   

    See the samples below, FYI: http://www.codeproject.com/dll/dynamicdllloading.asp
    http://www.codeproject.com/dll/dllease.asp
      

  3.   

    u can find more samples via the link below :http://www.codeproject.com/dll