User Tools

Site Tools


preventing_20a_20library_20from_20being_20run

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

preventing_20a_20library_20from_20being_20run [2018/03/31 13:19]
127.0.0.1 external edit
preventing_20a_20library_20from_20being_20run [2018/04/15 18:21] (current)
tbest3112 Added syntax highlighting
Line 2: Line 2:
  
 //by Jon Ripley, July 2006, January 2007//\\ \\  To prevent a library from being run add the following code to the start of the library after any initial comment block to generate a syntax error when a user tries to run your library:\\ \\  //by Jon Ripley, July 2006, January 2007//\\ \\  To prevent a library from being run add the following code to the start of the library after any initial comment block to generate a syntax error when a user tries to run your library:\\ \\ 
 +<code bb4w>
         ;         ;
 +</​code>​
 \\  To generate a more descriptive error instead add the following code to the start of your library:\\ \\  \\  To generate a more descriptive error instead add the following code to the start of your library:\\ \\ 
 +<code bb4w>
         SYS "​MessageBox",​ @hwnd%, "This is a library and cannot be run.", 0, 48         SYS "​MessageBox",​ @hwnd%, "This is a library and cannot be run.", 0, 48
         QUIT         QUIT
 +</​code>​
 \\  The message appears in a message box and the program will quit when it is dismissed. This necessarily adds 78 bytes to the library, even when added to a compiled program, but ensures that the library will not be executed and alerts users that the library is not an executable program. \\  The message appears in a message box and the program will quit when it is dismissed. This necessarily adds 78 bytes to the library, even when added to a compiled program, but ensures that the library will not be executed and alerts users that the library is not an executable program.
preventing_20a_20library_20from_20being_20run.txt ยท Last modified: 2018/04/15 18:21 by tbest3112