Skip to main content

I am trying to manage a pipe and for some reasion the compiler refuses to recognise the type i use;

invoke pipeSec::AddAccessRule(new System.IO.Pipes.PipeAccessRule("Users", type System.IO.Pipes.PipeAccessRights.ReadWrite, type SysSec.AccessControl.AccessControlType.Allow))

it takes exception to "type System.IO.Pipes.PipeAccessRights.ReadWrite" even though it's ok with "System.IO.Pipes.PipeAccessRule"  and "SysSec.AccessControl.AccessControlType.Allow" where SysSec is mapped to SystemSecurity in the repository.

Any help is greatly appreciated.

Thanks

Micro Focus Visual COBOL Version 8


#COBOL
#managedcode

I am trying to manage a pipe and for some reasion the compiler refuses to recognise the type i use;

invoke pipeSec::AddAccessRule(new System.IO.Pipes.PipeAccessRule("Users", type System.IO.Pipes.PipeAccessRights.ReadWrite, type SysSec.AccessControl.AccessControlType.Allow))

it takes exception to "type System.IO.Pipes.PipeAccessRights.ReadWrite" even though it's ok with "System.IO.Pipes.PipeAccessRule"  and "SysSec.AccessControl.AccessControlType.Allow" where SysSec is mapped to SystemSecurity in the repository.

Any help is greatly appreciated.

Thanks

Micro Focus Visual COBOL Version 8


#COBOL
#managedcode

When you access members of a type, such the enums, you need to use :: (double colon).

Changing your code to the following should fix your issue:

invoke pipeSec::AddAccessRule(new System.IO.Pipes.PipeAccessRule("Users", type System.IO.Pipes.PipeAccessRights::ReadWrite, type SysSec.AccessControl.AccessControlType::Allow))


When you access members of a type, such the enums, you need to use :: (double colon).

Changing your code to the following should fix your issue:

invoke pipeSec::AddAccessRule(new System.IO.Pipes.PipeAccessRule("Users", type System.IO.Pipes.PipeAccessRights::ReadWrite, type SysSec.AccessControl.AccessControlType::Allow))

That worked perfectly.

Thank you very much, i really appreciate your help