Sign in to follow this  

Prevent importing of functions and use of shared classes

This topic is 1106 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Imported functions only work if the application explicitly binds them, with BindAllImportedFunctions (or manually with BindImportedFunction). 

 

If you want to give an explicit error if the script declares imported functions, then you can call GetImportedFunctionCount after compiling the module.

 

 

Shared classes doesn't share the data itself, only the code. It is used to allow the application to pass objects between modules and allow them to understand each other. But if the application do not pass the objects between modules then the modules cannot access another module's data even if it declares shared classes.

 

Here too, if you want to give an explicit error if the script declares shared classes, then you can enumerate the class declarations after compiling the module and check if any of them are shared by getting the object type flags and check the asOBJ_SHARED bit.

Share this post


Link to post
Share on other sites

This topic is 1106 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this