DirectX SDK |
The DirectDraw7.CreateSurfaceFromResource method creates a DirectDrawSurface7 object for this DirectDraw object and attaches the specified resource to the DirectDrawSurface object.
object.CreateSurfaceFromResource( _ file As String, _ resName As String, _ ddsd As DDSURFACEDESC2) As DirectDrawSurface7
If the method succeeds, it returns a DirectDrawSurface7 object.
If the method fails, it raises an error, and Err.Number can be set to one of the following values:
If you supply an empty string as the module name and run the application in the Microsoft® Visual Basic® environment, the resource cannot be found. Passing an empty string succeeds only if you are using a stand-alone executable.
The resource name needs to be a string, rather than a number. Place quotes around the resource name to make it a string, or the method fails.