哥从即日起,戒网 3+23+3+3 天,庆祝某歌最终走出局域网!期待腾讯退出天朝!
哥从即日起,戒网 3+23+3+3 天,庆祝某歌最终走出局域网!期待腾讯退出天朝!
WinAMP 插件数据结构C语言版
存档以备后用。
1 2 3 4 5 6 7 8 9 | typedef struct { int version; // version of the plugin structure char *description; // name/title of the plugin int (*init)(); // function which will be executed on init event void (*config)(); // function which will be executed on config event void (*quit)(); // function which will be executed on quit event HWND hwndParent; // hwnd of the Winamp client main window (stored by Winamp when dll is loaded) HINSTANCE hDllInstance; // hinstance of this plugin DLL. (stored by Winamp when dll is loaded) } winampGeneralPurposePlugin; |
老左来了
今天惊奇的在CCTV2发现了一个新节目–老左来了。
自前几天老左从湖北卫视上突然失踪后,第一次见到他。祝他好运。
祝所有朋友买啥啥涨停!
看完就顶。
让你的应用程序在每个Windows 会话中只执行一次
让你的应用程序在每个Windows 会话中只执行一次。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | uses Windows, Forms, mainUnit in 'mainUnit.pas' {FormMain}; {$R *.res} begin Application.Initialize; if 0 = GlobalFindAtom('SOME-UNIQUE-TEXT-RELATED-TO-THIS-APPLICATION') then begin GlobalAddAtom('SOME-UNIQUE-TEXT-RELATED-TO-THIS-APPLICATION') ; Application.CreateForm(TFormMain, FormMain) ; Application.Run; end else begin Application.MessageBox( 'You can run the trial version '+ 'of this application '+ 'only once per Windows session!', 'Test Trial Protection') ; end; end. |
Test your Lazarus/FPC code with FPCUnit
lazarus UTF8 unicode
最近在用Lazarus学写程序,被他的string搞郁闷了,中文乱码,汗一个
没办法了,一咬牙,闹清UTF8大概是杂回事吧,查资料查到这个东东,不错,存个档。
Unicode和UTF-8之间的转换关系表
| UCS-4编码 | UTF-8字节流 |
|---|---|
| U-00000000 – U-0000007F: | 0xxxxxxx |
| U-00000080 – U-000007FF: | 110xxxxx 10xxxxxx |
| U-00000800 – U-0000FFFF: | 1110xxxx 10xxxxxx 10xxxxxx |
| U-00010000 – U-001FFFFF: | 11110xxx 10xxxxxx 10xxxxxx 10xxxxxx |
| U-00200000 – U-03FFFFFF: | 111110xx 10xxxxxx 10xxxxxx 10xxxxxx 10xxxxxx |
| U-04000000 – U-7FFFFFFF: | 1111110x 10xxxxxx 10xxxxxx 10xxxxxx 10xxxxxx 10xxxxxx |
Experimental GExperts Version 1.33-2009-10-02 released
以下内容转载自twm’s homepage.
This new version supports Rad Studio 2010, there are no other changes. The new release is based on the current GExperts sources.
You can download the new version from the GExperts page.
简单翻译:
新版本GExperts支持Rad Studio 2010,这个版本没有其他的改变。基于最新的GExperts源代码。你可以在这里下载。
http://www.dummzeuch.de/delphi/gexperts/english.html
发现个经典的插件体系WinAMP的插件体系原理
转自大富翁小雨哥的帖子。
WinAMP的插件结构至今都还是经典的插件框架模型,它的模块框架设计通常在外部
看来只输出一个以winampXXXGetHeader命名的函数(XXX是插件模块的种类名称)。
首先设计插件函数。插件应用的特点是主程序可以控制插件程序的行为,但因为真
正的插件往往在主程序完成后才被开发出来,所以主程序要事先约定调用插件时的
调用函数,这种函数主要:
a) 初始化函数
b) 退出函数
c) 配置函数
初始化函数用于插件初始化,退出函数用于插件在退出前的清理。配置函数用于主
程序通知插件本次加载只做配置操作的目的。
这些函数如果一个一个定义,像上面描述的,就需要定义分别定义三个唯一的名字,
在WinAMP中是使用结构体的形式来输出的,而不是对以上三个函数做一一定义,这样
真正的插件只要输出一个函数就可以了,这个函数就是我上面提到的:
winampXXXGetHeader()
通过对这个函数的调用,函数返回一个数据结构的指针,这个数据结构中则包含了上
述三个函数的真实地址,整个插件DLL就类似下面的样子:
阅读全文…

最新评论