 |
 |
This forum is for those of our Chinese audience who are not yet comfortable with the main forums. The purpose of the forum is to allow new Chinese members to get a feel for how the site works, be guided by others, and eventually graduate to the main programming and discussion forums.
This forum is experimental and I am looking for Chinese speaking moderators.
cheers,
Chris Maunder
The Code Project | Co-founder
Microsoft C++ MVP
modified on Monday, August 23, 2010 1:49 PM
|
|
|
|
 |
We're having issues with our CDN provider in that their network is blocked within China. I'm working around this but would like someone to provide feedback on the fixes I make to ensure we're fixing it properly.
cheers
Chris Maunder
|
|
|
|
 |
Codeproject is a great place to study and discuss things about coding and projects, but it is a little bit slow to access the website. Codeproject is great and I am willing to do something helpful.
E-mail:[email protected]
|
|
|
|
 |
yes, it's a little difficult for us to access this website, but I never stop trying ,this is a very good place for coders, if anything I can help, it will be my pleasure.
email: [email protected]
|
|
|
|
 |
Message Removed
modified 4-Aug-16 21:09pm.
|
|
|
|
 |
Please do not post again if your message does not appear immediately: all of these were intercepted by the automated spam prevention system and sent to moderation for a real human being (or me, if I'm looking) to examine and approve or reject for publication. And as a result, all of them needed to be allowed through to prevent you getting kicked as a spammer, and that means I have to manually clear up the spares afterwards.
And also: Never post your email address in any forum, unless you really like spam! If anyone replies to you, you will receive an email to let you know.
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
 |
could you still need help? I hope to help you,this website is very good,i usually get help from there,but i also usually cross the great wall to access in it E-mail:[email protected]
|
|
|
|
 |
Message Automatically Removed
|
|
|
|
 |
example of ternary operator with Boolean data type
|
|
|
|
|
 |
Message Automatically Removed
|
|
|
|
 |
can anyone help me to load the source code of the paper"Cross-based Local Multipoint Filtering" in the website https://sites.google.com/site/filteringtutorial/
I want the source code,not SDK.thankyou!!!
|
|
|
|
|
|
 |
很久以前就注册了这个网站,由于GOOGLE 被封,导致遗忘密码重新邮箱验证无法实现,只好重新注册一个账号。一个网页要20秒左右才能缓缓显现,大家的网速怎么样?
最近学习CMake,能做一个简单的静态库和动态库调用的程序,技术的路途还很遥远啊。
|
|
|
|
|
 |
我是新手,刚入门,不清楚这个行当的就业前景。希望大拿们能指点一二。感激不尽。
|
|
|
|
 |
Hello everyone, there is an article in Chinese discussing MS Detours API hooking library and Mhook library. I don't understand how to download the attachment and I can't understand the article. Could anyone who understands Chinese help me out here? Much appreciated in advance!! This is the link to the site:
Detours X64[^]
The blog has attachments that contain some source code. It would be really nice if someone could just download the files and post them somewhere. Thanks.
|
|
|
|
 |
I am a Chinese. I am regret that I see this message today. Long time had passed. I don't know whether it is needed if I translate that blog in English.
I am first know there is a technology as this. For advance myself, I decide to do the translation, although my English is poor , and as you know, many Chinese can't be translated in English exactly. So please tell me the mistake if you read this.
There is some white cloud floating on the blue sky. That's the landscape I like.
|
|
|
|
 |
There is no attachment in the site you post. The source code you needed is post as text. Below is the translation from me:
Author: flier, Area: MSDN
Title: Detours x64 [Draft]
From: ShuiMu BBS (Note: this is a well-known BBS in China. Its server is in TsingHua University.), inside.
Dependency is damn! I must solve this before I try to solve another problem.:s
I didn't want to explain what is Detours. The version of 2.1 Express issued by MSR doesn't support x64. Someone else inquired this by email, MSR say it will cost 10,000 dollars to acquire the support. Too expensive to think of it. -_-b
So I try to modify it, and it can run on x64 now. Because some bugs exist, I don't issue the full version. I will tell you the framework.
API hook is a common technology now. It just is consist of: Find the entry of function. Substitute some bytes in the head place with 'jmp' code. It will jump into a template. After the work completed, it will jump into the origin. Please refer the source code of Detours for detail. Now I will introduce the difference of x64.
At first, you must find the real entrance of origin function and hook function when you call DetourAttachEx. Maybe you should skip the table of IMPORT, and some indirection jump codes for debug. You can see this in the function detour_skip_jmp in detours.cpp.
Some modifications are needed in x64, because the length of instruction maybe is different with x86. Most code is copied from mhook, I added the check of embed:
inline PBYTE detour_skip_jmp(PBYTE pbCode, PVOID *ppGlobals)
{
if (pbCode == NULL) {
return NULL;
}
if (ppGlobals != NULL) {
*ppGlobals = NULL;
}
if (pbCode[0] == 0xff && pbCode[1] == 0x25) {
PBYTE pbTarget = *(PBYTE*)(pbCode + 6 + *(INT32 *)&pbCode[2]);
if (detour_is_imported(pbCode, pbTarget)) {
PBYTE pbNew = *(PBYTE *)pbTarget;
DETOUR_TRACE(("%p->%p: skipped over import table./n", pbCode, pbNew));
return pbNew;
}
return detour_skip_jmp(pbTarget, ppGlobals);
}
else if (pbCode[0] == 0xe9) {
PBYTE pbNew = pbCode + 5 + *(INT32 *)&pbCode[1];
return detour_skip_jmp(pbNew, ppGlobals);
}
else if (pbCode[0] == 0xeb) {
PBYTE pbNew = pbCode + 2 + *(CHAR *)&pbCode[1];
return detour_skip_jmp(pbNew, ppGlobals);
}
return pbCode;
}
After knowing the address of entrance, detours will call DetourCopyInstructionEx to copy the code of entrance. It will guess the instruction base on the bytes, and append the information into s_rceCopyTable. For x64, the entrance from 0x40 to 0x4f should be modified, because they are used as REX prefix in x64 instruction set. Please refer "AMD architecture programmer manual volume 3" for detail. More information can be found in chapter "1.2.7 REX Prefixes". They will be looked as single byte here.
#ifdef DETOURS_X64 // For Rex Prefix
{ 0x40, ENTRY_CopyBytesPrefix }, { 0x41, ENTRY_CopyBytesPrefix }, { 0x42, ENTRY_CopyBytesPrefix },
{ 0x43, ENTRY_CopyBytesPrefix }, { 0x44, ENTRY_CopyBytesPrefix }, { 0x45, ENTRY_CopyBytesPrefix }, { 0x46, ENTRY_CopyBytesPrefix }, { 0x47, ENTRY_CopyBytesPrefix }, { 0x48, ENTRY_CopyBytesPrefix }, { 0x49, ENTRY_CopyBytesPrefix }, { 0x4A, ENTRY_CopyBytesPrefix }, { 0x4B, ENTRY_CopyBytesPrefix }, { 0x4C, ENTRY_CopyBytesPrefix }, { 0x4D, ENTRY_CopyBytesPrefix }, { 0x4E, ENTRY_CopyBytesPrefix }, { 0x4F, ENTRY_CopyBytesPrefix }, #else
The code far indirect jmp/call from FF is different between x86 and x64.
PBYTE CDetourDis::CopyFF(REFCOPYENTRY pEntry, PBYTE pbDst, PBYTE pbSrc)
{
(void)pEntry;
if (0x15 == pbSrc[1] || 0x25 == pbSrc[1]) {
#ifdef DETOURS_X64
DWORD dwOffset = *((PDWORD)&pbSrc[2]);
*m_ppbTarget = (PBYTE)*((PDWORD_PTR)(pbSrc + 6 + dwOffset));
#else
PBYTE *ppbTarget = *(PBYTE**)&pbSrc[2];
*m_ppbTarget = *ppbTarget;
#endif
}
else if (0x10 == (0x38 & pbSrc[1]) || dR/M == 010
0x18 == (0x38 & pbSrc[1]) || dR/M == 011
0x20 == (0x38 & pbSrc[1]) || R/M == 100
0x28 == (0x38 & pbSrc[1]) R/M == 101
) {
*m_ppbTarget = (PBYTE)DETOUR_INSTRUCTION_TARGET_DYNAMIC;
}
const COPYENTRY ce = { 0xff, ENTRY_CopyBytes2Mod };
return (this->*ce.pfCopy)(&ce, pbDst, pbSrc);
}
After copy the original instructions into template, the code to jump to the original should be added. In x86, detours use function "detour_gen_jmp_immediate" to create instructions. In x64, this should be changed, because the pointer is 64-bits. If the target is in the range of 2G, 32-bits jmp instruction can work. If else, the address of target should be placed in RAM, then set the address of RAM as parameter of jmp. When detour_alloc_trampoline allocate memory for template, it will try to allocate memory besides 2G to avoid the long jump instruction. This can assure the goal function more than 5 bytes can work as before. But the address of template and hook function maybe out of 2G. So some thing must be done in this situation. As the same reason, I copied the source code of mhook as below:
inline PBYTE detour_gen_jmp(PBYTE pbCode, PBYTE pbJumpTo)
{
PBYTE pbJumpFrom = pbCode + 5;
SIZE_T cbDiff = pbJumpFrom > pbJumpTo ? pbJumpFrom - pbJumpTo : pbJumpTo -
pbJumpFrom;
if (cbDiff <= 0x7fff0000) {
*pbCode++ = 0xe9;
*((PDWORD)pbCode) = (DWORD)(DWORD_PTR)(pbJumpTo - pbJumpFrom);
pbCode += sizeof(DWORD);
} else {
*pbCode++ = 0xff;
*pbCode++ = 0x25;
*((PDWORD)pbCode) = (DWORD)0;
pbCode += sizeof(DWORD);
*((PDWORD_PTR)pbCode) = (DWORD_PTR)(pbJumpTo);
pbCode += sizeof(DWORD_PTR);
}
return pbCode;
}
Besides above, some exceptions must be handled. For example: When thread is suspended, if its RIP is the address of template or target function, same method as x86 can work in theory. But I can't test it in this situation.
#ifdef DETOURS_X64
#define DETOURS_EIP Rip
#define DETOURS_EIP_TYPE DWORD64
#endif // DETOURS_X64
There are more codes to handle some others, such as the handle of RIP in ModRm. These codes will be issued in future with the full code robustly.
There is some white cloud floating on the blue sky. That's the landscape I like.
|
|
|
|
 |
Thanks a lot for your help. You are right, translating from Chinese to English is very difficult for complicated and technical subjects such as this. But, at least, I could see what the guy is talking about now.
You are so lucky to be and to understand Chinese! A lot of good code and other stuff is published only in Chinese.
Thanks again.
|
|
|
|
 |
I can understand Chinese,but my English is not good.哈哈哈
|
|
|
|
 |
通过模拟点击按钮控制外部程序,外部程序中的excel不启动!
情况1:手动点击B.exe中的按钮excel可以被正常调用!--OK!
情况2:用A.exe用SendMessage函数发送消息模拟控制点击B.exe中的按钮excel调用失败,并弹出“无法启动Excel服务器!”!--NG!
可以肯定的一点是用SendMessage发送的消息绝对是成功发送的,弹出“无法启动Excel服务器!”!也说明消息是发送成功了,但就是excel调用不起来!
疑问:权限问题?还是需要别的什么该进? 跪求坛子里卧虎藏龙的大神大虾们,不知道你们能否搞定,或者有没见过此类问题!
|
|
|
|
|
|
|
|
 |
这不是中国区 这是新人学习使用论坛的地方 大牛都在e文版
|
|
|
|
 |
确实,CSDN自从2012密码泄露后就不怎么用了……
OSC社区活跃度实在是低,基本上都是官方人员在增加活跃度。
现在大牛主要混迹国际区比如HN、GitHub和StackOverflow,也有些内部区比如wooyun之类的,CodeProject单独弄个华人区并不是太利于技术交流啊 =。= 所以新人来这边的比较多
|
|
|
|
 |
刚注册,俺是在美国的,对编程属于半路出家,希望能跟诸位多学习
|
|
|
|
|
 |
我们中国的程序员把IT行情弄得不值钱了,尤其是威客网上,几块钱都做网站,越来越多的人不愿意分享好资源了
|
|
|
|
 |
各位高手请问如何写一个POP3的mail收发功能的例子啊?发邮件的我已经实现了,现在想着整收邮件的,网上都是一些第三方插件实现的方式,请问有没有不使用第三方插件的,只是用.net 自带方法实现的?
|
|
|
|
|
 |
... and eventually graduate to the main programming and discussion forums.
如题
|
|
|
|
 |
怎样将VMR9VideoStreamInfo数据转化为surface数据,最后转化为texture数据进行纹理输出
|
|
|
|
 |
C# why I use int hr=m_san.AllocateSurfaceHelper(ref lpAllocInfo, ref lpNumBuffers, buffer) not sucess? how define buffer ?
|
|
|
|
|
|
|
 |
今天竟然发现有印度和中国的,不过不如搞个国际化,但是人气不足啊。
|
|
|
|
 |
偏偏把中国和印度单设了论坛,why?
希望有一天中国的软件水平能超过印度。
|
|
|
|
|
 |
我能吐槽嗎?
印度轉手過來的一個項目,代碼一坨屎, 我們這邊的測試測了一堆問題出來。
難為我們這些開發了。
|
|
|
|
|
|
 |
右上角Member00000000鼠标放上去==》My Settings ==》修改密码。
|
|
|
|
 |
mysetting-password-change
|
|
|
|
 |
Ji oplz miamoto koap ji?
China officially the People's Republic of China, is a sovereign state located in East Asia. It is the world's most populous country, with a population of over 1.35
|
|
|
|
 |
You people still loving this[^]. Why?
thatrajaCode converters | Education Needed
No thanks, I am all stocked up. - Luc Pattyn
When you're wrestling a gorilla, you don't stop when you're tired, you stop when the gorilla is - Henry Minute
|
|
|
|
|