选择显示字体大小

如何用vc创建可在pb中调用的dll

 

dlls: an overview
a dynamic-link library (dll) is an executable file that acts as a shared library of functions. dynamic linking provides a way for a process to call a function that is not part of its executable code. the executable code for the function is located in a dll, which contains one or more functions that are compiled, linked, and stored separately from the processes that use them. dlls also facilitate the sharing of data and resources. multiple applications can simultaneously access the contents of a single copy of a dll in memory. this code can be called from a powerbuilder program even though it is written in another language such as c/c++, pascal or in any other language that supports the pascal, winapi macro calling sequence for 16-bit and the standard calling sequence for 32-bit.

dynamic linking differs from static linking in that it allows an executable module (either a .dll or .exe file) to include only the information needed at run time to locate the executable code for a dll function. in static linking, the linker gets all the referenced functions from the static link library and places it with your code into your executable. using dlls instead of static link libraries makes the size of the executable file smaller. if several applications use the same dll, this can be a big savings in disk space and memory.

a .dll file has a layout very similar to an .exe file, with one important difference - a dll file contains an exports table. the exports table contains the name of every function that the dll exports to other executables. these functions are the entry points into the dll; only the functions in the exports table can be accessed by other executables. any other functions in the dll are private to the dll.

you can export functions from a dll with two methods:

1) create a module definition (.def) file and use the .def file when building the dll.
2) use the keyword __declspec(dllexport) in the function's definition. when exporting functions with either method, make sure to use the __stdcall calling convention.


 


关键字 本文所属关键字

相关 与本文相关文章

分类 所有文章关键字导航

源码编程相关

Java   Asp   PHP   .Net   XML   C/C++   CGI   VB   Jsp   J2ee   J2se   J2me   EJB   Servlet   Tomcat   Resin   Struts   Weblogic   Eclipse   ANT   GUI   JMS   Web servise   IDEA   Webphere   Hibernate   Spring   Jboss   Applet   Swing   Socket   Javamail   Perl   Ajax   P2P   安全   模式   框架   测试   开源   游戏

SQL数据库相关

My-SQL   Ms-SQL   Access   DB2   Oracle   Sybase   SQLserver   索引   存储过程   加密   数据库   分页   视图  

手机无线相关

3G   Wap   CDMA   GRPS   GSM   IVR   彩信   短信   无线   增值业务

网页设计制作相关

HTML   CSS   网页配色   网页特效   Javascript   VBscript   Dreamweaver   Frontpage   JS   Web   网站设计

网站建设推广相关

建站经验   网站优化   网站排名   推广   Alexa

操作系统/服务器相关

Windows XP   Windows 2000   Windows 2003   Windows Me   Windows 9.x   Linux   UNIX   注册表   操作系统   服务器   应用服务器

图形图像多媒体相关

Photoshop   Fireworks   Flash   Coreldraw   Illustrator   Freehand   Photoimpact   多媒体   图形图像

标准 网站致力的规范

Valid CSS!

无不良内容,无不良广告,无恶意代码

Valid XHTML 1.0 Transitional

creativecommons