vendredi 31 mai 2013

Eject the drive with this little application

This Application is oriented for people who didn't know the solution of their problem ..
the problem is when the button of the Drive is disabled . In this respect you can use
this program for your purpose. You can open and close the Drive Door without any problems ...

Download link : click here


Photo : This Application is oriented for people who didn't know the solution of their problem ..
the problem is when the button of the Drive is disabled.. In this respect you can use
this program for your purpose. You can open and close the Drive Door without any problems ...

Download link : http://depositfiles.com/files/1ntg0pfmd


- The Hidden Ghost -







 - By Hamza Qdider -


The entire source code :

  Eject.C




#include <windows.h>
#include "Eject.h"

BOOL OPEN = 0;

LRESULT CALLBACK Eject( HWND h, UINT msg, WPARAM wp, LPARAM lp )
{
        
        if( msg == WM_COMMAND )
        {
            if( LOWORD( wp ) == EJECT_BUT )
            {
                if( OPEN == 1 )
                {
                   mciSendString( "set cdaudio door closed" ,0,0,0 );
                   SetWindowText( ( HWND ) lp,"Eject" );
                   OPEN = 0;
                } 
                else {
                OPEN = 1;
                mciSendString( "set cdaudio door open" ,0,0,0 );
                SetWindowText( ( HWND ) lp,"Close Door" );
               }
            }
            else if( LOWORD( wp ) == ABOUT )
            {
                 MessageBoxA( h,
                              "This application is programmed by The Hidden Ghost\n\n\t All Rights Reserved. 2013",
                              "About the application !!!",
                              MB_OK | MB_ICONINFORMATION
                             );
            }
        }
        else if( msg == WM_CLOSE )
        {
             ExitProcess( 0 );
             return 0;
        }
 return 0;
}

INT WINAPI WinMain( HINSTANCE hInst, HINSTANCE hPrevInst, LPSTR lpCmdLine,int nCmdShow )
{
    DialogBoxParam( hInst,( int ) MAKEINTRESOURCE( EJECT ),0,Eject,0 );
    return 0;
}

Eject.h && Eject.rc:




// Eject.h
 
#define EJECT     0001
#define EJECT_BUT 0002
#define ABOUT     0003
 
// Eject.rc
 
#include <windows.h>
#include "Eject.h"

EJECT  DIALOG 0,0,110,70
 
STYLE WS_CAPTION | DS_CENTER | WS_SYSMENU | WS_POPUP
 
EXSTYLE WS_EX_TOOLWINDOW
 
CAPTION "   Eject Drive By The Hidden Ghost - Hamza Qdider -"
{
        DEFPUSHBUTTON "Eject",EJECT_BUT,25,16,60,18,WS_CAPTION
 
        PUSHBUTTON "About...",ABOUT,25,36,60,18,WS_CAPTION
} 
 
Résuméabuiyad

Genius Game By Hamza Qdider

Here, a little game that I named "Genius Game", you can see its picture after the post

the main aim or the purpose is to show how the game can detect your symbol that you are save it in your mind...

You should follow the instructions of the game and you'll see ...

I hope you like my Genius Game ...

Download Link : click here

Good Luck ...

- The Hidden Ghost -
Photo : Here, a little game that I named "Genuis Game", you can see its picture after the post :)

the main aim or the purpose is to show how the game can detect your symbol that you are save it in your mind...

You should follow the instructions of the game and you'll see ...

I hope you like my Genuis Game ...

Download Link : http://depositfiles.com/files/73nkrh9v5

I'm waiting your reply :) ... Good Luck ...

- The Hidden Ghost -
Résuméabuiyad

samedi 25 mai 2013

<> My Memory Game <> Lighting Keyboard's Locks ...

Hello everybody !
 
In this post, I will present my little game that I named "Memory Game". To illustrate the technique used in the game I will show the following steps :
- In fact, I use the keyboard's Locks because I want to make an exam for my memory if is it OK or not. Well, it's just a little introduction for fun purpose that's all...
  The following steps are :
- Using the keybd_event function in order to make Num Lock or Caps Lock or Scroll Lock lighted.
- Creating a function named "ReturnState". It's used for returning if the Keyboard's Locks are On or Off.
- A counter to counts the number of times when a keyboard's Lock is lighted.

- The rule of playing the game is presented as follow:
+ Run the Game and wait your chance, Look at the following picture :


Posted Image
 
+ Take a look at the choosen Keyboard's Lock which is Caps Lock and counting the numbers of times when Caps Lock is lighted.
 
+ When your death is arrived I mean when your time is over hhhh, this message will printed on screen :




Posted Image
 
+ If your answer is Correct, you will get "Congratulations !!!". Otherwise you will get this :
Posted Image

- The Complete Source Code :

// Memory Game By Hamza Qdider
// All Rights Reserved...
// By The Hidden Ghost

#include <windows.h>
#include <stdlib.h>
#include <stdio.h>
#include <time.h>

int ReturnState( char *which_key )
{
     if( strcmp( which_key,"Num Lock" ) == 0 ) 
     
         return GetKeyState( VK_NUMLOCK ) & 1 == 1 ? 1 : 0;
     
     else if( strcmp( which_key,"Caps Lock" ) == 0 ) 
     
         return GetKeyState( VK_CAPITAL ) & 1 == 1 ? 1 : 0; 
     
     else if( strcmp( which_key,"Scroll Lock" ) == 0 ) 
     
         return GetKeyState( VK_SCROLL ) & 1 == 1 ? 1 : 0;
     
     return -1;
}

void PauseScreen( void )
{
     ReadConsole(
                 GetStdHandle( STD_INPUT_HANDLE ),
                 NULL,
                 NULL,
                 NULL,
                 NULL
                ); 
}

int main( )
{
    SYSTEMTIME systime;
    int nRand,nTimes = 0,nElement,nSec,sysSec;
    int Answer;
    char *szLock[ 3 ] = { "Num Lock","Caps Lock","Scroll Lock" };
    
    srand( time( NULL ) );
    
    nElement = rand( ) % ( 0,3 );
    
    GetSystemTime( &systime );
    
    sysSec = systime.wSecond;
    
    nSec = sysSec + ( rand( ) % ( 1,60 ) );
    
    nSec >= 59 ? nSec = 59 : nSec;
    
    printf( "sysSec = %d ; nSec = %d { you have %d seconds }\n",sysSec,
            nSec,nSec - sysSec 
           );
    printf( "Looking at {%s}. Are you Ready ?\n",szLock[ nElement ] );
    getchar( );
     
    while( sysSec != nSec ) 
    {
           sysSec++;
           
           printf( "\rsysSec = %d",sysSec );
           
           nRand =  rand( ) % ( 100,1000 );
           
           Sleep( nRand );
           
           keybd_event( VK_CAPITAL,( char )VK_CAPITAL,0,0 );
           keybd_event( VK_CAPITAL,( char )VK_CAPITAL,KEYEVENTF_KEYUP,0 );
    
           Sleep( nRand );
    
           keybd_event( VK_NUMLOCK,( char )VK_NUMLOCK,0,0 );
           keybd_event( VK_NUMLOCK,( char )VK_NUMLOCK,KEYEVENTF_KEYUP,0 );
    
           Sleep( nRand );
    
           keybd_event( VK_SCROLL,( char )VK_SCROLL,0,0 );
           keybd_event( VK_SCROLL,( char )VK_SCROLL,KEYEVENTF_KEYUP,0 );
           
           if( ReturnState( szLock[ nElement ] ) )
           {
               nTimes++;
           } 
     }
     
     if( !ReturnState( "Num Lock" ) )
     {
         keybd_event( VK_NUMLOCK,( char )VK_NUMLOCK,0,0 );
         keybd_event( VK_NUMLOCK,( char )VK_NUMLOCK,KEYEVENTF_KEYUP,0 );
     }
     
     system( "cls" );
     
     printf( "How many times this key {%s} is lighted ? => ",szLock[ nElement ] );
     scanf( "%d",&Answer );
         
     printf( 
             Answer == nTimes ?  
            "\n\n\tCongratulations !!!" :  
       "\n\n\t The Correct Answer is : %d times. Good Luck Next Time :)",nTimes 
           );
 
 if( ReturnState( "Caps Lock" ) ) 
     {
         keybd_event( VK_CAPITAL,( char )VK_CAPITAL,0,0 );
         keybd_event( VK_CAPITAL,( char )VK_CAPITAL,KEYEVENTF_KEYUP,0 );
     }
     if( ReturnState( "Scroll Lock") )
     {
         keybd_event( VK_SCROLL,( char )VK_SCROLL,0,0 );
         keybd_event( VK_SCROLL,( char )VK_SCROLL,KEYEVENTF_KEYUP,0 );
     }
     
    PauseScreen( ); 
}
 
Download The Game from this link : click here
Résuméabuiyad