如题

解决方案 »

  1.   

    HANDLE hCurrentProcess=GetCurrentProcess();
      

  2.   

    AfxGetInstanceHandle  
    HINSTANCE AfxGetInstanceHandle( );Return ValueAn HINSTANCE to the current instance of the application. If called from within a DLL linked with the USRDLL version of MFC, an HINSTANCE to the DLL is returned.
      

  3.   

    在此我想问一下,HINSTANCE是应用程序实例句柄,HANDLE是进程实例句柄,两者是一样的吗?
      

  4.   

    同意DentistryDoctor,HINSTANCE是Module句柄,是和执行文件相关的。两者不一样的
      

  5.   

    通常情况下GetCurrentProcess返回的是一个伪句柄,要获取真实的句柄,必须用GetCurrentProcessId找到pid,然后以此OpenProcess方能获得真正的句柄.
      

  6.   

    好象在Windows95以前用的是HInstance,后来为了兼容就留下来了,好象在以后没有很大的区别!