RE: SECURITY_ATTRIBUTES

new topic     » goto parent     » topic index » view thread      » older message » newer message

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

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu