Software Archive
Read-only legacy content
17060 Discussions

Is there way to see if a routine is present?

rahzan
Novice
242 Views
I have large program and would like to check to see if a certain routine is present in another part of it so that it can be called. Is there a way to check to see if a ceratin subroutine is present at run time?

Alternatively, maybe if the routine in question can be put into a DLL, is there a way to see if if the routine is in the DLL at run time?

Thanks, Tim
0 Kudos
2 Replies
james1
Beginner
242 Views
Cleanest way is to put your "optional" routines in a DLL, then use LoadLibrary on the DLL, followed by GetProcAddress to see if the routine is present.

James
0 Kudos
rahzan
Novice
242 Views
Thanks James,
I see that the sample LOADEXP1 shows what you are saying,

Tim
0 Kudos
Reply