Click to See Complete Forum and Search --> : TYPE memory allocation


coolbiz
August 16th, 2001, 09:34 AM
Gurus,

I'm trying to use an API function called DocumentProperties() to modify the printer settings. 2 of the parameters are structure of DEVMODE. The problem is, for VB this structure is pretty much a fixed size (124 bytes) but the API says, the size can changed.

So how do I allocate enough buffer size of type DEVMODE? In C, LPDEVMODE hDevMode = (LPDEVMODE)malloc(nSize) will do. In VB?

-Cool Bizs