You could use the rand() function provide by either the GLIBC or Microsoft MSCRT that should be included automatically, within the stdlib.h header.
number = rand() % 256 //0..255, or 0x00..0xff
It will usually return something between 0, and the macro RAND_MAX so it must have a modulation to tie it down to a specific range. You can always put this logic in a function so that it can be called as myrand(0, 255);
If you require unique sequences per run of the application, you can create a seed for the linear congruential generator with the srand function:
srand(value); //i.e. value = time(NULL) from time.h/ctime.h
__uint8 number = rand() % 256;
Floating point numerics can be freely obtained if desired with this method (0.0 to 1.0 inclusive)
float number = (float) rand() / (float) RAND_MAX;
If a greater period and more uniform distribution is required (if you were creating test data for example) there are many available algorithms that can be implemented within your code, that do not require an external library (such as your wincrypt.h), however the amount of code you have provided is not that large, if you require such randomness.
i.e. a C++ library implementing the Mersenne twister (based on Mersenne primes):
Boost Random Number Library - Boost 1.38.0
boost::mt19937 rng; // produces randomness out of thin air
// see pseudo-random number generators
boost::uniform_int<> six(1,6) // distribution that maps to 1..6
// see random number distributions
boost::variate_generator<boost::mt19937&, boost::uniform_int<> >
die(rng, six); // glues randomness with mapping
int x = die(); // simulate rolling a die