"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
hi all vc++ masters \
i use this code for cd rom open and close
but this gives
'OpenVolume' : local function definitions are illegal
'OpenVolume' : cannot convert parameter 1 from 'char ' to 'char'
This conversion requires a reinterpret_cast, a C-style cast or function-style cast
u should not place the HANDLE OpenVolume( TCHAR cDriveLetter ) definsion insde of "void CInoutDlg::OnButton3()" because this is another function, one function definition cant be place inside of another one.
//so put the code here
HANDLE OpenVolume( TCHAR cDriveLetter )
HANDLE hVolume = OpenVolume( 'D' ) ; //TCHAR Stands for a single charecter
DeviceIoControl( hVolume, IOCTL_STORAGE_EJECT_MEDIA, NULL, 0, NULL, 0, &bytesreturned, NULL );
Lets say that we have an application running, and then the user enters things into another window, lets say notepad. How can that application get what the user entered into notepad? In other words, how can an application record keystrokes being entered into other applications? Or if a user just types something when there's no application running?
For some reason, the words "global keystroke" just popped into my head. I think I've been working too much with global variables. I despise them.
Anyway, it would also help if there is some way to get the application name in which the user types. I'm going to use this for several purposes, one of which is to make a rather primitive keylogger.
you need to use Key hook for that. Find SetWindowsHookEx in MSDN. There u will how to set the global Keyboard hook. u need to have prior .dll knowledge for that. You wiil fing lots of project on keylogger which uses this hooks in Codeproject.