Download Print this page

STC micro STC8A8K64D4 Series Reference Manual page 872

Advertisement

STC8A8K64D4 Series Manual
// clean up
CloseHandle(pi.hThread);
CloseHandle(pi.hProcess);
return TRUE;
}
else
{
AfxMessageBox(_T("
return FALSE;
}
}
Advanced call
The process of creating and publishing project programs in third-party applications, including selecting serial ports
and starting ISP in third-party applications
All ISP download operations such as programming, ISP programming with vibration stopped, and closing the
release project program, do not require interface interaction in the release project program.
VC 代码
// A data structure that defines the parameters of the callback function
struct CALLBACK_PARAM
{
DWORD dwProcessId;
HWND hMainWnd;
};
// Callback function for enumerating windows to get the main window handle
BOOL CALLBACK EnumWindowCallBack(HWND hWnd, LPARAM lParam)
{
CALLBACK_PARAM *pcp = (CALLBACK_PARAM *)lParam;
DWORD id;
GetWindowThreadProcessId(hWnd, &id);
if ((pcp->dwProcessId == id) && (GetParent(hWnd) == NULL))
{
pcp->hMainWnd = hWnd;
return FALSE;
}
return TRUE;
}
BOOL IspProcess()
{
// define related variables
STARTUPINFO si;
PROCESS_INFORMATION pi;
CALLBACK_PARAM cp;
CString path;
// the IDs of some controls in the publishing project program
const UINT ID_PROGRAM
const UINT ID_STOP
const UINT ID_COMPORT
创建进程失败
!"));
= 1046;
= 1044;
= 1009;
// main process id
// main window handle
- 856 -

Advertisement

loading
Need help?

Need help?

Do you have a question about the micro STC8A8K64D4 Series and is the answer not in the manual?

This manual is also suitable for:

Micro stc8a8k64d4-64pinMicro stc8a8k64d4-48pin