RE: SECURITY_ATTRIBUTES
- Posted by Brian Broker <bkb at cnw.com> Jul 07, 2004
- 537 views
William Heimbigner wrote: > > > Hi guys! > I'm doing some dll interface and ive come upon a problem. > I need to pass a pointer to a structure, to a dll. How is this > accomplished? > typedef struct _SECURITY_ATTRIBUTES { // sa > DWORD nLength; > LPVOID lpSecurityDescriptor; > BOOL bInheritHandle; > } SECURITY_ATTRIBUTES; > > Thx > William Heimbigner > icxcnika at hotpop.com Well, if you are using Win32Lib then you could do something like this: -- define SECURITY_ATTRIBUTES structure constant SAnLength = w32allot( DWord ), SAlpSecurityDescriptor = w32allot( Ptr ), SAbInheritHandle = w32allot( UInt ), SIZEOF_SECURITY_ATTRIBUTES = w32alloted_size() Then use other memory management functions to store and peek values to the structure. (w32acquire_mem, w32store, w32fetch, w32release_mem, etc.). -- Brian