DialogReprog.cpp
unsigned char PasswordValue[16];
unsigned char SystemKeyValue[16];
void CDialogReprog::OnOK()
{
// TODO: Add your control notification handler code here
char *ptr;
size_t count=0;
UpdateData();
TCHAR buffer[50];
GetDlgItemText(IDC_PASSWORD, buffer, 50);
ptr = (char *)buffer;
for(count = 2; count < 6; count++)
{
sscanf(ptr, "%2hhx",&PasswordValue[count-2]);
ptr += 2;
}
GetDlgItemText(IDC_SYSKEY, buffer, 50);
ptr = (char *)buffer;
for(count = 2; count < 18; count++)
{
sscanf(ptr, "%2hhx",&SystemKeyValue[count-2]);
ptr += 2;
}
UpdateData(FALSE);
CDialog::OnOK();
}
需要訪問C文件的PasswordValue字節數組來訪問數據,當我調試,我可以看到的數據是在監視窗口中可見(全局變量我爲我的項目使用Visual Studio 2005)如何訪問C++公共類函數在C文件修改
你是指C語言源文件還是C++語言源文件?我不清楚。 –
不完全確定問題是什麼。 – edtheprogrammerguy