Saving Surfaces

Started by
0 comments, last by Rambo_Bill 24 years, 5 months ago
Is there an easy way to save a DirectDrawSurface7 in VB. I don't only mean the pixel data, but I also need to save all of DDSURFACEDESC2 type. I am thinking along the lines of a pointer in C++ where I would just increment it throught the Struct or in VB case a Type while writing it into a file.

Hopefully there is an easier way than hardcoding writing all the various vars into a file then locking the surface into an array and writing that..

Advertisement
You can write entire types to files, but not types that contain objects ;(. I found a way to get the memory address of a type by using agGetAddressForObject in a third party (www.desaware.com) .Dll (APIGID32.DLL also need the .bas file to use) that came with the book "Dan Applemans Visual Basic 5.0 Guide to the Win 32 API". However I still would somehow have to skip the objects contained in the type. Although I beleive it would be possible to write a routine to do this. I think by the time I did, I could have just hardcoded all the values and still have plenty time left over.

This topic is closed to new replies.

Advertisement