Click here to Skip to main content
15,921,179 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Regarding remote execution Pin
Rajesh R Subramanian3-Jun-08 1:01
professionalRajesh R Subramanian3-Jun-08 1:01 
GeneralRe: Regarding remote execution Pin
H4u323-Jun-08 2:18
H4u323-Jun-08 2:18 
GeneralRe: Regarding remote execution Pin
Rajesh R Subramanian3-Jun-08 3:30
professionalRajesh R Subramanian3-Jun-08 3:30 
Questionhow to get process start time in vc? Pin
ftbk2-Jun-08 18:09
ftbk2-Jun-08 18:09 
AnswerRe: how to get process start time in vc? Pin
_AnsHUMAN_ 2-Jun-08 18:34
_AnsHUMAN_ 2-Jun-08 18:34 
AnswerRe: how to get process start time in vc? Pin
Paresh Chitte2-Jun-08 18:40
Paresh Chitte2-Jun-08 18:40 
AnswerRe: how to get process start time in vc? Pin
Hamid_RT3-Jun-08 1:32
Hamid_RT3-Jun-08 1:32 
QuestionPlease help me to solve a problem about global mouse hook Pin
capint2-Jun-08 18:01
capint2-Jun-08 18:01 
I created a dll file like this :

HHOOK MyHook;
HINSTANCE MyInstance;
LRESULT CALLBACK MyMouseHookProc(int nCode, WPARAM wParam, LPARAM lParam);
extern "C" __declspec(dllexport) void Hook();
extern "C" __declspec(dllexport) void Unhook();

//I initialized MyInstance
BOOL CMouseHook1App::InitInstance()
{
CWinApp::InitInstance();
MyHook = NULL;
MyInstance = this->m_hInstance;
return TRUE;
}

void Hook()
{
if(MyHook == NULL && MyInstance != NULL )
{
MyHook = SetWindowsHookEx(WH_MOUSE,MyMouseHookProc,MyInstance, 0);
if(MyHook!= NULL)
MessageBox(NULL,_T(" HOOKED "), _T(""),0);
}
else
MessageBox(NULL,L" Not Hooked", L"",0);

}

LRESULT CALLBACK MyMouseHookProc(int nCode, WPARAM wParam, LPARAM lParam)
{
if(nCode <0)
{
CallNextHookEx(MyHook,nCode,wParam,lParam);
return 0;
}

if(wParam == WM_LBUTTONDOWN || wParam == WM_NCLBUTTONDOWN)
{
MessageBox(NULL,_T("OK"),_T("Test"),MB_OK);
PostMessage(hWndApp,WM_LBUTTONDOWN,0,0);
}

return CallNextHookEx(MyHook,nCode,wParam,lParam);

}


But in my app, when I use the function Hook(), it doesn't work at all. Did I do anything wrong? Someone plz help me
AnswerRe: Please help me to solve a problem about global mouse hook Pin
«_Superman_»3-Jun-08 16:46
professional«_Superman_»3-Jun-08 16:46 
QuestionCString to unsigned char Pin
rp_suman2-Jun-08 17:12
rp_suman2-Jun-08 17:12 
AnswerRe: CString to unsigned char Pin
David Crow2-Jun-08 17:45
David Crow2-Jun-08 17:45 
AnswerRe: CString to unsigned char [modified] Pin
Nibu babu thomas2-Jun-08 17:49
Nibu babu thomas2-Jun-08 17:49 
GeneralRe: CString to unsigned char Pin
rp_suman2-Jun-08 18:22
rp_suman2-Jun-08 18:22 
GeneralRe: CString to unsigned char Pin
Nibu babu thomas2-Jun-08 18:57
Nibu babu thomas2-Jun-08 18:57 
GeneralRe: CString to unsigned char Pin
rp_suman2-Jun-08 18:45
rp_suman2-Jun-08 18:45 
QuestionNo of v-tables??? Pin
Super Hornet2-Jun-08 16:44
Super Hornet2-Jun-08 16:44 
AnswerRe: No of v-tables??? Pin
Paresh Chitte2-Jun-08 18:33
Paresh Chitte2-Jun-08 18:33 
AnswerRe: No of v-tables??? Pin
_AnsHUMAN_ 2-Jun-08 18:37
_AnsHUMAN_ 2-Jun-08 18:37 
QuestionHow to compare stderr to stdout Pin
DQNOK2-Jun-08 10:26
professionalDQNOK2-Jun-08 10:26 
QuestionRe: How to compare stderr to stdout Pin
David Crow2-Jun-08 11:01
David Crow2-Jun-08 11:01 
AnswerRe: How to compare stderr to stdout Pin
DQNOK2-Jun-08 11:11
professionalDQNOK2-Jun-08 11:11 
AnswerRe: How to compare stderr to stdout Pin
Nibu babu thomas2-Jun-08 17:11
Nibu babu thomas2-Jun-08 17:11 
GeneralRe: How to compare stderr to stdout Pin
DQNOK3-Jun-08 3:22
professionalDQNOK3-Jun-08 3:22 
GeneralRe: How to compare stderr to stdout Pin
DQNOK3-Jun-08 8:43
professionalDQNOK3-Jun-08 8:43 
AnswerRe: How to compare stderr to stdout Pin
maxie20052-Jun-08 19:12
maxie20052-Jun-08 19:12 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.