|
-
Jul 27th, 2000, 07:05 PM
#1
Thread Starter
New Member
Most MTS books have simplistic examples, and of all the sample sources I have looked at I cant find an answer to my question. Can someone please help?
Should I make a call to GetObjectContext() in every function in my DLL?
Obviously you are going to do that in your "main" methods, but does calling GetObjectContext() in every function (main and helper functions) make your code more efficient?
In the following example I've called GetObjectContext() in each function. Is that overkill or quality coding practice?
Function Sum(nNumber1, nNumber2) as Integer
'--- this is the main function a client would call
GetObjectContext()
'--- now call helper function to do the work
nAnswer = TotalThem(nNumber1, nNumber2)
Sum = nAnswer
End Function
Function TotalThem(nNumber1, nNumber2) as Integer
GetObjectContext()
TotalThem = nNumber1 + nNumber2
End Function
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|