BTW I just realised, could it be because I'm passing entire surfaces to functions? The function which sets up surfaces needs a surface (as the DirectDrawSurface7 type) as input - if this function is being used by different modules, to pass blank surfaces and file/path information for the surface be created, could this be depleting a lot of resources? If this is the case, what should I do in the future, just avoid passing massive amounts of data to functions? Although would a surface (which has only been declared, not set up at all) be that big? Or would there be a lot of processing needed to pass the completed surface back out of the function...?