首页
论坛
专栏
课程

[原创]let's make VC2008 Express to be even better

2009-12-15 11:30 4515

[原创]let's make VC2008 Express to be even better

2009-12-15 11:30
4515
VC2008 professional is powerful of course,but as a driver developer,I just need a sample IDE like VC6.It's powerful enough for most task,however,we need a new toolkit sometimes.VC2008 express is just a good toolkit,it's simple,and free of charge!I need some feature but express edition doesn't have.
1.no multi-platform support.
2.no reseditor.

I got something useful after debugging,and solved the two problems above.
1.VS use exported functions named VSDllRegisterServer/VSDllUnregisterServer to (un)register dll,like a extended DllRegisterServer/DllUnregisterServer
the prototype is:
typedef HRESULT (WINAPI *pVSRegisterProc)(LPCWSTR pszRegRoot);// VSDllRegisterServer/VSDllUnregisterServer have the same prototype

2.different root reg key between express edition and normal edition
express : SOFTWARE\Microsoft\VCExpress
normal : SOFTWARE\Microsoft\VisualStudio

finally,we can do like this if we want to register a dll for a special VC edition(for example,VC2008 express)
load the dll,get the function address,and call with parameter L"SOFTWARE\Microsoft\VCExpress\9.0" (it's a UNICODE string,take care!)

HRESULT hr=E_FAIL;
HINSTANCE hDll=LoadLibrary(_T("somedll.dll"));
if (hDll)
{
typedef HRESULT (WINAPI *pVSRegisterProc)(LPCWSTR pszRegRoot);
pVSRegisterProc pFunc=NULL;
pFunc=GetProcAddress(hDll,"VSDllRegisterServer");// VSDllUnregisterServer ,if unregister
if (pFunc)
{
  hr=pFunc(L"the\\root\\reg\\key");//eg,L"SOFTWARE\Microsoft\VCExpress\9.0"
}
}
you may compile a tool ,and you need it later.now we named the tool regvsdll.

solution:
1.install vc2008 express
2.install PSDK7600,(or just vc_stdx86 in the PSDK 7600 DVD)
3.enter dir vcpackages,rename AMD64.VCPlatform.config to AMD64.VCPlatform.Express.config
rename Itanium.VCPlatform.config to Itanium.VCPlatform.Express.config
run regvsdll to register VCProjectIA64Platform.dll,VCProjectAMD64Platform.dll,Note,the root key is L"SOFTWARE\Microsoft\VCExpress\9.0"
4.you have to get following files if you need to enable resditor.you can found these file from a normal VS install dir or just from a trial version dvd.
resedit.dll
1033\reseditui.dll
rcxdti.dll
1033\rcxdtiui.dll
autolayt.dll
1033\autolaytui.dll

run regvsdll to register resedit.dll,there is no need to register any other dlls(they are not COM dll)

5. now,start your vc 2008 express,you can create AMD64/IA64 platform configurations,and you can edit *.rc comfortably.

enjoy these hack~!Don't forget email me interesting things you found.my address: ywjheart.at.gmail.com.

You may contact me by email to get the source code of regvsdll or other help if need.

补充:文章是写在我博客的,为了方便使用各种语言的人看,就用英语写了.
日志地址:http://ywjheart.spaces.live.com/blog/cns!2067FCA683114503!930.entry
为了方便对英语感冒的朋友,简单说一下:
1.安装vcexpress2008sp1,建议安装在默认路径
2.安装PSDK7600(WDK for windows 7)
3.根据文章说明修改,或使用附件(如果不在默认路径请修改压缩包内的批处理),解压运行 _install.bat 就可以了.
4.现在你应该可以使用资源编辑器和AMD64/IA64的编译平台了.

[推荐]看雪企服平台,提供安全分析、定制项目开发、APP等级保护、渗透测试等安全服务!

上传的附件:
上一主题 下一主题
最新回复 (2)
注定飞翔 2009-12-17 21:03
2
0
呵呵。 还是用没限制的版本吧。除非公司才用到这个。
XiaosanAiq 2009-12-22 09:56
3
0
diyer!!
游客
登录 | 注册 方可回帖
返回