RE: SECURITY_ATTRIBUTES
- Posted by William Heimbigner <icxcnika at hotpop.com> Jul 07, 2004
- 511 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
Yah... but what pointer do i give it? The other thing... this program has (so far) NOT required win32lib, and for portability reasons, i'd like it to stay that way.... William Heimbigner icxcnika at hotpop.com UBoard Administrator http://uboard.proboards32.com