This depends on the scanner’s driver that you want to use. If the scanner has a standard Twain driver, you can use the basic Twain functions from Twain Working group, but this somewhat low-level. You can find more information here: http://www.twain.org/
If you don’t want to deal with the low-level interface, you can find some samples on the internet that use SDKs such as this project which uses leadtools.