阅读:2002回复:1
在毕业设计中无意发现指向函数的指针的内容(*pfOpenVxDHandle)与指针的值pfOpenVxDHandle相同。Why?
Question:
在毕业设计中无意发现指向函数的指针的内容(*pfOpenVxDHandle)与指针的值pfOpenVxDHandle相同。Why? //// static HANDLE(WINAPI * pfOpenVxDHandle)(HANDLE)=0; . . . pfOpenVxDHandle=(HANDLE(WINAPI*)(HANDLE))GetProcAddress(hKernel32Dll,"OpenVxDHandle"); cout<<"pfOpenVxDHandle is "<<pfOpenVxDHandle<<endl; if(!pfOpenVxDHandle) { cout<<"Can't get addr of OpenVxDHandle"<<endl; exit(1); } if(pfOpenVxDHandle && hKernel32Dll) hEventRing0=(*pfOpenVxDHandle)(hEventRing3); //将Ring3级事件句柄转换为Ring0级事件句柄 printf("pfOpenVxDHandle is %u\n",pfOpenVxDHandle); printf("(*pfOpenVxDHandle) is %u \n",(*pfOpenVxDHandle)); . . . //// screen show : ------------------------------ hKernel32Dll is 0xBFF70000 pfOpenVxDHandle is 3220807919 (*pfOpenVxDHandle) is 3220807919 hEventRing0 is 0xC164C290 The child Thread runing . . . -------------------------- |
|
最新喜欢:yangng
|
沙发#
发布于:2001-05-09 21:24
pfOpenVxDHandle有效么?
|
|
|