This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
unit Logger; | |
//======================================================================= | |
// 日志类(TLoger) ver.1.0 | |
// PFeng (http://www.pfeng.org / xxmc01#gmail.com) | |
// 2012/11/08 | |
// 日志级别约定: | |
// 0 - Information | |
// 1 - Notice | |
// 2 - Warning | |
// 3 - Error |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
using namespace std; | |
class Point | |
{ | |
public: | |
int x; | |
int y; | |
/** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <windows.h> | |
#include <tchar.h> | |
#include <stdio.h> | |
BOOL IsRoot(LPCTSTR lpszPath) | |
{ | |
TCHAR szRoot[4]; | |
wsprintf(szRoot, "%c:\\", lpszPath[0]); | |
return (lstrcmp(szRoot, lpszPath) == 0); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Ctrl+Shift+P:打开命令面板 | |
Ctrl+P:搜索项目中的文件 | |
Ctrl+G:跳转到第几行 | |
Ctrl+W:关闭当前打开文件 | |
Ctrl+Shift+W:关闭所有打开文件 | |
Ctrl+Shift+V:粘贴并格式化 | |
Ctrl+D:选择单词,重复可增加选择下一个相同的单词 | |
Ctrl+L:选择行,重复可依次增加选择下一行 | |
Ctrl+Shift+L:选择多行 | |
Ctrl+Shift+Enter:在当前行前插入新行 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
*.dcu | |
*.~*~ | |
*.local | |
*.identcache | |
__history | |
*.drc | |
*.map | |
*.exe | |
*.dll | |
bin/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//MMWIN:MEMBERSCOPY | |
unit _MM_Copy_Buffer_; | |
interface | |
type | |
TCodeTemplate = class(TDataModule) | |
private | |
//---------------------------------增加字段------------------------------------- | |
function AppendField(Fields: TStringList; TableName, FieldName, FieldType, FieldSize: String): Boolean; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
unit uThreadPool; | |
{ aPool.AddRequest(TMyRequest.Create(RequestParam1, RequestParam2, ...)); } | |
interface | |
uses | |
Windows, | |
Classes; | |
// 是否记录日志 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function IsWin64: Boolean; | |
var | |
Kernel32Handle : THandle; | |
IsWow64Process : function(Handle: Windows.THandle; var Res: Windows.BOOL): Windows.BOOL; stdcall; | |
GetNativeSystemInfo : procedure(var lpSystemInfo: TSystemInfo); stdcall; | |
isWoW64 : Bool; | |
SystemInfo : TSystemInfo; | |
const | |
PROCESSOR_ARCHITECTURE_AMD64 = 9; | |
PROCESSOR_ARCHITECTURE_IA64 = 6; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// VistaVolume.h | |
#ifndef _VISTAVOLUME_H_ | |
#define _VISTAVOLUME_H_ | |
#include <Windows.h> | |
#include <Mmdeviceapi.h> // for IMMDeviceEnumerator and IMMDevice | |
#include <Endpointvolume.h> // for IAudioEndpointVolume, must #define NTDDI_VERSION NTDDI_WINXPSP1 in stdafx.h | |
#include <Audiopolicy.h> | |
#include <Audioclient.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "VistaMute.h" | |
template <class T> | |
inline void SafeRelease(T &p) | |
{ | |
if (p != NULL) | |
{ | |
p->Release(); | |
p = NULL; | |
} |
NewerOlder