2023年12月16日发(作者:)

bcb日常:BCB日常使用小集锦

疯狂代码 / ĵ:VC/

1、bcb 编辑快捷键

左/右移 块代码

选中 块代码

1 ctrl+ shift+ i 是整片往右移,

2 ctrl+ shift+ u 是整片文字往左移

2、得到执行程序的当前路径

extractfiledir(application->exename);

3、循环中响应其它操作

在循环内加入application->processmessage()这一句。

4、向外部提供dll函数标准windows格式

extern "c" __declspec(dllexport) __stdcall __int32 fun(__int32 n32_i);

5、从外部dll输入函数标准windows格式

extern "c" __declspec(dllimport) __stdcall __int32 fun(__int32 n32_i);

6、对dll的调试

run/parameters 中填上调用该dll的 *.exe。

7、使用*.chm帮助文件

shellexecute(null,null,帮助文件的路径,null,null,sw_shownormal);

8、pb_c数据类型转换表

pb_c数据类型转换表 microsoft pb(16bit) pb(32bit)

bool boolean boolean

byte, char char char

char* ref string ref string

colorref uint ulong

double double double

dword uint ulong

float n/a n/a

handle uint ulong

hdc uint ulong

hfile uint ulong

hinstance uint ulong

hwnd uint ulong

int int int

long long long

lparam uint ulong

lpbyte ref int ref long

lpcwstr ref blob ref blob (unicode use tounicode())

lpcvoid ref string ref string

lpdword ref uint ref ulong

lpfiletime ref time ref time

lpint ref int ref long

lpstr,lpcstr ref string ref string

lpvoid ref structstruct_inst ref struct struct_inst

lpword ref int ref ulong

mcierror long long

pbyte ref int[#] ref long[#]

short int int

structure ref struct struct_inst ref struct struct_inst

uint uint uint

void** subroutine subroutine

word int long

wparam uint ulong

9、使用cb内存漏洞工具

选中progect/option->codeguard

支持环境/

10、mfc基本运行库目录

11、数据库连接测试(ado)

建一文件,,内容空。

双击,按照提示操作。

12、编译器设置

project|options

compiler(编译)

"full debug"(完全调试模式)

"code optimization"(代码优化)

"debugging"(调试)

"debug information"(调试信息)

"line number information"(行数信息)

"disable inline expansions"(禁用内联扩展)

"pascal"标签

"optimization"优化

"debugging"(调试)

"linker"(链接)

"create debug information"(生成调试信息)

"don't generate state files"(不要生成状态文件)

"use dynamic rtl"(使用动态rtl)

"directories/conditionals"(路径/条件)

"packages"(程序包)

"build with runtime packages"(带运行时程序包编译)

tools|debugger options

integrated debugging"(集成调试器)

project|build all(彻底的编译)

13、设置rtl

c builder 有几种运行时库,多线程静态链接库,单线程静态链接库 以及动态的,含有

vcl的,下面介绍多线程静态链接库,单线程静态链接库 是没有vcl的,vcl中自动 包含多线程。

use rtl multi-threaded static library 使用多线程静态链接库

到*.bpr 中,按下面的修改即可。

use rtl single-threaded static library 使用单线程静态链接库

到*.bpr 中,按下面的修改即可。

14、codeguard调试器

库文件/

一、编译 (project/option-> codeguard)

二、运行(tools/codeguard configuration)

文件为*.cgi

日志文件中,文件名为 *.cgi。用 view/debug window/codeguard log察看或者记事本。

2008-9-24 16:42:24

疯狂代码 /