|
|
 |
| Pro VB 6 For advanced Visual Basic coders working in version 6 (not .NET). Beginning-level questions will be redirected to other forums, including Beginning VB 6. |
Welcome to the p2p.wrox.com Forums.
You are currently viewing the Pro VB 6 section of the Wrox p2p Programmer to Programmer discussion community. This is a community of more than 40,000 computer programmers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining our free Wrox p2p community you can post your own programming questions and respond to other programmers’ questions. Registered users also don't have to see the ads that are displayed to guests. Registration is fast, simple and absolutely free so please, join today!
Join today and post to win prizes! Post more to increase your chances of being Wrox’s top poster of the month.
|
 |

December 20th, 2007, 01:18 PM
|
|
Friend of Wrox
|
|
Join Date: Nov 2004
Location: Port Orchard, WA, USA.
Posts: 1,621
Thanks: 1
Thanked 1 Time in 1 Post
|
|
Why do API Declarations Incr. .EXE size?
I was pretty confident that this wouldn't happen, but decided to test to be sure.
When it did happen, I was really surprised.
I created a project, remove the default form, and added a module with
Code:
Public Sub Main()
Msgbox "I am running . . ."
End
End Sub
in it.
I compiled it, and it became a 16Kb (16,384-byte) .EXE.
I added a module with 88 lines of type declarations. I recompiled, and the .EXE size was unchanged.
Then I added a module with 67 lines of API declarations. Recompiled, and the size swelled to 20,480 bytes.
None of these APIs are used. Why does adding API declarations change the .EXE size?
It seems that their presence ought to only add them to IntelliSense (strictly an IDE issue), and provide necessary info for the compilation process to include them, [u]when they are utilized in the execution process</u>.
What gives?
|

December 20th, 2007, 03:54 PM
|
|
Friend of Wrox
|
|
Join Date: Jun 2003
Location: Capital Federal, , Argentina.
Posts: 2,000
Thanks: 5
Thanked 37 Times in 36 Posts
|
|
I'm thinking out loud, but maybe since you use a declare to do that, The exe now includes checks and data stuctures to handles the calls (or the future calls, the compiler doesn't check if you use them or not)...
HTH
Gonzalo
================================================== =========
Read this if you want to know how to get a correct reply for your question:
http://www.catb.org/~esr/faqs/smart-questions.html
^^Took that from dparsons signature and he Took that from planoie's profile
================================================== =========
My programs achieved a new certification (can you say the same?):
WORKS ON MY MACHINE
http://www.codinghorror.com/blog/archives/000818.html
================================================== =========
I know that CVS was evil, and now i got the proof:
http://worsethanfailure.com/Articles...-Hate-You.aspx
================================================== =========
|

December 20th, 2007, 04:19 PM
|
|
Friend of Wrox
|
|
Join Date: Nov 2004
Location: Port Orchard, WA, USA.
Posts: 1,621
Thanks: 1
Thanked 1 Time in 1 Post
|
|
I dropped the exe into Word, and sure enough, the strings of the API names—and in some cases (though not all) the strings representing the location of the routines—are contained in the exe.
There didn't seem to be much more in the way of byte-count. Seems like the argument types might be contained, but not much in the way of structures. (They would have to be pretty small.)
Seems impossible that the reason they would be in the exe is so that they can be verified at exe-startup (now I'm thinking out loud...).
|

December 21st, 2007, 12:26 PM
|
|
Registered User
|
|
Join Date: Dec 2007
Location: , , .
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
hi
i am justeen.now i am in development.in project have 3 seperate exe file
first exe have onely mdiforms.2 and 3 exe have onely fome
run time can i set form to mdichid propert to first exe mdiforms
|

December 21st, 2007, 12:40 PM
|
|
Friend of Wrox
|
|
Join Date: Jun 2003
Location: Capital Federal, , Argentina.
Posts: 2,000
Thanks: 5
Thanked 37 Times in 36 Posts
|
|
mmm.. what?
HTH
Gonzalo
================================================== =========
Read this if you want to know how to get a correct reply for your question:
http://www.catb.org/~esr/faqs/smart-questions.html
^^Took that from dparsons signature and he Took that from planoie's profile
================================================== =========
My programs achieved a new certification (can you say the same?):
WORKS ON MY MACHINE
http://www.codinghorror.com/blog/archives/000818.html
================================================== =========
I know that CVS was evil, and now i got the proof:
http://worsethanfailure.com/Articles...-Hate-You.aspx
================================================== =========
|

December 21st, 2007, 01:22 PM
|
|
Wrox Author
Points: 12,827, Level: 49 |
|
|
Join Date: Oct 2005
Location: Akron, Ohio, USA.
Posts: 4,029
Thanks: 1
Thanked 42 Times in 42 Posts
|
|
Justeen, don't try and hijack threads.
Justeens post:
http://p2p.wrox.com/topic.asp?TOPIC_ID=67793
================================================== =========
Read this if you want to know how to get a correct reply for your question:
http://www.catb.org/~esr/faqs/smart-questions.html
================================================== =========
.: Wrox Technical Editor :.
Wrox Books 24 x 7
================================================== =========
|

December 21st, 2007, 03:23 PM
|
|
Friend of Wrox
|
|
Join Date: Nov 2004
Location: Port Orchard, WA, USA.
Posts: 1,621
Thanks: 1
Thanked 1 Time in 1 Post
|
|
Justeen, First of all, post your own question.
Second, in English periods go at the ends of sentences, [u]FOLLOWED</u> by a space, and the first letter of the next sentence is capitalized. Following this set of three "rules" will make everything you write easier to follow.
(Also, “I,” as a pronoun naming yourself, is always, always capitalized.)
So:
I am justeen. Now I am in development. In [my] project [i] have 3 seperate exe file. The first exe have onely [[u]has</u> only] mdi [add space] forms.[add space] 2 and 3 exe have onely fome [add period]
|
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
 |