Skip to content

Commit

Permalink
1. 支持 VS2008+ 2. x64代码异常退出问题
Browse files Browse the repository at this point in the history
  • Loading branch information
HOOKDLL committed Sep 27, 2020
1 parent 7588fc4 commit cfd5b0c
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 6 deletions.
Binary file modified AheadLib.aps
Binary file not shown.
Binary file modified AheadLib.rc
Binary file not shown.
6 changes: 2 additions & 4 deletions AheadLibDlg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
#define new DEBUG_NEW
#endif


// 用于应用程序“关于”菜单项的 CAboutDlg 对话框

class CAboutDlg : public CDialog
Expand Down Expand Up @@ -52,7 +51,6 @@ END_MESSAGE_MAP()
// CAheadLibDlg 对话框



CAheadLibDlg::CAheadLibDlg(CWnd* pParent /*=nullptr*/)
: CDialog(IDD_AHEADLIB_DIALOG, pParent)
{
Expand Down Expand Up @@ -340,7 +338,7 @@ void CAheadLibDlg::OnBnClickedButtonMakefile()


if (m_isx64) {
source += _T("//EXTERN_C_START\nextern \"C\" \n{\r\n");
source += _T("extern \"C\" \n{\r\n");
}

for (auto exFunc : m_exportFunc)
Expand Down Expand Up @@ -369,7 +367,7 @@ void CAheadLibDlg::OnBnClickedButtonMakefile()
}

if (m_isx64) {
source += _T("}\n//EXTERN_C_END\r\n");
source += _T("}\r\n");
}

source += _T("\r\n");
Expand Down
4 changes: 2 additions & 2 deletions AheadSource.h
Original file line number Diff line number Diff line change
Expand Up @@ -82,10 +82,10 @@ BOOL WINAPI Load()
//
// 这里是否从系统目录或当前目录加载原始DLL
//
//GetModuleFileName(NULL,tzPath,MAX_PATH); // 获取本目录下的
//GetModuleFileName(NULL,tzPath,MAX_PATH); //获取本目录下的
//PathRemoveFileSpec(tzPath);

GetSystemDirectory(tzPath, MAX_PATH);//默认获取系统目录的
GetSystemDirectory(tzPath, MAX_PATH); //默认获取系统目录的

lstrcat(tzPath, TEXT("\\AHEADLIB_XXXXXX.dll"));

Expand Down
Binary file modified Release/AheadLib.exe
Binary file not shown.

0 comments on commit cfd5b0c

Please sign in to comment.