Jump to content

Checking if it is stanalone or isapi (design time)


SergioFeitoza

Recommended Posts

Hello SergioFeitoza.
 

As mentioned in this link https://stackoverflow.com/questions/13112257/how-can-i-tell-at-compile-time-whether-the-project-is-a-program-or-a-library, probably there is no way to do some compilation time check. What I know is that a ISAPI project is a Library, and a standalone is a program. So, if I need to do that, I would define some  mark, as example, ISAPI, to the ISAPI project and PROGRAM to standalone. Then, in my code I would do something like

 

{$IF Defined(ISAPI)}

//...

{$ELSEIF Defined(PROGRAM)} //Or just $ELSE, as there is just two options.
//...
{$ENDIF}

 

Edit: If your project's source code first line is LIBRARY, then, it is an ISAPI project.

Link to comment
Share on other sites

6 minutes ago, Daniel Prado said:

Hello SergioFeitoza.
 

As mentioned in this link https://stackoverflow.com/questions/13112257/how-can-i-tell-at-compile-time-whether-the-project-is-a-program-or-a-library, probably there is no way to do some compilation time check. What I know is that a ISAPI project is a Library, and a standalone is a program. So, if I need to do that, I would define some  mark, as example, ISAPI, to the ISAPI project and PROGRAM to standalone. Then, in my code I would do something like

 

{$IF Defined(ISAPI)}

//...

{$ELSEIF Defined(PROGRAM)} //Or just $ELSE, as there is just two options.
//...
{$ENDIF}

 

Edit: If your project's source code first line is LIBRARY, then, it is an ISAPI project.

Dear Daniel.  Thank you very much for your answer However, it is a little bit more difficult than I am looking for.

 I saw, by chance,  last week, a way of doing like I wrote above. The problem is that I lost the link and I am not finding now. I will continue looking for . I think it was some kind of windows function

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...