G
Guest
I am having a little bit of trouble with the syntax using attributes in
classes.
The compiler always complaints (VC ++ 2002) on StrongNameIdentityPermission.
:-(
The intention is secure my class so that it can only be inherited and
instantiated by software that has the strong key of my company.
A webcast suggested something like this.
using namespace System::Security:ermissions;
....
[StrongNameIdentityPermission( SecurityAction.InheritanceDemand(
PublicKey="00240000048000....9")]
[StrongNameIdentityPermission( SecurityAction.LinkDemand(
PublicKey="00240000048000....9")]
public __gc class Dataset : public IDisposable {
....
}
But the error I get is this:
:\Source\Scratch\sLibv2_2\Managed\Projects\SkyscanLibBase\MDataset.h(21) :
error C3725:
'System::Security:ermissions::StrongNameIdentityPermissionAttribute':
cannot resolve attribute overload
could be
'System::Security:ermissions::StrongNameIdentityPermissionAttribute::Stron
gNameIdentityPermissionAttribute(System::Security:ermissions::SecurityActi
on)'
Note: The Public key is ofcourse reduced in size for this post.
Any idea how the syntax needs to be?
classes.
The compiler always complaints (VC ++ 2002) on StrongNameIdentityPermission.
:-(
The intention is secure my class so that it can only be inherited and
instantiated by software that has the strong key of my company.
A webcast suggested something like this.
using namespace System::Security:ermissions;
....
[StrongNameIdentityPermission( SecurityAction.InheritanceDemand(
PublicKey="00240000048000....9")]
[StrongNameIdentityPermission( SecurityAction.LinkDemand(
PublicKey="00240000048000....9")]
public __gc class Dataset : public IDisposable {
....
}
But the error I get is this:
:\Source\Scratch\sLibv2_2\Managed\Projects\SkyscanLibBase\MDataset.h(21) :
error C3725:
'System::Security:ermissions::StrongNameIdentityPermissionAttribute':
cannot resolve attribute overload
could be
'System::Security:ermissions::StrongNameIdentityPermissionAttribute::Stron
gNameIdentityPermissionAttribute(System::Security:ermissions::SecurityActi
on)'
Note: The Public key is ofcourse reduced in size for this post.
Any idea how the syntax needs to be?