|
-
Apr 2nd, 2010, 08:02 AM
#1
Thread Starter
New Member
How to Increase Visual Basic Functions STACK
Hi,I have to use nested & complex functions (call 3 functions inside a function) in my app. But I am sure that visual basic 6 stacks is not enough for my purpose. How can i increase stack?
-
Apr 2nd, 2010, 08:03 AM
#2
Re: How to Increase Visual Basic Functions STACK
VB doesn't havea stack... the computer has a stack... why would you think that you would need more stack space?
-tg
-
Apr 2nd, 2010, 08:09 AM
#3
Thread Starter
New Member
Re: How to Increase Visual Basic Functions STACK
Becase when i called a major function( a function which call 5 heavy functions inside of itself) all my sub functions worked perfectly but the next line after the major function didn`t execute.
-
Apr 2nd, 2010, 08:12 AM
#4
Thread Starter
New Member
Re: How to Increase Visual Basic Functions STACK
I am using BASCOM too & there is an option for increasing Stack for functions. It gives me this ability to call more than 3 sub functions in a major function.
-
Apr 2nd, 2010, 08:19 AM
#5
Re: How to Increase Visual Basic Functions STACK
then something else is going wrong because I've created hundreds of funciton that call dozens of other functions, and in some cases that function is on a different machine from the app.... never had a problem. Something must be wrong with the functions you are calling or something... there's no reason just calling three functions would cause a problem.
-tg
-
Apr 2nd, 2010, 08:32 AM
#6
Thread Starter
New Member
Re: How to Increase Visual Basic Functions STACK
Thank you from bottom of my heart.
-
Apr 2nd, 2010, 08:39 AM
#7
Re: How to Increase Visual Basic Functions STACK
 Originally Posted by techgnome
then something else is going wrong because I've created hundreds of funciton that call dozens of other functions, and in some cases that function is on a different machine from the app.... never had a problem. Something must be wrong with the functions you are calling or something... there's no reason just calling three functions would cause a problem.
-tg
I'm curious to know about that. Could you tell me about that 
@amrbab: Could you post your function and the line in which the error occurs ?
Good luck
If my post was helpful to you, then express your gratitude using Rate this Post. 
And if your problem is SOLVED, then please Mark the Thread as RESOLVED (see it in action - video)
My system: AMD FX 6100, Gigabyte Motherboard, 8 GB Crossair Vengance, Cooler Master 450W Thunder PSU, 1.4 TB HDD, 18.5" TFT(Wide), Antec V1 Cabinet
Social Group: VBForums - Developers from India
Skills: PHP, MySQL, jQuery, VB.Net, Photoshop, CodeIgniter, Bootstrap,...
-
Apr 2nd, 2010, 09:41 AM
#8
Re: How to Increase Visual Basic Functions STACK
akhileshbc - it's a .NET thing... called Remoting... I'm not sure that VB6 has that capability.
It's similar to calling a WebService, but it's different. Not sure I can explain it in a clear, comprehendable way.
Basically, you create an object (which has to implement the remoting interface), but you can't simply use
Dim something As New SomeObject
You have to use a special construct that tells VB 1) That it's a remote object and 2) Where that object is. The object then gets created on the machine at that location - it can be another server on the network, and it can even be the local machine. It's controlled by the config file. So, like in our case, we have a config file that we use during development that says to use the local machine, that way we can debug locally. Then the different servers from the different environments (QA, Testing, Production) have their configs set accordingly.
-tg
-
Apr 2nd, 2010, 03:15 PM
#9
Re: How to Increase Visual Basic Functions STACK
VB6.EXE seems to use the default stack reserve size, which is 1MB of virtual memory. It also seems to use the default commit increment (chunks the stack is extended by as needed). I can't find the default commit value though.
The initial stack is probably one or more commit sized blocks but extension to the full reserve amount is automatic.
Changing these two values is probably possible by relinking the EXE using the /EDIT switch along with the /STACK switch... or by manually altering the PE header of the EXE. As far as I know nobody ever does this.
Blowing the stack is almost always a sign of runaway recursion.
-
Apr 2nd, 2010, 09:45 PM
#10
Frenzied Member
Re: How to Increase Visual Basic Functions STACK
techgnome and akhileshbc, that would be DCOM in the world of VB6...
Option Explicit should not be an Option!
-
Apr 3rd, 2010, 02:39 AM
#11
Re: How to Increase Visual Basic Functions STACK
 Originally Posted by techgnome
akhileshbc - it's a .NET thing... called Remoting... I'm not sure that VB6 has that capability.
It's similar to calling a WebService, but it's different. Not sure I can explain it in a clear, comprehendable way.
Basically, you create an object (which has to implement the remoting interface), but you can't simply use
Dim something As New SomeObject
You have to use a special construct that tells VB 1) That it's a remote object and 2) Where that object is. The object then gets created on the machine at that location - it can be another server on the network, and it can even be the local machine. It's controlled by the config file. So, like in our case, we have a config file that we use during development that says to use the local machine, that way we can debug locally. Then the different servers from the different environments (QA, Testing, Production) have their configs set accordingly.
-tg
Thanks tg ...
 Originally Posted by vb5prgrmr
techgnome and akhileshbc, that would be DCOM in the world of VB6...
What is DCOM ?
If my post was helpful to you, then express your gratitude using Rate this Post. 
And if your problem is SOLVED, then please Mark the Thread as RESOLVED (see it in action - video)
My system: AMD FX 6100, Gigabyte Motherboard, 8 GB Crossair Vengance, Cooler Master 450W Thunder PSU, 1.4 TB HDD, 18.5" TFT(Wide), Antec V1 Cabinet
Social Group: VBForums - Developers from India
Skills: PHP, MySQL, jQuery, VB.Net, Photoshop, CodeIgniter, Bootstrap,...
-
Apr 3rd, 2010, 02:45 AM
#12
Re: How to Increase Visual Basic Functions STACK
 Originally Posted by akhileshbc
What is DCOM ? 
DCOM
Pretty fundamental to VB and Windows.
-
Apr 3rd, 2010, 02:47 AM
#13
Re: How to Increase Visual Basic Functions STACK
 Originally Posted by dilettante
DCOM
Pretty fundamental to VB and Windows.
Ok.. Thanks..
If my post was helpful to you, then express your gratitude using Rate this Post. 
And if your problem is SOLVED, then please Mark the Thread as RESOLVED (see it in action - video)
My system: AMD FX 6100, Gigabyte Motherboard, 8 GB Crossair Vengance, Cooler Master 450W Thunder PSU, 1.4 TB HDD, 18.5" TFT(Wide), Antec V1 Cabinet
Social Group: VBForums - Developers from India
Skills: PHP, MySQL, jQuery, VB.Net, Photoshop, CodeIgniter, Bootstrap,...
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
|