How can I create a Bitmap from an Array of Bytes?

I tried using createBitmap but I couldn't make it work... Could anyone give me an example of how it is used?


VB Code:
  1. Private Declare Function CreateBitmap Lib "gdi32" (ByVal nWidth As Long, ByVal nHeight As Long, ByVal nPlanes As Long, ByVal nBitCount As Long, lpBits As Any) As Long