分类目录
文章索引模板
SSDT Hook ZwSetSystemInformation 防止驱动加载 - 八月 21, 2009 by yippee

SSDT Hook ZwSetSystemInformation 防止驱动加载

2008-10-28 18:13





文章作者:Eros412
信息来源:邪恶八进制

简介:卡巴封了 ZwSetSystemInformation的driver入口,我们也来封




#include<ntddk.h>
#include <stdio.h>
#include <stdlib.h>

ULONG krnladdr;
ULONG origaddr;

char buf[255]={0};
#define SystemLoadAndCallImage 38
#pragma pack(1)
typedef struct ServiceDescriptorEntry {
unsigned int *ServiceTableBase;
unsigned int *ServiceCounterTableBase;
unsigned int NumberOfServices;
unsigned char *ParamTableBase;
} SDT, *PSDT;
#pragma pack()
extern PSDT KeServiceDescriptorTable;

typedef struct _SYSTEM_LOAD_AND_CALL_IMAGE
{
UNICODE_STRING ModuleName;
} SYSTEM_LOAD_AND_CALL_IMAGE, *PSYSTEM_LOAD_AND_CALL_IMAGE;
PSYSTEM_LOAD_AND_CALL_IMAGE newimage;

typedef NTSTATUS (*ZWSETSYSTEMINFORMATION)(
ULONG,PVOID,ULONG
);

ZWSETSYSTEMINFORMATION OrigSetSystemInformation;
NTSTATUS jmpprocaddr(ULONG number, PVOID image, ULONG dword)
{

if(number==SystemLoadAndCallImage){ //检查如果是SystemLoadAndCallImage就返回,禁止操作
DbgPrint(“Warning!Rootkit is trying to load”);
newimage=(PSYSTEM_LOAD_AND_CALL_IMAGE)image;
wcstombs(buf,newimage->ModuleName.Buffer,newimage->ModuleName.Length);
DbgPrint(“Path:%s”,buf); //显示rootkit路径

return 0;
}

((ZWSETSYSTEMINFORMATION)(OrigSetSystemInformation)) (number,image, dword );

return 0;
}

VOID
DriverUnload(
IN PDRIVER_OBJECT DriverObject
){

if(DriverObject->DeviceObject !=NULL)
IoDeleteDevice(DriverObject->DeviceObject);

DbgPrint(“Bye bye”);

krnladdr =(ULONG)KeServiceDescriptorTable->ServiceTableBase+0xF0*4;

__asm
{
push eax
mov eax, CR0
and eax, 0FFFEFFFFh
mov CR0, eax
pop eax
}

*(ULONG*)krnladdr = (ULONG)origaddr;

__asm
{
push eax
mov eax, CR0
or eax, NOT 0FFFEFFFFh
mov CR0, eax
pop eax
}

}

ULONG Address;
NTSTATUS
DriverEntry(
IN PDRIVER_OBJECT DriverObject,
IN PUNICODE_STRING RegistryPath
){

DriverObject->DriverUnload=DriverUnload;
krnladdr =(ULONG)KeServiceDescriptorTable->ServiceTableBase+0xF0*4; //0xF0是ZwSetSystemInformation的服务号

origaddr=*(ULONG*)krnladdr;

OrigSetSystemInformation=(ZWSETSYSTEMINFORMATION )*(ULONG*)krnladdr;

DbgPrint(“Address:%.8X\t ZwSetSystemInformation:%.8X”,krnladdr,*(ULONG*)krnladdr);

DbgPrint(“Address to be changed:0x%08X”,(ULONG)jmpprocaddr);

__asm
{
push eax
mov eax, CR0
and eax, 0FFFEFFFFh //把内存的write-protection 改为false
mov CR0, eax
pop eax
}

*(ULONG*)krnladdr = (ULONG)jmpprocaddr;

__asm
{
push eax
mov eax, CR0
or eax, NOT 0FFFEFFFFh //把内存的write-protection 改为true
mov CR0, eax
pop eax
}

return 0;
}

标签:, , , , , ,
20090120 AssemblyInfo wshell - 八月 18, 2009 by yippee

http://bytes.com/groups/net-c/565997-question-about-assembly-info-c

How to read AssemblyInfo.cs ? – bytes
http://bytes.com/groups/net-c/276704-how-read-assemblyinfo-cs

VBS sleep 参数问题 – 『VBS交流与提问』 – 非常批处理交流论坛[V.B.T] 专注BAT&line;CMD&line;DOS&line;批处理的站点 – Powered by Discuz!
http://bbs.verybat.org/thread-9339-1-1.html

WshShell.run的使用_你好,我就好!
http://hi.baidu.com/ufineifine/blog/item/f57cedcd8af1ac550eb34567.html

不知道98的VBS里有没有类似sleep 这样的功能?_百度知道
http://zhidao.baidu.com/question/18671061.html

wshshell.run "calc.exe",0_百度知道
http://zhidao.baidu.com/question/53842430.html

How to retrieve AssemblyInfo in C# – Rickie Lee\’s blog – 博客园
http://www.cnblogs.com/rickie/archive/2006/06/29/438622.html

[assembly: AssemblyTitle("Enjoy coding experience")]

[assembly: AssemblyDescription("")]

[assembly: AssemblyConfiguration("")]

[assembly: AssemblyCompany("http://rickie.cnblogs.com/")]

[assembly: AssemblyProduct("your proudct name")]

[assembly: AssemblyCopyright("Copyright © Rickie 2006")]

[assembly: AssemblyTrademark("")]

[assembly: AssemblyCulture("")]

 

The code snippet in C# is used to retrieve the above information in AssemblyInfo.cs.

 

Assembly a = Assembly.GetExecutingAssembly();

txtVersion.Text = a.GetName().Version.ToString();

 

object[] attrib = a.GetCustomAttributes(typeof(AssemblyProductAttribute), false);

lblTitle.Text = ((AssemblyProductAttribute)attrib[0]).Product;

attrib = a.GetCustomAttributes(typeof(AssemblyCopyrightAttribute), false);

lblCopyright.Text = ((AssemblyCopyrightAttribute)attrib[0]).Copyright;

attrib = a.GetCustomAttributes(typeof(AssemblyTitleAttribute), false);

lblTitleCN.Text = ((AssemblyTitleAttribute)attrib[0]).Title;

VBS脚本中的循环导致cpu使用率100% 循环中加入了Sleep 1000还是不行?大家帮我看看-vbScript – 开发者
http://www.phpchinaz.cn/c/vbScript/3_302_1229495188.html

标签:
20090217 qt info - 八月 18, 2009 by yippee

Qt 4.3 商业版_李华的blog
http://hi.baidu.com/jzinfo/blog/item/1210bb01a14b7f06728da510.html

【转载】安装QT商业版时如何简单避开地避开VS2005(SP1)的模板BUG及商业版破解方法_天佑好人
http://hi.baidu.com/zhanglei%5F186/blog/item/dff90a0a9fb3f31c94ca6bab.html

【转载】商业版qt-win-commercial-src-4.2.2在visual studio 8中的安装_天佑好人
http://hi.baidu.com/zhanglei%5F186/blog/item/0fee0addc5097a375882dd7b.html

Re: Commercial vs Open Source versions of Qt WinCE
http://article.gmane.org/gmane.comp.lib.qt.qtce/168

Re: [Qt-wince-interest] Commercial vs Open Source versions of Qt/WinCE
http://www.mail-archive.com/qt-wince-interest@trolltech.com/msg00070.html

Visual Studio 2005 Service Pack 1 发行说明
http://support.microsoft.com/kb/928957

【转载】商业版qt-win-commercial-src-4.2.2在visual studio 8中的安装_天佑好人
http://hi.baidu.com/zhanglei_186/blog/item/0fee0addc5097a375882dd7b.html

Qt 4.3 商业版_李华的blog
http://hi.baidu.com/jzinfo/blog/item/1210bb01a14b7f06728da510.html

编译VS的QT – owe的专栏 – CSDNBlog
http://blog.csdn.net/owe/archive/2007/05/21/1619796.aspx

qt vs 2005 – 我的文章 – free coffee 自由柯夫
http://blog.chinaunix.net/u1/37776/showart_668506.html

Are there any wxWidgets applications on Mac OS X with good UIs? &line; Ask Metafilter
http://ask.metafilter.com/40311/Are-there-any-wxWidgets-applications-on-Mac-OS-X-with-good-UIs

请问用qt商业版写程序能否用开源版编译?
http://topic.csdn.net/u/20070428/14/1e7ed1a5-9e78-4b1c-9d3a-7bc74e20ea5f.html

qt在vs2005下的编译安装_C++技术文章_C++_软件编程
http://www.diybl.com/course/3_program/c++/cppjs/20071018/78073.html

qt-vsintegration cannot display widgets text – Qt Centre Forum
http://www.qtcentre.org/forum/f-newbie-4/t-qt-vsintegration-cannot-display-widgets-text-10931.html

QT在vs2005平台下的安装与调试 – tianjiangood的日志 – 网易博客
http://tianjiangood.blog.163.com/blog/static/2601115620085625458948/

让我痛苦得涕泪横流的Qt – 重剑无锋,大巧不工 – C++博客
http://www.cppblog.com/lai3d/archive/2007/12/22/39295.html

Windows下Eclipse + MinGW + Qt安装及设置 – 记忆有问题!!! – CSDNBlog
http://blog.csdn.net/tomatohxy/archive/2008/12/29/3636181.aspx

Eclipse设置为中文 – QT技术专栏 – CSDNBlog
http://blog.csdn.net/xjp86/archive/2008/11/26/3380035.aspx

Windows下Eclipse + MinGW + Qt安装及设置 – QT技术专栏 – CSDNBlog
http://blog.csdn.net/xjp86/archive/2008/11/26/3379624.aspx

windows下qt4.3.4的安装和配置(用vs.net调试程序)-井底的蛤蟆-搜狐博客
http://lugarnett.blog.sohu.com/90737901.html

Home
http://www.qtcentre.org/

理解First Chance和Second Chance避免单步调试,C++技术文章,C++系列教程,C++
http://www.diybl.com/course/3_program/c++/cppjs/20090204/154827.html

QT与VC的区别 – 育路网
http://www.yuloo.com/jsjks/jsj-djks/2008-12-16/169344.html

有几种方式和ide可以实现QT单步调试? Qt中文论坛 —— Qt专业技术网站 – powered by phpwind.net
http://www.qtcn.org/bbs/read.php?tid=9874

新的QT开发工具  Qt Creator Qt中文论坛 —— Qt专业技术网站 – powered by phpwind.net
http://www.qtcn.org/bbs/read.php?tid=13653&fpage=2

【原创】在VS.NET中使用QT的代码自动补全设置 Qt中文论坛 —— Qt专业技术网站 – powered by phpwind.net
http://www.qtcn.org/bbs/read.php?tid=1099

Qt使用笔记(2)--Qmake的使用 – 三亩地一头牛 – 博客园
http://www.cnblogs.com/huangliujing/archive/2009/02/13/1390107.html

标签:
20090730 wordpress c# xml rpc info - 八月 18, 2009 by yippee

WordPress 2.7 XML-RPC wrapper for .Net
http://www.orbifold.net/default/?p=1721
XML-RPC.Net
http://www.xml-rpc.net/
WordPress 2.5 XML-RPC wrapper for .Net
http://www.orbifold.net/default/?p=1003
Using Wordpress XMLRPC services | PHP Made Simple
http://www.phpmadesimple.info/2009/07/05/using-wordpress-xmlrpc-services/
Weblog Client « WordPress Codex
http://codex.wordpress.org/Weblog_Client
3.4. C# XML-RPC Tutorial
http://www.wordtracker.com/docs/api/ch03s04.html
CodeProject: Coding Blog Engine with MetaWeblog API Support and Using it with Windows Live Writer. Free source code and programming help
http://www.codeproject.com/KB/XML/MetaWeblogAPI.aspx?display=Print
WP-XML-RPCLib2 – SharpLab.
http://blog.sharplab.net/computer/cprograming/wp-xml-rpclib/3015/
WP-XML-RPCLib2 – SharpLab.
http://blog.sharplab.net/computer/cprograming/wp-xml-rpclib/computer/cprograming/wp-xml-rpclib/3015/
CodeProject: Coding Blog Engine with MetaWeblog API Support and Using it with Windows Live Writer. Free source code and programming help
http://www.codeproject.com/KB/XML/MetaWeblogAPI.aspx
MetaWebLog API and Blog Writers – Rick Strahl’s Web Log
http://www.west-wind.com/WebLog/posts/23858.aspx
Windows Live Writer Beta 2 Now Available
http://www.gtrifonov.com/blog/2007/06/06/Windows_Live_Writer_Beta_2_Now_Available.aspx
Coding blog engine with MetaWeblog API support and using it with Windows Live Writer
http://www.gtrifonov.com/blog/2006/11/27/Coding_blog_engine_with_MetaWeblog_API_support_and.aspx
15 Seconds : Programming for the Palm Part 2 – The Synchronization Process
http://www.15seconds.com/Issue/030722.htm
C# blog client
http://www.aspcode.net/C-blog-client.aspx
The MetaBlog API (Creating and Editing Posts)
http://geekswithblogs.net/Tariq/archive/2009/07/05/133264.aspx
public string wp_slug;

XML-RPC Request Format
http://www.tutorialspoint.com/xml-rpc/xml_rpc_request.htm
3.4. C# XML-RPC Tutorial
http://www.wordtracker.com/docs/api/ch03s04.html

标签:, , , , ,
20080805 firefox dev addon info - 三月 31, 2009 by yippee

20080805 firefox dev addon info
http://www.yippeesoft.com

手工收集

Firefox是一款基于Gecko引擎,开放源代码的浏览器,不仅体积小、速度快,而且完全支持W3C标准,可应用于Windows、Linux和MacOS平台。。由于Firefox的一个最重要的特性就是支持扩展插件,因此通过安装扩展插件就可以最大限度的扩展其功能。

基于 Mozilla 的扩展开发

Firefox扩展开发

Mozilla开发者中心

XUL用来开发界面的,JavaScript用来做事件处理的,CSS用来做样式单的,DOM用来操作节点的

http://xinsync.xju.edu.cn/index.php/archives/2135
在eclipse中动态开发Firefox扩展

http://ted.mielczarek.org/code/mozilla/extensiondev/
The Extension Developer\’s Extension exists to make life easier for Firefox extension developers. Testing JavaScript code, prototyping XUL layouts, and building XPI packages are all made easier by this extension. Install it and try it out!

http://my.donews.com/lerosua/page/2/
Vim keys in firefox

今天找到一个firefox的好功能。就是将页面浏览的快捷键设置为VIM的hjkl方式。
Vim keys in firefox

http://www.kevinfreitas.net/extensions/measureit/
MeasureIt 0.3.8 MeasureIt

Draw a ruler across any webpage to check the width, height, or alignment of page elements in pixels.

http://cybernetnews.com/2008/06/24/myfive-firefox-3-chrome-urls/
MyFive: Firefox 3 Chrome URL’s

http://kb.mozillazine.org/Dev_:_Firefox_Chrome_URLs
Dev : Firefox Chrome URLs

http://www.mail-archive.com/ubuntu-bugs@lists.ubuntu.com/msg924448.html
Navigation buttons greyed out

http://forums.mozillazine.org/viewtopic.php?f=7&p=4023595
Chrome via bookmarklet?

http://www.firefoxfacts.com/2008/06/24/open-bookmark-manager-in-your-browser-window/
Open Bookmark Manager in Your Browser Window

1. 首先需要建立多个 firefox 的配置文件。

开始 – 运行 – firefox -profilemanager

说明:两个firefox 不能使用同一个 profile 文件,否则会提示“firefox 已经在运行…”

2. 修改启动的快捷方式

说明:-P 表示使用 guoshuang 这个profile 配置; -no-remote 打开另外一个实例。

相关资料:

windows 命令脚本

set MOZ_NO_REMOTE=1

“C:Program FilesMozilla Firefoxfirefox.exe” -P guoshuang
http://blog.guoshuang.com/?p=4887同时运行多个Firefox实例的方法是:

\\path\\to\\firefox.exe -P buffy -no-remote
$ export MOZ_NO_REMOTE=1 && /path/to/firefox -P Buffy

set MOZ_NO_REMOTE=1
“C:\\Program Files (x86)\\Mozilla Firefox\\firefox.exe” -P blogging

有兴趣可以试一下,同时运行两个完全不一样的Firefox,还能用不同的版本。

据说加上NO_REMOTE之后,就不能接受外部链接了,所以要想继续接受外部来的链接,还是留一个普通的Fx。

另一个有用的是

Firefox.exe -install-global-extension “\\extname.xpi”

也就是在存在多个Profile的时候,可以用这个命令来为它们同时安装某个扩展。

http://www.zeali.net/entry/567
Firefox扩展开发学习杂记

标签:, , , ,

20080730 wpf info 1 - 三月 21, 2009 by yippee

2008730 wpf info 1
http://www.yippeesoft.com

MediaPortal II gets opensource wpf engine
http://www.team-mediaportal.com/news/global/mediaportal_ii_gets_opensource_wpf_engine.html

http://forum.team-mediaportal.com/offtopic-57/meedios-demo-video-40961/
MeediOS demo video

http://www.codeplex.com/VideoRendererElement/Release/ProjectReleases.aspx?ReleaseId=12105
VideoRendererElement

http://channel9vip.orcsweb.com/ShowPost.aspx?PostID=395463
is there any issues with WPF and DirectShow?

http://forums.msdn.microsoft.com/fr-FR/wpf/thread/db7d59d1-f881-4556-9f7d-d8ccb7d00a7d/
> WPF, MediaElement and Vid…

http://www.microsoft.com/windows/windowsmedia/tw/content_provider/film/ChoosingPC.aspx

選擇適當的 PC 來播放高畫質的 Windows Media

http://forums.microsoft.com/MSDN-CHT/ShowPost.aspx?PostID=3538354&SiteID=14
WPF MediaElement 撥放1280 x 720視訊問題

http://thewpfblog.com/?p=85
New WPF/E Video Player

http://forums.msdn.microsoft.com/ru-RU/wpf/thread/bc059dae-fb31-4f16-ae5c-d7d6792ba41b

> MediaElement failing with…
http://forums.msdn.microsoft.com/en-US/wpf/thread/2d80888f-4f1d-450c-90ee-2568b7283e23/

http://msdn.microsoft.com/en-us/library/cc189078(vs.95).aspx
Audio and Video Overview (Silverlight 2)

http://msdn.microsoft.com/en-us/library/bb428860.aspx#silverlightwebmedia_topic6
Silverlight for Web Media Scenarios

http://www.macworld.com/article/57370/2007/04/silverlight.html
NAB: Microsoft shows off rival to Flash, QuickTime

http://technet.microsoft.com/zh-cn/office/aa969767.aspx
WPF 性能分析工具

http://blog.csdn.net/rcyl2003/archive/2007/04/21/1574064.aspx
基于SMIL的多媒体课件制作工具的研究

http://www.wuguoqiang.com/J_note_detail.asp?id=143

多媒体文件的组合 — SMIL

http://www.ibm.com/developerworks/cn/xml/x-smil/
熟悉 SMIL 2.0

将多媒体集成到 Web 内容中的基于 XML 的方法

http://www.w3schools.com/smil/smil_files.asp?output=print
SMIL Files

http://cache.qihoo.com/wenda.php?do=snap&m=f81a9a01513d2d0d94b2f9290991642d&surl=http%3A%2F%2Fwww.cnblogs.com%2FRChen%2Farchive%2F2008%2F07%2F17%2F1244782.html&act=fetchHtmlsnap

标签:,
20080729 xpe vmware info 2 - 三月 20, 2009 by yippee

20080729 xpe vmware info 2
http://www.yippeesoft.com

http://www.windowsfordevices.com/articles/AT6380158626.html
Troubleshooting Windows XPe\’s blue screen "Stop 0×0000007B" error

http://www.tech-archive.net/Archive/WinXP/microsoft.public.windowsxp.embedded/2006-09/msg00144.html
Does anybody successfully install VMWare server on XPe?

Error    1109: Component: "ACPI Uniprocessor PC [Version 5.1.2600.1106, R1507]" requires at least one additional enabled component not in the configuration
Error    1109: Component: "ACPI Uniprocessor PC [Version 5.1.2600.1106, R1507]" requires an additional enabled component not in the configuration

Error    1005: File not found: "vmscsi.cat"
Error    1005: File not found: "VMSCSI.INF"
Error    1005: File not found: "vmscsi.sys"

http://blogs.msdn.com/mikehall/
New Book! – Windows Embedded CE 6.0 Fundamentals.

http://support.microsoft.com/?scid=kb%3Bzh-cn%3B303786&x=8&y=7
丢失 [SysprepMassStorage] 部分导致STOP 0×7B 错误消息

http://thepeelers.com/archive/how-to-image-windows-xp-with-ghost-and-sysprep/
How-To: Image Windows XP with Ghost and Sysprep

http://communities.vmware.com/message/53548;jsessionid=93D1CBA7F74966E79A9BF3BB31B28927
BartPE Plugin for Loading VMSCSI Driver – Please try it

http://www.eggheadcafe.com/software/aspnet/32027060/blue-screen-stop-error-0x.aspx
Blue Screen Stop Error 0×0000007b – Scot

http://blog.csdn.net/cudng/archive/2007/08/15/1745223.aspx
 XP Embedded 蓝屏错误 Stop 0×0000007B

 http://www.eggheadcafe.com/software/aspnet/30258134/stop-0×0000007b.aspx
 STOP: 0×0000007B – Mik

 http://www.venturecake.com/a-simple-guide-to-using-your-existing-windows-install-apps-in-ubuntu/
 15 minutes to using your existing Windows install & apps in Ubuntu

 http://www.tech-archive.net/Archive/WinXP/microsoft.public.windowsxp.embedded/2004-03/0180.html
 Re: what \’s wrong on cf card

 http://www.realgeek.com/forums/dok-usb-boot-7b-error-171036.html
 DOK USB Boot -> 7B Error

 http://linux.derkeiler.com/Newsgroups/comp.os.linux.questions/2004-01/0270.html
 Making a link to a dir on another partition

 http://www.tech-archive.net/Archive/WinXP/microsoft.public.windowsxp.embedded/2004-12/0068.html
 Re: Error: "Target Designer was unable to clear the contents of the de

 http://msdn.microsoft.com/en-us/library/aa460102.aspx
 Release Notes for Microsoft Windows XP Embedded with Service Pack 2

 http://www.realgeek.com/forums/error-target-designer-unable-clear-contents-de-152003.html
 Error: "Target Designer was unable to clear the contents of the de

 http://www.tech-archive.net/Archive/WinXP/microsoft.public.windowsxp.embedded/2004-12/0064.html
 Error: "Target Designer was unable to clear the contents of the de

 http://communities.vmware.com/message/770483;jsessionid=6693C92AC349753661759575C7E78C05
 Running Ghost suite 11.0.1 on CD and restoring gho files from USB hard drive on desktop 6

 http://bbs.wwwfox.net/viewthread.php?tid=79952
 请问如何设置VMWare从USB启动?

 http://jydiy.blogcn.com/diary,114380056.shtml
 制作一张属于你自己的XP Embedded光盘 [转]

 http://msdn.microsoft.com/en-ca/library/aa459169(zh-cn).aspx
 通过使用 Enhanced Write Filter 和 Device Update Agent 更新现场设备

 http://www.team-mediaportal.com/news/global/mediaportal_ii_gets_opensource_wpf_engine.html

 http://bbs.ctocio.com.cn/thread-7805296-1-1.html
 如何定制Windows XP Embedded (二)

 http://hi.baidu.com/wmsnet/blog/item/ba0cf72a8cabce2cd52af18e.html
 用grub直接启动xp embedded的sdi成功!

 http://msdn.microsoft.com/en-ca/library/aa460091(zh-cn).aspx
 使用 Windows PE 和 SDI (Windows XP Embedded Service Pack 2) 创建嵌入式恢复 CD

 http://bbs.znpc.net/viewthread.php?tid=3562&extra=page%3D1
 WinPE 驱动程序最终解决方案 【zt】
From: http://bbs.wuyou.com/viewthread.php?tid=89290&extra=page%3D5

http://blog.163.com/liguisheng_002/blog/static/26895122007911103819222/

从零开始学,针对网吧的嵌入式系统(比如xpe)制作!【精华】1

今天我来发布 Windows XP Embedded3
 

http://yuzengqile.blog.163.com/blog/static/59519852006225443140/
Windows XP Embedded 上手指南

http://forum.eepw.com.cn/forum/main?url=http%3A%2F%2Fbbs.edw.com.cn%2Fthread%2F128811%2F1
 如何定制Windows XP Embedded

 http://blog.csdn.net/techyang/archive/2008/01/16/2046345.aspx
  Windows XP Embedded (XPE)开发工具、升级包、中文包等微软官方下载地址

  http://hi.baidu.com/braver/blog/item/c8a8c22a2de0c22ed52af16a.html
  作者自爆WinXP Embedded嵌入系统的内幕

标签:, ,

20080728 xpe vmware info 1 - 三月 19, 2009 by yippee

20080728 xpe vmware info 1
http://www.yippeesoft.com

简介
Microsoft Windows XP 是继 Windows 2000 和 Windows Millennium Edition 后推出的又一个 Windows 版本。Windows XP 通过将 Windows 2000 中的强大功能(包括基于标准的安全性、易管理性以及可靠性)与 Windows 98 和 Windows Millennium Edition 中的最佳功能(如即插即用、易于使用的用户界面以及具有创新意义的支持服务)进行集成,将 Windows 操作系统 (OS) 的精华有机地组织在一起。Microsoft Windows XP Embedded 是一个完全组件化的 Windows XP 操作系统。

有了 Windows XP Embedded 工具,您可以开发出自定义嵌入式应用程序,以及完全满足您应用程序环境需求的运行时 Windows XP 操作系统映像。

例如,您可能正在开发一个作为 kiosk 运行的应用程序,以便用于某个特定用途。kiosk 应用程序可能需要一个触摸屏监视器、一个串行端口、一个 CD-ROM 以及一个调制解调器,但可能不需要网络连接、Internet 访问或特殊功能选项,如高级配置和电源接口 (ACPI)。对于该示例应用程序,您应使用 Windows XP Embedded 中提供的工具来配置自定义应用程序(即 kiosk),并只需添加创建应用程序所需要的 Windows XP 组件

You are using a SCSI physical disk.  SCSI physical disks do not dual-boot well (that is. an already installed operating system is unlikely to boot correctly inside a virtual machine). However, SCSI physical disks should work fine if used exclusively within the virtual machine.

http://www.vmware.com/download/ws/
Download VMware Workstation

http://www.realgeek.com/forums/ann-xpe-vmware-79840.html
ANN: XPE and VMware.

http://communities.vmware.com/thread/45010
Windows XP Embedded on VMware

http://www.pcreview.co.uk/forums/thread-2691184.php
XP Embedded up and running with VMWare

http://www.seanliming.com/Docs/XPE%20Stop%200×0000007B%20Error%20V1.3.pdf

http://www.realgeek.com/forums/nul-device-missing-97652.html
"NUL" device is missing

http://episteme.arstechnica.com/eve/forums/a/tpc/f/12009443/m/506001823931
Installing Windows XP on VMware ESX 3.5

http://www.experts-exchange.com/Software/VMWare/Q_23521546.html
How to Create VMware XP Embedded Image

http://communities.vmware.com/thread/127413
Windows XP Embedded

http://forums.microsoft.com/EmbeddedWindows/ShowPost.aspx?PostID=2776257&SiteID=47
Running VMWare Player on XPe

http://forums.microsoft.com/EmbeddedWindows/ShowPost.aspx?PostID=1291672&SiteID=47
VMWare and XPE

http://www.techspot.com/vb/all/windows/t-7798-Remove-disk-and-other-media.html
"Remove disk and other media"

http://communities.vmware.com/thread/31448
Ultimate-P2V Available for Download

http://www.linuxsir.org/bbs/showthread.php?p=217668
在内核中如何加入对Vmware的scsi硬盘的支持???

http://www.bjx.com.cn/files/wx/dxjs/2004-4/39.htm
嵌入式Windows XP操作系统开发

冯 峰

http://web.hk.edu.tw/~gas/plan/plan4951B.pdf

http://download.microsoft.com/documents/australia/medc2006/XP_Embedded_Boot_Options_Jones.ppt

http://tone497.blogspot.com/2008/01/blog-post_23.html
2008-01-18 &line; 转载:针对网吧的嵌入式系统制作
http://lzg-ad.blog.sohu.com/76904323.html

http://forums.microsoft.com/china/ShowPost.aspx?PostID=3627499&SiteID=15
怎么利用虚拟机安装已经定制好了的操作系统?

http://bbs.dp168.com/thread-6339-1-1.html
Windows XPE超微版下载及相关资料

http://bbs.wuyou.com/archiver/?tid-38217.html
Windows XP Embedded 制作指南

http://bbs.wuyou.com/viewthread.php?tid=38217&extra=&page=3
Windows XP Embedded 制作指南

http://xpembed.blogspot.com/
Creating A usb stick that can install XPSP2

http://bbs.wuyou.net/archiver/?tid-38301-page-19.html
体积超小适应性强启动方式多启动介质多的PE系统[3个IMG文件3个ISO文件]

http://bbs.wuyou.com/archiver/?tid-32786.html
用Ramdisk启动WinXPE成功! [总结各位大大的思路和经验]

http://checko.blogspot.com/2006/06/xpe-workrecord-run-in-vmware-fat.html
XPE Workrecord – run in VMWare .. FAT

http://collegegeek.org/2008/06/17/using-vmware-to-build-and-run-xp-embedded/
Using VMware to Build and Run XP Embedded

http://msdn.microsoft.com/en-us/library/ms838564.aspx
Building a Diskless Automation Controller Using Windows XP Embedded

http://www.911cd.net/forums//lofiversion/index.php?t19056.html
Booting Xp From Ramdisk

http://msdn.microsoft.com/en-us/library/aa459162.aspx
Target Designer, Inside and Out

标签:, ,

20071219 asp.net js info - 十月 7, 2008 by yippee

20071219 asp.net js info
http://www.yippeesoft.com

在CS后台,只能拿到服务器控件的值(如果你用FindControls) 
  只能用Post,从Request中获取 
  Request["控件"].ToString();  

  js函数绑定到asp.net的控件上:
    用 控件.Attributes.Add(事件,函数) 就可以了,可我在往 CheckBox上加 OnCheckedChanged 事件的时候总是报错。

    在 asp.net 中访问 html 控件:
    一气之下,把所有控件都换成了 html 的,然后在控件上加上 runat=server 这样在 asp.net 中就可以引用了。用 (FindControl(控件id) as html控件类型).属性,如 (this.FindControl("ddlMonth") as HtmlSelect).SelectedIndex ……

    在html网页中读取asp.net的变量
    为了能够在js中读取asp.net中的数据,要保证asp.net中变量的类型js能够分辨,其实想办法变成string的就得了呗!
    其次,要把变量声明为 Public 的。
    在js中使用 变量="<%#asp.net变量名%>";  的形式即可得到变量的值,如 var id = "<%#userid%>"; (asp.net中Public string userid = "zhangsan";

    System.Collections.Specialized.NameValueCollection   nvs=Request.Form; 
                  for   (int   i   =   0;   i   <   nvs.Count;   i++) 
                  &leftsign; 
                          nvs.AllKeys[i];//这里是Text 
                          nvs[i];//这里是值 
                  &rightsign;

    Select   控件的值只有选择后   ,   服务器端通过   Request["select   name"],才能取道选择的值 
  因为asp.net是通过客户端   post   回来的数据来获得客户端的值 
  类似 
  Post   textbox1="yourinput"&Select1="yourslect";  

  在web页面用javascript取值 
  添加一个控件   <asp:textbox   id="txt_slcted"   Width="75px"   runat="server"   style="DISPLAY:none"></asp:textbox> 
  绑定js的时候多加一个getvalue 
  function   getvalue() 
  &leftsign; 
  document.all.txt_slcted.value=""; 
  var   nsvlen=document.all.right_category_id.options.length; 
  for(i=0;i<nsvlen;i++) 
  &leftsign; 
  document.all.txt_slcted.value+=document.all.right_category_id.options[i].value+";"; 
  &rightsign; 
  if(document.all.txt_slcted.value.length>0) 
  &leftsign; document.all.txt_slcted.value=document.all.txt_slcted.value.substr(0,len-1);//去掉最后的; 
  &rightsign; 
  &rightsign; 
 

  asp.net与javacript之间的通讯 

    //因为RegisterStartupScript是在
    //Page 对象的 <form runat= server> 元素
    //的结束标记之前发出该脚本;

    //而RegisterClientScriptBlock则是在
    //Page 对象的 <form runat= server> 元素
    //的开始标记后发出。

      
用ASP.NET向javascript传递变量

 
方法1:

用一个隐藏控件,把变量的值给隐藏控件,再用javascript去找隐藏控件的值
window.document.getElementById("隐藏控件的ID").value //这个就可以得到隐藏控件的值

方法2:
javascript 中:
var value=<%=Num%>

Num要是一个属性
如:
Public String Num
&leftsign;
set&leftsign;…&rightsign;
get&leftsign;…&rightsign;
&rightsign;

如果字符变量是字符型像alert()等要这样用alert("<%=Num%>");
还有Num一定要是public申明

1、js脚本如何访问服务器控件的值
        界面上有一个TextBox控件,ID为Name,js里可以采用如下脚本取Name的值
        var myvalue=document.all(\’Name\’).value;

2、服务器控件如何取js中变量的值
        目前未发现比较好的办法,我通常采用的方法是在界面上放一个隐藏的控件HtmlInputHidden,然后设置为以服务器控件运行,这样在js脚本中和ASP.NET代码里都可以访问到该控件的值
        js中给服务器控件赋值:
        var bt=document.all(\’Name\’).value;
        bt.value=\’名称\’;
        ASP.NET中使用Name.Value来访问。

3、如何遍历界面上所有TextBox元素
        var inputList = document.body.getElementsByTagName("INPUT");
        for(var i=0;i<inputList.length;i++)
        &leftsign;
           if(inputList[i].disabled==false && (inputList[i].type==\’text\’ &line;&line; inputList[i].type==\’password\’))
           &leftsign;
              inputList[i].value="";
           &rightsign;
        &rightsign;

4、让dropdownlist选择到指定项
        选择dropdownlist中值为“我得选择”得项
        var handl=document.all(\’List1\’);
        var my_value=\’我得选择\’;
        for(var index=0;index<handle.options.length;index++)
        &leftsign;
            if(handle.options[index].text==my_value)
            &leftsign;
                handle.selectedIndex=index;
            &rightsign;
        &rightsign;

 1、在aspx文件中找到Form1标签,在其后增加如下js脚本:
        <input type="hidden" name="__EVENTTARGET"> <input type="hidden" name="__EVENTARGUMENT">
   <script language="javascript" type="text/javascript">
    <!–
    function __doPostBack(eventTarget, eventArgument) &leftsign;
    var theform;
    if (window.navigator.appName.toLowerCase().indexOf("microsoft") > -1) &leftsign;
    theform = document.Form1;
    &rightsign;
    else &leftsign;
    theform = document.forms["Form1"];
    &rightsign;
    theform.__EVENTTARGET.value = eventTarget.split("$").join(":");
    theform.__EVENTARGUMENT.value = eventArgument;
    theform.submit();
    &rightsign;
    // –>
   </script>

2、然后javascript的函数中使用__doPostBack(\’Button1\’,\’\')就可以调用指定服务器按钮的事件了,目前测试了调用 Button的Click事件没有任何问题,不过即使Button的Visible="False"是,事件也是可以被触发的,所以如果需要调用别的服务器函数或者事件,可以在界面上放一个隐藏的Button控件,然后在它的Click事件中调用别的函数即可。

标签:, , ,

20071101 DSL x-network-info interface build MVC - 八月 7, 2008 by yippee

20071101 DSL x-network-info interface build MVC
http://www.yippeesoft.com

MiX07上宣布的。DLR =  Dynamic Language Runtime。DLR和IronPython全部开源,可以到codeplex下载。有了DLR,在.NET上开发动态语言的工作可以简化许多。目前DLR支持Python, Ruby, JavaScript,和VB,只能在Silverlight下运行。不过把支持面扩展到普通CLR运行时应该只是时间问题。微软的CLR已是牛B的运行时,有一流的GC,高效的JIT,完整的类型系统,和相对强健的安全机制。DLR在CLR的基础上又加入对动态类型的支持。在DLR上开发的动态语言可以共享这些基础功能。这非常重要。光开发高质量的GC和JIT就需要好几代程序员和计算机科学家忘我工作,而现在牛人们不用再为这些基础设施耗费额外的精力,可以专注于语言的设计。DLR上的动态语言编译成IL的字节码后,可直接在CLR上运行。在俺看来,这才是真正的杀手卖点:动态语言们能够共享. NET庞大的类库。Ruby+LINQ,多爽啊!一门语言光有炫目的功能是不够的。语言背后的平台本就是语言的一部分。功能完善、运行稳定的一整套类库向来是做大型系统开发的老大们考虑的重点。而流行类库背后是一大票程序员。有了数量,才有质量。有共同的类库分享,才有很多人一起分享心得。人多了,社区才热闹,遇到问题才有人帮忙解决。才有公司向这门语言大笔投注。不然的话,天下功能强大的语言千千万,替它们布道的牛人万万千,说到开发大型商业程序的系统语言,还不就是C++, Java,和C#? 不要用Paul Graham的Viaweb,Orbiz的问价系统,或者Naughty Dog的游戏来说事。这些本就是小撮牛人们的特例。比如Naughty Dog:不错,他们的竞争优势之一是使用用CommonLisp,能快速开发出复杂而流畅的游戏。问题是,Naughty Dog为了用好Common Lisp,开发了自己的编译器,自己的Profiler, 自己的框架。有几个老大有这个本事?Ruby最受人批评的地方之一便是它的类库有限,而当年Perl流行很大程度上归功CPAN。现下流行的 reddit.com本来用Common Lisp写成,但因为Common Lisp没有一套统一可移植的类库,reddit.com的创始人最终选择用Python重写reddit。

WAP如何获取手机号

只要知道联通或者移动的网关中手机号的字段,就可以自己写个脚本通过http头获取手机号 Request.getHeader("字段名");
限制条件:第三方的网关传送了手机号,如果是自己开发的网关,就没有问题了

phone=Request.ServerVariables("HTTP_X_UP_CALLING_LINE_ID")

String Mobile_GPRS = Request.getHeader("X-up-calling-line-id");
String Mobile_CDMA = Request.getHeader("x-up-subno");
String Mobile_INFO = Request.getHeader("x-network-info");
String Mobile_DEVI = Request.getHeader("deviceid");

/// <summary>
/// 获取手机头信息(手机号等)
/// </summary>
private void mobilemsg()
&leftsign;
for (int i = 0; i < Request.Headers.Count; i++)
&leftsign;
Response.Write(" -> " + Request.Headers.Keys[i].ToString() + "<br>");
Response.Write(" " + Request.Headers[i].ToString() + "<br><br>");
&rightsign;

string Mobile_GPRS = System.Web.HttpContext.Current.Request.Headers["X-up-calling-line-id"];
string Mobile_CDMA = System.Web.HttpContext.Current.Request.Headers["x-up-subno"];
string Mobile_INFO = System.Web.HttpContext.Current.Request.Headers["x-network-info"]; // 通过网络协议获取, 客户手机号码及类型等
string Mobile_DEVI = System.Web.HttpContext.Current.Request.Headers["deviceid"];
string Mobile_Accept = System.Web.HttpContext.Current.Request.Headers["Accept"]; // 获取WAP支持的类型

&rightsign;

nib4j 1.0 is a simple but powerfull Java library that permits the use of Apple\’s Interface Builder to design Swing-based user interfaces. It creates Swing menus, frames and dialogs from Carbon nib files and provides a complete separation of UI and application code. nib4j supports both absolute and relative positioning/sizing, internationalization and more than 25 UI controls, including real floating palette windows and Mac OS X 10.3 group boxes. By using the included "nib4j Viewer" you can try out your UI without writing any code and generate the necessary Java source to access the Swing components. For non-commercial use nib4j is completely free.

    BM Reflexive User Interface Builder (RIB)是来自 alphaWorks 的一项新技术,是用来构建和提供 Java AWT/Swing 和 Eclipse SWT GUI 的应用程序和工具包。RIB 指定了一种灵活易用的 XML 标记语言来描述 Java GUI,并为创建这些 GUI 提供了引擎。可以使用 RIB 测试和评估基本的 GUI 布局和功能,或者为应用程序创建和提供 GUI。

不论使用何种小窗口部件集(widget set),用 Java 语言手工编写 GUI 都将是一个单调乏味并且容易出错的过程。使用标记语言来说明 GUI 要容易得多。IBM Reflexive User Interface Builder (RIB) 是一种基于描述性 XML 文档构造和提供 Jave AWT/Swing 和 Eclipse SWT GUI 的应用程序,该 XML 文档是作为脚本引用的。RIB 既是用来描述 Java GUI 的标记语言的规范,也是用来创建和提供这些 GUI 的引擎。可以将 RIB 用作独立的应用程序,来测试和评估基本的 GUI 布局和功能,也可以将其用作 Java 应用程序环境中的库,为应用程序创建和提供 GUI。

# Web服务器

   1. 描述:提供Web服务。
   2. 常用软件:IIS、Apache。
   3. 描述:Web服务器也是个用处极为广泛的服务器,通常包含团队的首页(占公网80端口),项目管理软件(ProjectServer、BugFree等),Blog,Wiki,BBS等。

# 版本控制服务器

   1. 描述:提供版本控制。
   2. 常用软件:VSS、TFS、SVN、CVS等。
   3. 描述:没有版本控制的项目是不能想象的。一个成熟的团队通常用版本控制工具管理整个项目文件:文档、代码、数据库脚本、页面设计……。版本控制服务器的重要性也就不容置疑了。

# 部署服务器

   1. 描述:用于团队项目的部署、发布。
   2. 常用软件:WebServer、FtpServer。
   3. 描述:对于团队、特别是承接项目的团队,快速发布作为敏捷开发的一种方式,已经越来越普遍。部署服务器就是用于团队项目开发过程中所有版本的部署。通常这些发布版本互相之间是独立的,是可以同时访问的。部署服务器作为迭代和增加交付的工具,可以保留项目的开发历程、快速向客户演示以及增进团队成员的信心!

利用HttpModuler实现WEB程序同一时间只让一个用户实例登陆
http://www.xqblog.net/html/619.html

http://www.qlzc.com/htm/200708/2007675.html
HttpHandler

妙用Asp.Net中的HttpHandler
http://webuc.net/dotey/archive/2004/06/08/966.aspx

HttpModule和HttpHandler
http://industry.ccidnet.com/art/1077/20040413/723119_1.html

http://hi.baidu.com/holylan/blog/item/f878f5030d64a0ed09fa93f1.html
HttpHandler

Java基础:MVC设计模式减少编程复杂性
模型/界面/控制器(Model/View/Controller,MVC)编程技术允许一个开发者将一个可视化接口连接到一个面向对象的设计中,而同时还可以避免我们上面讨论的几个问题。MVC最初是为Smalltalk语言而设计的。MVC 通过创建下面三个层将面向对象的设计与可视化接口分开:

模型(Model):模型包含完成任务所需要的所有的行为和数据。模型一般由许多类组成并且使用面向对象的技术来创建满足五个设计目标的程序。

界面(View):一个界面就是一个程序的可视化元素,如对话框、选单、工具条等。界面显示从模型中提供的数据,它并不控制数据或提供除显示外的其它行为。一个单一的程序或模型一般有两种界面行为。

控制器(Controller):控制器将模型映射到界面中。控制器处理用户的输入,每个界面有一个控制器。它是一个接收用户输入、创建或修改适当的模型对象并且将修改在界面中体现出来的状态机。控制器在需要时还负责创建其它的界面和控制器。

控制器一直决定哪些界面和模型组件应该在某个给定的时刻是活动的,它一直负责接收和处理用户的输入,来自用户输入的任何变化都被从控制器送到模型。

界面从模型内的对象中显示数据。这些对象的改变可以通过也可以不通过用户的交互操作来完成。如:在一个Web浏览器中负责接收页面的对象收集和装配栈中的信息,必须有某种方式来让这些对象通知界面数据已经被改变了。在模型变化时有两种方法来对界面进行更新。

在第一种方法中,界面可以告诉模型它正在监视哪些对象。当这些对象中有任何一个发生变化时,一个信息就被发送给界面。界面接收这些信息并且相应地进行更新。为了避免我们上面讨论的不足,模型必须能够不用修改就支持许多种不同的界面显示。

第二个方法并不直接将界面连接到模型中,它的控制器负责在模型变化时更新界面。控制器通过对模型对象或观察器方法进行监测来检测模型中的变化。这个方法不用了解界面的模型知识,因此界面就变成是可以跨应用使用的。

使用MVC的优点

MVC通过以下三种方式消除与用户接口和面向对象的设计有关的绝大部分困难:

第一,控制器通过一个状态机跟踪和处理面向操作的用户事件。这允许控制器在必要时创建和破坏来自模型的对象,并且将面向操作的拓扑结构与面向对象的设计隔离开来。这个隔离有助于防止面向对象的设计走向反面。

第二,MVC将用户接口与面向对象的模型分开。这允许同样的模型不用修改就可使用许多不同的界面显示方式。除此之外,如果模型更新由控制器完成,那么界面就可以跨应用再使用。

最后,MVC允许应用的用户接口进行大的变化而不影响模型。每个用户接口的变化将只需要对控制器进行修改,但是既然控制器包含很少的实际行为,它是很容易修改的。

面向对象的设计人员在将一个可视化接口添加到一个面向对象的设计中时必须非常小心,因为可视化接口的面向操作的拓扑结构可以大大增加设计的复杂性。

MVC设计允许一个开发者将一个好的面向对象的设计与用户接口隔离开来,允许在同样的模型中容易地使用多个接口,并且允许在实现阶段对接口作大的修改而不需要对相应的模型进行修改。

http://lzppcc.cnblogs.com/

领悟Web设计模式

ASP.NET下MVC设计模式的实现

Dot Net设计模式—MVC模式
用C#实现MVC(Model View Control)模式介绍

NStruts
Maverick.NET
MaverickLite
Ingenious MVC
Websharp

http://fineboy.cnblogs.com/category/33552.html

MS针对MVC推出新框架

altnetconf – Scott Guthrie announces ASP.NET MVC framework at Alt.Net Conf

标签:, , , , ,
20070607 vs2005 smartphone winform diff - 二月 13, 2008 by yippee

20070607 vs2005 smartphone winform
http://www.yippeesoft.com

奇怪的事情
同样的代码,SMARTPHONE就会出错

private void button2_Click(object sender, EventArgs e)
        &leftsign;
            tree.Nodes.Remove(tree.SelectedNode);
        &rightsign;

未处理 System.ArgumentOutOfRangeException
  Message="ArgumentOutOfRangeException"

只好改成
tree.SelectedNode.Remove();

树视图控件中移除当前树节点。

命名空间:System.Windows.Forms
程序集:System.Windows.Forms(在 system.windows.forms.dll 中)

private void treeView1_MouseDown(object sender, MouseEventArgs e)
&leftsign;
   switch(e.Button)
   &leftsign;
      // Remove the TreeNode under the mouse cursor
      // if the right mouse button was clicked.
      case MouseButtons.Right:
         treeView1.GetNodeAt(e.X, e.Y).Remove();
         break;
     
      // Remove the TreeNode under the mouse cursor
      // if the middle mouse button (mouse wheel) was clicked.
      case MouseButtons.Middle:
         treeView1.GetNodeAt(e.X, e.Y).Toggle();
         break;
   &rightsign;
&rightsign;

从树节点集合中移除指定的树节点。

命名空间:System.Windows.Forms
程序集:System.Windows.Forms(在 system.windows.forms.dll 中)

private void button1_Click(object sender, EventArgs e)
&leftsign;
   // If neither TreeNodeCollection is read-only, move the
   // selected node from treeView1 to treeView2.
   if(!treeView1.Nodes.IsReadOnly && !treeView2.Nodes.IsReadOnly)
   &leftsign;
      if(treeView1.SelectedNode != null)
      &leftsign;
         TreeNode tn = treeView1.SelectedNode;
         treeView1.Nodes.Remove(tn);
         treeView2.Nodes.Insert(treeView2.Nodes.Count, tn);
      &rightsign;
   &rightsign;
&rightsign;

using (SQLiteConnection conn = new SQLiteConnection("Data Source=" + path + ";New=False;Compress=False;Synchronous=Off;UTF8Encoding=False;Version=3"))
            &leftsign;
                conn.Open();
                SQLiteCommand cmd = conn.CreateCommand();

               
                cmd.CommandText = "select DISTINCT (box) from sms";
                IDataReader dbReader = cmd.ExecuteReader();

                Cls_SMS_Node clsnodeP;
                while (dbReader.Read())
                &leftsign;
                    clsnodeP = new Cls_SMS_Node(dbReader[0].ToString());
                    clsnodeP.id = -1;
                    tree.Nodes.Add(clsnodeP);
                &rightsign;
                dbReader.Close();

  这段代码每次第二次执行的时候就会出现 unable open database file 错误

标签:, , , , , , , , , ,
20070602 AnkhSVN WinForm  Minimized IE7 - 十一月 3, 2007 by yippee

20070602 AnkhSVN WinForm  Minimized IE7
http://www.yippeesoft.com
 
 AnkhSVN: A Subversion addin for Microsoft Visual Studio .NET

AnkhSVN is a Visual Studio .NET addin for the Subversion version control system. It allows you to perform the most common version control operations directly from inside the VS.NET IDE. Not all the functionality provided by SVN is (yet) supported, but the majority of operations that support the daily workflow are implemented.

在vs中直接使用AnkhSVN签入一个项目.
      则会自动排除Bin,obj文件夹等项目自动生成的文件,另外被项目排除在外的文件也不会被Check In
       安装VS.NET插件AnkhSVN,通过简单配置让其支持.svn和_svn,并其很好的支持web project
本来觉得没有必要写这么个使用帮助的,但看到网上很多文章介绍ankhSVN不支持web project 或者说不支持_svn等,觉得还是有些的必要了,算是抛砖引玉吧。
下载并安装最新版本AnkhSVN;
运行VS.NET,并在Add-in Manager中加载AnkhSVN;
打开一个solution,按图示强制AnkhSVN加载该Solution;
重新启动VS.NET,OK;
如果Solution中包含Web project,建议先使用TortoiseSVN 取得solution,然后用VS.NET加载Solution,就发现AnkhSVN支持Web Project
有时候会碰到AnkhSVN无法对指定的solution进行版本控制,这时候你需要检查下你的SVN是.svn还是_svn,然后根据相应类型修改AnkhSVN配置文件(AnkhSVN默认支持.svn),你需要修改的目标行就是:
<!–<AdminDirectoryName>_svn</AdminDirectoryName>–>
也就是说,如果需要_svn,就把这行的注释去掉。

//this.ShowInTaskbar  =  false;
this.WindowState  =  FormWindowState.Minimized;

# WinForm 捕获最小化事件

虽然Form类没有提供Minimize的事件,但还是可以通过重载Deactive来实现
当Form失去焦点后,测试WindowState取得Form状态,若为Minimized既是最小化事件。
本例为最小化后隐藏窗口:
private void Form1_Deactivate(object sender, EventArgs e)
        &leftsign;
            if (this.WindowState == FormWindowState.Minimized)
                this.Visible = false;
        &rightsign;

还有种方法更加直接,重载WndProc:

const int WM_SYSCOMMAND = 0×112;
const int SC_CLOSE = 0xF060;
const int SC_MINIMIZE = 0xF020;
const int SC_MAXIMIZE = 0xF030;
protected override void WndProc(ref Message m)
&leftsign;
    if (m.Msg == WM_SYSCOMMAND)
    &leftsign;
        if (m.WParam.ToInt32() == SC_MINIMIZE)
        &leftsign;
            this.Visible = false;
            return;
        &rightsign;
    &rightsign;
    base.WndProc(ref m);
&rightsign;

    * 如果你用过了Visual Studio 2005 beta 你会发现在bin  目录下面有一个带vshost 的文件,Vshot是什么呢?这是为了提高 F5 功能而设置的。简单的说,就是在你编制程序的过程中,IDE 已经在为你的程序调试做准备了,也可以理解为搭环境。
    * 如果找不到Vshot 以及其它的文件,程序的配置文件等将不能正确装载。
    * "*.vshost.exe" 和"*.vshost.exe.config" 文件只是在 IDE 里编程的时候需要,在部署的时候,这些都可以不打包。

即宿主进程。宿主进程是 Visual Studio 2005 中的一项功能,能提高调试性能,支持部分信任调试并支持设计时表达式计算。宿主进程文件的文件名中包含 vshost,并位于项目的输出文件夹中。
作用:
宿主进程创建一个应用程序域并将调试器与应用程序关联起来。执行这些任务会导致在开始调试和开始运行应用程序之间有很明显的延迟。通过在后台创建应用程序域和关联调试器,并在运行应用程序之间保存应用程序域和调试器状态,宿主进程使性能得到提高。部分信任调试及设计时表达式计算(即时窗口)。部分信任在安全页中配置

IE7 还是不能正常访问mk:@MSITStore:G:\\ms\\vs6\\MSDN98\\98VS\\2052\\vbcon98.chm::/Html/vbconusingwinsockcontrol.htm
导致上面的连接不能点击

遇到一个IE7.0 Beta2的BUG – 非非.Net的个人博客 天行健,君子以…
安装了IE7.0Beta2以后,我安装的MSDN2003的显示就有问题了,而MSDN2005显示正常,我想可能是安全限制的问题,于是想将MSDN2003的URL加入到本地地址列表中,可是IE不允许加入,如图: 不知道谁能帮偶解决这个问题看?

Subject: IE7 and VS.2003 msdn help   3/6/2006 1:50 AM PST
 
By:    Chris  In:    microsoft.public.internetexplorer.general
 
 
I\’ve just installed the IE7 beta2 and have discovered that my Visual Studio
2003 MSDN help files now render as Times Roman with no formatting at all. The
MSDN help docs for VS.NET 2005 render fine.

My example is:

ms-help://MS.VSCC.2003/MS.MSDNQTR.2005OCT.1033/cpref/html/frlrfSystemArrayMembersTopic.htm

Is there a work around for this?

This error also occurs for SQL Server 2005 Books Online.
I had this symptom with those and (I have just realized) it "went away".   ; &rightsign;
Unfortunately I can\’t remember what all I might have done since I noticed it.

Which build do you have?  FWIW I am now on  5335.5  (aka IE7b2p2)
If you don\’t have that one yet I would guess that that is what is fixing the
symptom.   Downloadable from here:
I\’m experiencing the same thing as Zandc.  It seems like my SQL Server 2005
Books Online does not have the correct CSS applied.  I have IE7 Beta 2
(7.0.5346.5) installed.

However my VS.NET 2003 help and MSDN Library display correctly.  No problem
with VS.NET 2005 either.  However I do have problems with some CHM files.

Very frustrating!

标签:, , , , , , ,
20070112 ntuser.com SysInfo.wmp - 六月 15, 2007 by yippee

20070112 ntuser.com SysInfo.wmp http://www.yippeesoft.com

流氓无处不在

2006-12-10 22:00:21 1095 SF\\shengfang D:\\Favorites\\ntuser.com \\REGISTRY\\MACHINE\\SOFTWARE\\Classes\\CLSID\\&leftsign;08315C1A-9BA9-4B7C-A432-26885F78DF28&rightsign; 防间谍程序最大保护:禁止安装新的 CLSID、APPID 和 TYPELIB 
2006-12-10 22:00:21 1095 SF\\shengfang D:\\Favorites\\ntuser.com \\REGISTRY\\MACHINE\\SOFTWARE\\Classes\\CLSID\\&leftsign;08315C1A-9BA9-4B7C-A432-26885F78DF28&rightsign;\\InProcServer32 防间谍程序最大保护:禁止安装新的 CLSID、APPID 和 TYPELIB 
2006-12-10 22:00:26 1092 SF\\shengfang C:\\WINDOWS\\Explorer.EXE \\REGISTRY\\MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\ShellExecuteHooks 通用标准保护:禁止安装 Browser Helper Objects 和 Shell Extensions

资料:
卡巴就发现了8个病毒~~名字好像是(image[1].exe).(popup.[2]htm).(jxj.[1].css).(ntuser.com).(aclayer.dll)

一生平安
欢迎你来小酌一坐*^=^* 虚拟网络有陷阱 也有真情 我会把看见的陷阱告诉大家
——————————————————————————–
首页个人资料日志图片博客群好友
jxj.css实际是一个exe文件,压缩包图标。

创建\\Program Files\\Common Files\\Microsoft Shared\\MSINFO\\SysInfo.wmp,作为消息钩子,创建_xr.bat文件,删除本身,并创建callwndproc钩子,调用IE访问网络(59.151.29.70),修改shell.dll
_xr.bat
:try
del "C:\\temp\\jxj[1].exe"
if exist "C:\\temp\\jxj[1].exe" goto try
del %0
 
利用sreng扫描系统

启动项目注册表

[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\ShellExecuteHooks]
    <&leftsign;08315C1A-9BA9-4B7C-A432-26885F78DF28&rightsign;><C:\\Program Files\\Common Files\\Microsoft Shared\\MSINFO\\SysInfo.wmp>  [N/A]

这个病毒目前比较新,不过很多启发式能够查到。
它的图标是默认的WinRAR的自解压图标,大小为92,957字节,通过UPX加壳。
病毒运行后会在临时文件夹中生成一幅MM图片(图中标有“吃我一拳”几个字)并在屏幕上显示,同时弹出如下对话框:

病毒生成如下文件:
%ProgramFiles%\\Common Files\\Microsoft Shared\\MSInfo\\SysInfo.dll
%ProgramFiles%\\Common Files\\Microsoft Shared\\MSInfo\\SysInfo.wmp(这实际上是一个Dll文件)
同时会释放一个批处理文件(_xr.bat),用于删除自己的激活体,批处理的内容如下:
:try
del "激活病毒的文件路径及名称"
if exist "激活病毒的文件路径及名称" goto try
del %0
病毒添加如下注册表值:
HKEY_CLASSES_ROOT\\CLSID\\&leftsign;08315C1A-9BA9-4B7C-A432-26885F78DF28&rightsign; (其下的子键被我省略)
HKEY_LOCAL_MACHINE\\SOFTWARE\\Classes\\CLSID\\&leftsign;08315C1A-9BA9-4B7C-A432-26885F78DF28&rightsign; (其下的子键被我省略)
将以下键值的内容指向&leftsign;08315C1A-9BA9-4B7C-A432-26885F78DF28&rightsign;,使其(SysInfo.wmp)达到自启动目的
HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\ShellExecuteHooks
病毒会插入到IEXPLORE.EXE中,所以及时不启动IE,进程中都会一直存在IEXPLORE.EXE进程。
病毒通过QQ及QQ邮箱传播,自动向QQ好友发送带毒邮件,邮件内容自然是一些具有迷惑性的内容,具体的省略了。
病毒盗取QQ密码,其中的方式包括了记录QQ秀以及QQ场景商城两个网页的键盘输入情况。

、“QQ盗号者”(Troj.PSWLiumazi)威胁级别:★

  病毒特征:这是一个盗取QQ号码的木马病毒。

  发作症状:病毒将自身复制到%CommonProgramFiles%\\MicrosoftShared\\
MSInfo\\目录下,并命名为xiaran.dll,同时释放动态链接文件xiaran.vxd,并进行COM注册:CLSID\\&leftsign;08315C1A-9BA9-4B7C-A432-26885F78DF28&rightsign;。该病毒监控用户正在运行窗口以及剪贴版,获取QQ号码等重要信息,并将木马种植者电子邮箱信息、信息提交网址信息加密一起保存于文件尾部。
今天电脑中毒了,瑞星杀不了,只好自己杀了,用瑞星查到病毒是Trojan.PWS.LiuMaZi.ez
 
网上搜索一下,没找到什么可用的资料,没办法,发扬一下自己的DIY精神,自己解决!
 
过程如下:
先找到病毒文件rejoi.vxd的位置,C:\\Program Files\\Common Files\\Microsoft Shared\\MSINFO\\rejoi.vxd 用瑞星杀掉它!过后,rejoi.vxd重新出现,运行.exe文件瑞星还会警报该病毒可以判断病毒肯定还有关联的文件,导致病毒重新出现,仔细看msinfo文件夹,发现一个可以的.dll文件rejoice.dll几乎可以判断是病毒的关联文件了,马上删掉它~结果rejoi.vxd不再重新出现了,瑞星没再警报!一般木马病毒都会修改注册表,以防杀毒软件的破坏,所以还是看一下注册表为好,于是打开注册表,查找“rejoi”,果然找到了一个路径就是[HKEY_CLASSES_ROOT\\CLSID\\&leftsign;08315C1A-9BA9-4B7C-A432-26885F78DF28&rightsign;]
将2个键值都删掉,OK!杀毒完毕!
用超级兔子检验得出以下结论 找到可疑开机程序:TORJAN PROGRAM (C:\\WINDOWS\\SERVICES.EXE)
找到可疑开机程序:TORJAN PROGRAM (C:\\WINDOWS\\SERVICES.EXE)
找到未知文件执行挂钩:&leftsign;08315C1A-9BA9-4B7C-A432-26885F78DF28&rightsign;(C:\\Program Files\\Common Files\\Microsoft Shared\\MSINFO\\SysInfo.wmp)
在兔子清除木马黑客处程序扫描发现以下问题:找到可疑开机程序:TOP (C:\\WINDOWS\\LSASS.exe) 找到未知文件执行挂钩:&leftsign;08315C1A-9BA9-4B7C-A432-26885F78DF28&rightsign;(C:\\Program Files\\Common Files\\Microsoft Shared\\MSINFO\\xiaran.lmz) 159 定向搜索,已安装———-这个东西我在安全模式下用兔子删除了N次了,但是重启又在了。再用兔子删除就死机了。死机画面出现这些:stop:c000021a unknown Hard.Error unknown Hard Error 向各位大侠求救

看的出来,这款密码盗取软件针对目前国内外的主流桌面防火墙软件作出了针对性的改进,且具有很高的隐蔽性,一旦运行了木马的EXE,它就几乎彻底隐藏了自己,就象广告中说的一样,无启动项,无进程。常规的检测工具要检测它具有一定的难度,所以这款木马生成器生成的木马对于普通用户来说具有相当大的杀伤力。

    木马分析

    接下来我们来看看该木马的工作流程:

    木马在获得启动运行后,就会将复制一个备份到C:Program FilesInternet ExplorerPLUGINS,并重命名为qn911.dll(其实这还是一个EXE文件)并将其文件属性设为隐藏和系统然后在C:Program FilesInternet ExplorerPLUGINS释放出qn911.sys(其实这是一个DLL文件)。

    这时候木马会在系统注册表内注册一个CLASSID

    HKCRCLSID

    并将该CLSID和C:Program FilesInternet ExplorerPLUGINSqn911.sys联系在一起。然后将该CLSID添加添加到注册表的ShellExecuteHooks下

    HKLMSOFTWAREMicrosoftWindowsCurrentVersionExplorerShellExecuteHooks

=""

(老鸟这时候就会说了,原来它的无启动项和特殊的线程插入技术就是这么实现的啊…)

Qn911.sys内含有钩子WH_GETMESSAGE。

    在木马下完钩子后,完成盗取QQ密码的准备工作后就创建一个名为MicroSoft.bat的批处理文件,用于删除木马的EXE文件和批处理自身.这样它在系统中就是”无进程”了。

    这里有个插曲,木马的作者会给分析人员一些留言,内容如下:

wodexiaoshihouchaonaorenxingdeshihou

waiozongshichanggehongwonahsougehaoxiangzheyangchangdewodeguxiangzaiyuanfang

tianheiheitiootiantiandouyaoniaiwodexinsiyounicaibuyaowenwocongnalilai

标签:, ,

0306 vprintf trace Debug Assertion Failed info - 七月 4, 2006 by yippee

0306 vprintf trace Debug Assertion Failed info

一段DOS代码,用了一个VPRINTF 变参打印字符串
Write formatted output using a pointer to a list of arguments.
Printf(IN const char *format,… )
&leftsign;
    int      charsNo=0;
    va_list  ap;
    va_start(ap,format);
     charsNo = vprintf(format,ap);
    va_end(ap);
    return charsNo;
&rightsign;

DOS下倒是很正常,WINDOWS下就不能输出到屏幕了,想用TRACE。找找MSDN
vsprintf, vswprintf
Write formatted output using a pointer to a list of arguments.
int vsprintf( char *buffer, const char *format, va_list argptr );

看上去不错 改为:
char ssss[40000];
int rintf(IN const char *format,… )
&leftsign;
    int      charsNo=0;
    va_list  ap;
    va_start(ap,format);
    vsprintf(ssss,format,ap);
    TRACE(ssss);
    va_end(ap);
    return charsNo;
&rightsign;
刚开始还不错,结果到了后面就开始报告
Debug Assertion Failed    !
Program :1. exe
File:  dumpout .cpp
Line:  52
For information on how your program can cause an assertion
failure , see the Visual C    ++ documentation on asserts     .
(Press Retry to debug the application       )

实在令人奇怪

标签:, , , , , , , ,
0228 C C++ callback  memberfunc info - 六月 22, 2006 by yippee

0228 C C++ callback  memberfunc info

网上资料倒是不少:
c++的class有一个隐含的this, 所以的调用其实都是通过this进行的, 比如:
引用:
class Foo
&leftsign;
public:
void func() &leftsign;m_int = 0;&rightsign;
private:
int m_int;
&rightsign;
 

其实func()里面发生的是this->m_int = 0; 就是说class会自动添加这个this. 而thread里面的函数, 其实是按系统的call back方式调用的, 纯c的方式, 不会添加这个this, 这样在函数传递是堆栈里面就没有传递this, 所以这个函数指针就是无效的. 为了防止这种行为, c++的编译器都检测并禁止这种行为.

非成员函数没有this, static 成员函数不接收this, 所以是两种可以被接受的方式.

子线程函数可以是成员函数,要求就是成员函数是static的。之所以有这样的要求,是因为类的成员函数(除了static的),都默认有个this参数用来访问对象的内部成员函数和变量,虽然这个参数没有显示出来,但是编译器会自动添加。这样最后生成的 成员函数是不可能满足_beginthread或者CreateThread以及其他一些api函数(例如需要回调函数的API)的要求的,因为这些API的参数是不会接受一个有this指针参数的函数的。
static函数没有this指针参数,所以可以用来作为线程或者回调函数。但是static函数不能访问类的非static成员。要解决这个问题,一个简单的做法是把this指针作为参数在创建线程的时候传给线程函数,线程函数里面把这个指针cast成 类的指针,通过这个指针就可以访问类的成员了。

问题是 我又不能添加参数,这都是定义死了的~~~~~~~

不定义类成员函数为线程函数,而将线程函数定义为类的友元函数。这样,线程函数也可以有类成员函数同等的权限;

实际上也还是要传一个THIS指针

回调函数和成员函数
 
许多程序员都发现,利用MFC或者其它的C++应用编写回调函数是非常麻烦的,其根本原因是回调函数是基于C编程的Windows SDK的技术,不是针对C++的,程序员可以将一个C函数直接作为回调函数,但是如果试图直接使用C++的成员函数作为回调函数将发生错误,甚至编译就不能通过。通过查询资料发现,其错误是普通的C++成员函数都隐含了一个传递函数作为参数,亦即“this”指针,C++通过传递一个指向自身的指针给其成员函数从而实现程序函数可以访问C++的数据成员。这也可以理解为什么C++类的多个实例可以共享成员函数但是确有不同的数据成员。由于this指针的作用,使得将一个CALLBACK型的成员函数作为回调函数安装时就会因为隐含的this指针使得函数参数个数不匹配,从而导致回调函数安装失败。要解决这一问题的关键就是不让this指针起作用,通过采用以下两种典型技术可以解决在C++中使用回调函数所遇到的问题。这种方法具有通用性,适合于任何C++。   

1). 不使用成员函数,直接使用普通C函数,为了实现在C函数中可以访问类的成员变量,可以使用友元操作符(friend),在C++中将该C函数说明为类的友元即可。这种处理机制与普通的C编程中使用回调函数一样。   

2). 使用静态成员函数,静态成员函数不使用this指针作为隐含参数,这样就可以作为回调函数了。静态成员函数具有两大特点:其一,可以在没有类实例的情况下使用;其二,只能访问静态成员变量和静态成员函数,不能访问非静态成员变量和非静态成员函数。由于在C++中使用类成员函数作为回调函数的目的就是为了访问所有的成员变量和成员函数,如果作不到这一点将不具有实际意义。解决的办法也很简单,就是使用一个静态类指针作为类成员,通过在类创建时初始化该静态指针,如pThis=this,然后在回调函数中通过该静态指针就可以访问所有成员变量和成员函数了。这种处理办法适用于只有一个类实例的情况,因为多个类实例将共享静态类成员和静态成员函数,这就导致静态指针指向最后创建的类实例。为了避免这种情况,可以使用回调函数的一个参数来传递this指针,从而实现数据成员共享。这种方法稍稍麻烦,这里就不再赘述。

实现不需要辅助函数实现回调非静态类成员函数 
#define CLASS_MEMBER_FUNCTION_SUPPORT_CALLBACK( ThisPointerAddress ) \\
 __asm mov eax , (ThisPointerAddress)\\
 __asm mov [ebp-4] , eax

只是需要一个变通的方法,可以把对象指针传入该静态成员函数,一个方法是通过某个参数的形式,把this指针传入,通过该指针调用普通成员变量和函数,还有一个方法是在类里建立一个静态成员变量
class   CMyClass
&leftsign;
private:
    static   CMyClass*   m_pThis;

&rightsign;;

每次调用需要callback函数之前把该变量设为this(注意,比较危险,除非你可以肯定程序始终只有一个线程可以调用该callback函数),然后静态函数内部即可通过m_pThis访问普通成员变量和函数

利用一组宏定义实现类成员函数的回调
实现类成员函数的回调,已有方法有例如MFC的CCmdTarget类采用一组枚举来区分参数和返回值,然后用一组数组来存储对象和指针;以及使用模板来实现回调。本文讨论一种通过宏定义实现类成员函数的回调的方法。

实现它需要两个先决条件:
1.回调函数所属的类需要从已知的类继承,最好有相同的基类。例如CObject。
2.回调函数必须是public的类成员函数,不能是私有、保护或者静态的成员函数。

C++消息连接的一种系统方法
用过C++进行过面向对象程序设计的用户都知道,程序中的对象很少单独存在。不考虑对象间的相互作用几乎是不可能的。所以,标识对象间的关系或建立对象间的消息连接是面向对象程序设计的一项重要任务。本文着重从C++程序设计的角度,提出一种建立对象间消息连接的实用方法。如果你想详细了解面向对象程序设计技术,请参阅有关专著。大家都知道对象是数据和方法的封装体。在C++中,它们分别表现为数据成员和成员函数。程序设计者通过执行对象的各种方法,来改变对象的状态(即改变对象的属性数据)。从而使该对象发生某些“事件”。当一对象发生某事件时,它通常需向其它相关对象发送“消息”,请求它们作出一些处理。 这时,发生事件并向其它对象请求处理的对象被称为“事件对象”,而处理事件的对象被称为“回调对象”。回调对象对事件的处理称为“回调函数”。在C++中,这一过程相当于:当事件对象发生事件时,调用回调对象的某些成员函数。通常的作法是回调对象向事件对象传递对象指针。但这种方法不通用。为了减少程序设计的工作量,本文提出一种建立对象间消息连接的系统方法。它的思路是:将“事件发生→请求处理→执行处理”这一过程抽象成一个“回调”(CallBack)类。通过继承,用户可以轻松获取建立对象间消息连接的机制。

标签:, , , ,