Shellhooks (again)

This is a discussion on Shellhooks (again) within the Windows Programming forums, part of the Platform Specific Boards category; Hi! So i have a Shellproc in a dll, which should just display a message when a shell event occurs. ...

  1. #1
    Android
    Join Date
    Mar 2004
    Location
    Kurunegala Colony, Sri Lanka, Sri Lanka
    Posts
    363

    Shellhooks (again)

    Hi!
    So i have a Shellproc in a dll, which should just display a message when a shell event occurs. And this is my main function which loads that dll:

    Code:
    int main(int argc, char* argv[])
    {
    	hinstDll = LoadLibrary((LPCTSTR)"DGDLL.dll");
    	if(hinstDll==NULL)
    		cout<<"FAILD TO LOAD THE DLL"<<endl;
    	hShellHookProc = (HOOKPROC)GetProcAddress(hinstDll,"ShellProc");
    	if(hShellHookProc != NULL){
    		SetWindowsHookEx(WH_SHELL, hShellHookProc, hinstDll, 0);
    	}else{
    		cout<<"FAILD TO CONNECT TO THE DLL FUNCTION"<<endl;
    	}
    
    	return 0;
    }
    so what else i have to do to get use of the Shellproc function. now the main function just returns immediately after execution.
    Last edited by geek@02; 07-07-2006 at 11:01 AM.
    Some useless programs i've wrote : slprogrammersheaven
    Youtube: http://www.youtube.com/user/geekyzine
    My amature IT Blog: http://everything-geeky.blogspot.com/
    My Flash games: http://flashweed.blogspot.com/

    (and, sorry for my amature english)

  2. #2
    carry on JaWiB's Avatar
    Join Date
    Feb 2003
    Location
    Seattle, WA
    Posts
    1,972
    You might find the following link useful: http://www.rommelsantor.com/dev.php?catg=tut

    Edit: and you can probably just make the program pause (using cin.get, for example)
    Last edited by JaWiB; 07-07-2006 at 11:37 AM.
    "Think not but that I know these things; or think
    I know them not: not therefore am I short
    Of knowing what I ought."
    -John Milton, Paradise Regained (1671)

    "Work hard and it might happen."
    -XSquared

  3. #3
    Android
    Join Date
    Mar 2004
    Location
    Kurunegala Colony, Sri Lanka, Sri Lanka
    Posts
    363
    ok thanks for that link. i'll go through the lesson and see what happens.
    Some useless programs i've wrote : slprogrammersheaven
    Youtube: http://www.youtube.com/user/geekyzine
    My amature IT Blog: http://everything-geeky.blogspot.com/
    My Flash games: http://flashweed.blogspot.com/

    (and, sorry for my amature english)

Popular pages Recent additions subscribe to a feed

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21