c++builder回调函数例子

  • s1_636659
    了解作者
  • 604.7KB
    文件大小
  • rar
    文件格式
  • 0
    收藏次数
  • VIP专享
    资源类型
  • 0
    下载次数
  • 2022-04-07 07:57
    上传日期
在动态库中调用主程序中的回调函数 用Builder写的
builder回调函数例子.rar
  • builder回调函数例子
  • calldllHello
  • Unit1.h
    881B
  • Unit1.ddp
    51B
  • Unit1.obj
    38.4KB
  • Project1.res
    876B
  • Unit1.dfm
    748B
  • Project1.obj
    17.3KB
  • Unit1.~dfm
    748B
  • Project1.exe
    79.5KB
  • Unit1.~cpp
    1.6KB
  • Project1.bpr
    3.6KB
  • Project1.cpp
    1KB
  • Unit1.~h
    881B
  • Project1.dll
    145.5KB
  • Unit1.cpp
    1.6KB
  • Project1.tds
    2.2MB
  • dllHello
  • Project1.lib
    1.5KB
  • Project1.~bpr
    3.4KB
  • Unit1.obj
    12.3KB
  • Project1.res
    876B
  • Project1.bpf
    107B
  • Unit1.~cpp
    1.8KB
  • Project1.bpr
    3.4KB
  • Project1.dll
    145.5KB
  • Unit1.cpp
    1.8KB
  • Project1.tds
    512KB
内容介绍
//--------------------------------------------------------------------------- #include <vcl.h> #include <windows.h> #pragma hdrstop //--------------------------------------------------------------------------- // Important note about DLL memory management when your DLL uses the // static version of the RunTime Library: // // If your DLL exports any functions that pass String objects (or structs/ // classes containing nested Strings) as parameter or function results, // you will need to add the library MEMMGR.LIB to both the DLL project and // any other projects that use the DLL. You will also need to use MEMMGR.LIB // if any other projects which use the DLL will be performing new or delete // operations on any non-TObject-derived classes which are exported from the // DLL. Adding MEMMGR.LIB to your project will change the DLL and its calling // EXE's to use the BORLNDMM.DLL as their memory manager. In these cases, // the file BORLNDMM.DLL should be deployed along with your DLL. // // To avoid using BORLNDMM.DLL, pass string information using "char *" or // ShortString parameters. // // If your DLL uses the dynamic version of the RTL, you do not need to // explicitly add MEMMGR.LIB as this will be done implicitly for you //--------------------------------------------------------------------------- typedef char*(*pcallback)(char* pInput); extern "C" __declspec(dllexport) char* __stdcall Hello(char* pInput,pcallback funcbk); extern pcallback pBack = 0; #pragma argsused int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void* lpReserved) { return 1; } //--------------------------------------------------------------------------- char* __stdcall Hello(char* pInput,pcallback funcbk) { pBack = funcbk; return (*pBack)(pInput); }
评论
    相关推荐
    • c++课件
      c++课件c++课件c++课件c++课件c++课件c++课件c++课件c++课件c++课件c++课件c++课件c++课件c++课件
    • C++
      C++C++C++C++C++C++C++C++C++C++C++C++C++C++C++C++C++C++C++C++C++C++C++C++C++C++C++C++C++C++
    • Effective C++
      学习c++的经典书籍!每一个学习c++的人有时间最好看看!你会获得很大收获!
    • c++information
      c++c++c++c++c++c++c++c++c++c++c++c++
    • SourceStyler C++
      用DEV-C++写代码很方便,就是不能格式化有点郁闷 c++格式化的好工具 效率高
    • Accelerated C++
      Accelerated C++是一本c++经典书籍 能让你快速体会到c ++的语言体系
    • c++yuyanbiancheng
      这是C和C++集成的编程环境!这是C和C++集成的编程环境!这是C和C++集成的编程环境!这是C和C++集成的编程环境!这是C和C++集成的编程环境!
    • C++ primier
      学习C++的经典之作,希望大家学习愉快,快速掌握C++的各种知识。多下哈
    • effective C++
      有关C++编程方面的检验性介绍,对由C转向C++,和有C++编程基础的程序员有帮助,不过是英文版
    • effective c++
      C++经典书籍Effective C++ By Scott Meyers, 已译成中文,chm格式,方便检阅 Uploaded by save (chaisave@sohu.com)