Thread: Shellhooks (again)

  1. #1
    Android geek@02's Avatar
    Join Date
    Mar 2004
    Location
    Kurunegala Colony, Sri Lanka, Sri Lanka
    Posts
    470

    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.
    GameJolt: https://gamejolt.com/@KasunL
    Game Development Youtube:
    https://is.gd/XyhYoP
    Amateur IT Blog: http://everything-geeky.blogspot.com/



    (and, sorry for my amateur 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 geek@02's Avatar
    Join Date
    Mar 2004
    Location
    Kurunegala Colony, Sri Lanka, Sri Lanka
    Posts
    470
    ok thanks for that link. i'll go through the lesson and see what happens.
    GameJolt: https://gamejolt.com/@KasunL
    Game Development Youtube:
    https://is.gd/XyhYoP
    Amateur IT Blog: http://everything-geeky.blogspot.com/



    (and, sorry for my amateur English)

Popular pages Recent additions subscribe to a feed