HOOK成功,但有点有关问题不对,求思路

HOOK成功,但有点问题不对,求思路?
小弟用C++写了个DLL,用于HOOK GetOpenFileName,

BOOL WINAPI MyOpenFileName(LPOPENFILENAME lpofn)
{
MessageBox(0,"MyOpenFileName",0,0);  
return TRUE;
}
bool WINAPI HooKOpenFileDialog()
{
*(DWORD*)(NewBytes + 1) = (DWORD)MyOpenFileName;  

///创建一个openfiledialog
ZeroMemory( &ofn , sizeof( ofn));
ofn.lStructSize = sizeof ( ofn );
ofn.hwndOwner = NULL  ;
ofn.lpstrFile = szFile ;
ofn.lpstrFile[0] = '\0';
ofn.nMaxFile = sizeof( szFile );
ofn.lpstrFilter = "All\0*.*\0Text\0*.TXT\0";
ofn.nFilterIndex =1;
ofn.lpstrFileTitle = NULL ;
ofn.nMaxFileTitle = 0 ;
ofn.lpstrInitialDir=NULL ;
ofn.Flags = OFN_PATHMUSTEXIST|OFN_FILEMUSTEXIST ;
GetOpenFileName( &ofn );  

//hook 修改函数入口地址
WriteProcessMemory(INVALID_HANDLE_VALUE,(FARPROC)GetOpenFileName,NewBytes,8,NULL);  
WriteProcessMemory(INVALID_HANDLE_VALUE,(FARPROC)GetOpenFileName,NewBytes,8,NULL);  
WriteProcessMemory(INVALID_HANDLE_VALUE,(FARPROC)GetOpenFileName,NewBytes,8,NULL);  
return true;
}

接着在C#写的 winform中导入使用:

[DllImport("HookGetOpenfileDialog.dll")]
public static extern bool HooKOpenFileDialog();
 private void button4_Click(object sender, EventArgs e)
        {
            MessageBox.Show( Cls.API.HooKOpenFileDialog().ToString());
        }
 private void button3_Click(object sender, EventArgs e)
        {
            new OpenFileDialog().ShowDialog();  
        }


当我第一次点击button4,会弹出窗口,第二次点击button4就执行了“MessageBox(0,"MyOpenFileName",0,0);  ”,证明HOOK是成功的。
可是点button3还是会弹出openfiledialog窗口?难道c#中openfiledialog不是调用GetOpenFileName?那怎么办,求思路 。谢谢



------解决思路----------------------
学会使用WinDbg
------解决思路----------------------
[Starting with Windows Vista, the Open and Save As common dialog boxes have been superseded by the Common Item Dialog. We recommended that you use the Common Item Dialog API instead of these dialog boxes from the Common Dialog Box Library.]

我看连c++的都可能hook不成功