问题描述
int CApp20Dlg :: Read_LB(int lb_id,CStringArray * pOutput)
{
CListBox * pLB =(CListBox *)Get_Control(lb_id);
int i,count = pLB-> GetCount();
静态字符项[LB_READBUFFER_SIZE];
无符号长pid;
HANDLE进程;
-> RemoveAll();
GetWindowThreadProcessId(pLB-> m_hWnd,& pid);
进程= OpenProcess(PROCESS_VM_OPERATION | PROCESS_VM_READ | PROCESS_VM_WRITE | PROCESS_QUERY_INFORMATION) br/> for(i = 0; i< count; i ++){
pr_item = pLB-> GetItemDataPtr(i); /> pOutput-> Add((CString)item);
}
CloseHandle(process);
返回计数;
}
我要将此代码更改为vb2008,但不知道如何执行
int CApp20Dlg::Read_LB(int lb_id, CStringArray* pOutput)
{
CListBox* pLB = (CListBox*) Get_Control(lb_id);
int i, count = pLB->GetCount();
static char item[LB_READBUFFER_SIZE];
unsigned long pid;
HANDLE process;
LPVOID pr_item;
pOutput->RemoveAll();
GetWindowThreadProcessId(pLB->m_hWnd, &pid);
process=OpenProcess(PROCESS_VM_OPERATION|PROCESS_VM_READ|PROCESS_VM_WRITE|PROCESS_QUERY_INFORMATION, FALSE, pid);
for(i=0; i<count; i++) {
pr_item = pLB->GetItemDataPtr(i);
ReadProcessMemory(process, pr_item, item, LB_READBUFFER_SIZE, NULL);
pOutput->Add((CString) item);
}
CloseHandle(process);
return count;
}
i want to change this code over to vb2008 but dont know how to do it
推荐答案
这篇关于我怎样才能将此C ++ .net更改为vb.net或vb2008的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!