If you have any questions, please contact Xuchao@orient-it.com
The following is my daily notes, sorted out, for everyone to share.
1, BCB editing shortcut
Left / right shift block code
Select block code
1 Ctrl Shift i is the whole piece to right,
2 Ctrl Shift U is the whole text to the left
2, get the current path of the executive program
ExtractFileDir (Application-> Exename);
3, respond to other operations in the loop
Add Application-> ProcessMessage () in the loop.
4. Provide DLL function standard Windows format to the outside
Extern "C" __DECLSPEC (DLLEXPORT) __STDCALL __INT32 FUN (__ int32 n32_i);
5, from external DLL input function standard Windows format
Extern "C" __DECLSPEC (DLLIMPORT) __STDCALL __INT32 FUN (__ INT32 N32_i);
6, debugging for DLL
The DLL of the DLL is called in RUN / Parameters.
7. Use the * .chm help file
Shellexecute (Null, Null, path, null, null, sw_shownormal);
8, PB_C Data Type Conversion Table
PB_C Data Type Conversion Table 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 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
McIrror Long Long
PBYTE REF INT [#] ref long [#]
Short int int INT
Structure Ref struct struct_inst ref struct struct_inst
Uint uint uint
Void ** Subroutine Subroutine
Word Int Long
WPARAM uint Ulong
9, use CB memory vulnerability tools
Check Progect / Option-> Codeguard
Support environment CG32.LIB / CG32.dll
10, MFC basic runtime directory
Mfc42.dll
Mfc42d.dll
Mfcd42d.dll
Mfcn42d.dll
Mfco42d.dll
MSVCP60.DLL
MSVCP60D.DLL
MSVCRTD.DLL
NTDLL.DLL
11, Database Connection Test (ADO)
Built a file, testdatabase.udl, content empty.
Double click, follow the prompts.
12, compiler settings
Project | Options
Compiler (compilation)
"Full debug"
"Code Optimization" (code optimization)
"debugging"
"Debug Information" (debugging information)
"Line Number Information" (line number information)
"Disable Inline Expansions" (disable inline expansion)
"Pascal" tag
"Optimization" optimization
"debugging"
"Linker" (link)
"CREATE DEBUG INFORMATION"
"Don't generate State Files" (do not generate status files)
"Use Dynamic RTL" (using dynamic RTL)
"Directories / Conditionals" (path / condition)
Packages (package)
"Build With Runtime Packages" (compiled with runtime package)
Tools | Debugger Options
Integrated Debugging "(integrated debugger)
Project | Build All (thorough compilation)
13, set RTL
C Builder has several runtime libraries, multi-threaded static link libraries, single-threaded static link libraries, and dynamic, with
VCL, the multi-threaded static link library is described below, and the single-threaded static link library is not VCL, and the multi-thread is automatically included in the VCL.
Use RTL Multi-Threaded Static Library uses multi-threaded static link library
In * .bpr, press below to modify it.
Use RTL SINGLE-Threaded Static Library uses a single-threaded static link library
In * .bpr, press below to modify it.
14, CodeGuard debugger
Library file CG32.LIB / CG32.dll
First, Compilation (Project / Option-> Codeguard)
Second, runs / codeguard configuration
Document is * .cgi
In the log file, the file name is * .cgi. Use View / Debug WINDOW / CODEGUARD LOG to see or notepad.