Thursday, 20 August 2015

How To Enable/Disable USB Port Using C Programming

Every Computer/Laptop contains  USB ports(commonly 4 ports) that are used to insert Pen Drives,Modems,External HDD,Mouse & Keyboard and so on.

But do u know that Ports can be Enabled or Disabled ???

Yes,it is.

Normally that ports are in Enable state.But if u Disable it then it acts like a broken ports like if u insert some Pen drive or modem e.t.c. then that devices can not read into your windows explorer


 Here is C Code to manipulating usb port (both Enable+Disable)  >>>>>

#include<stdio.h>
#include<conio.h>
#include<windows.h>


COORD coord = {0, 0};
COORD max_res,cursor_size;
void gotoxy (int x, int y)
{
        coord.X = x; coord.Y = y;
        SetConsoleCursorPosition(GetStdHandle(STD_OUTPUT_HANDLE), coord);
};

void main()
{

int choice;
gotoxy(35,4);
printf("Enter choice >>>>>>\n");
gotoxy(35,6);
printf("1.Enable USB Ports\n");
gotoxy(35,7);
printf("2.Disable USB Ports\n");
scanf("%d",&choice);

if(choice==1)
/*enable USB ports*/
system("reg add HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Services\\USBSTOR \/v Start \/t REG_DWORD \/d 3 \/f");
else if(choice==2)
/*disable USB ports*/
system("reg add HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Services\\USBSTOR \/v Start \/t REG_DWORD \/d 4 \/f");
else
printf("\ninvalid choice");

}

 Paste it into your compiler & then compile and run.

After Disable ,you should enable it again otherwise usb port not working.


Thnxx for reading this.
Plz like our facebook page to give us support.

Fell free to comment if u don't understand it's mechanism.

Monday, 17 August 2015

Basic Idea Of Programming Language

A programming language is nothing but a syntax or language to devolop or write application.

Most common languages are C,C++, JAVA,HTML etc.


Some others are -

    ASP,    ASSEMBLY

    BATCH,    BLUE,    B

    C,    C++,    C#,    CSS,    COBOL,    C SHELL

    D,    DIFF,    DATALOG

    EASE   , ELAN   , EXECUTABLE UML

    FORTRAN   , F   , F#,    FALCON

    GOOGLE APPS SCRIPTS, GENIE ,GAME MAKER LANGUAGE
    
    HTML   ,HIGH LEVEL ASSEMBLY

    IBM IMFORMIX 4GL   ,ICI    ,ICON

    JAVA,    JAVASCRIPT,    JSP,    JQUERY,    JSCRIPT.NET

    KRYPTRON,    KEE

    LUA,     LOGO,    LIVE SCRIPT,    LIVE CODE

    MACHINE CODE,    MAYA,    MS-INI FILE,    MS-DOS STYLE

    NORMAL TEXT,    NET.DATA,    NSIS

    OBJECTIVE C,    OBJECT PASCAL,    OPEN GL

   PASCAL,   PERL,    PHP,    PYTHON,    POWER SHELL,    PL/SQL

   QPL,    QT SCRIPT

   RUBY,   RPG,    RESOURCE FILE

   SHELL SCRIPT,    SQL,    SCRATCH

   T/SQL,   TURBO C,   TYPE SCRIPT

    UNIX SHELL,    UBER CODE,    UCSD PASCAL

    VBA,   VISUAL BASIC,    VB SCRIPT,    VISUAL BASIC.NET,    VHDL

   WINDOWS POWERSHELL,    WEB DNA

   XML,   XQUERY

   YAML,    YQL

   Z NOTATION,   ZENO



Just think how many language's name do you know before reading this post ???

NOTE - This only a few examples of language's name.



   

 
   
  

Sunday, 16 August 2015

First C Program For Those Who Don't Know Programming




 Enter this code to into your compiler -
   

                                                  #include<stdio.h>
                                        void main()
                                        {
printf("Hello Visitor.\n");
printf("Welcome to Code Counter");
}



Hit "Compile & Run" option in your compiler(We recommand Dev C++).
You can download it from Clicking Here

If you used dev c++ output will be like this -


If you find and error regarding this plz comment......
Best Of Luck.