p2p.wrox.com Forums

Need to download code?

View our list of code downloads.


Go Back   p2p.wrox.com Forums > Visual Basic > VB 6 Visual Basic 6 > Pro VB 6
I forgot my password Register Now
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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.

Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old December 20th, 2007, 01:18 PM
Friend of Wrox
Points: 5,269, Level: 30
Points: 5,269, Level: 30 Points: 5,269, Level: 30 Points: 5,269, Level: 30
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Nov 2004
Location: Port Orchard, WA, USA.
Posts: 1,621
Thanks: 1
Thanked 1 Time in 1 Post
Default 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?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
  #2 (permalink)  
Old December 20th, 2007, 03:54 PM
Friend of Wrox
Points: 6,570, Level: 34
Points: 6,570, Level: 34 Points: 6,570, Level: 34 Points: 6,570, Level: 34
Activity: 43%
Activity: 43% Activity: 43% Activity: 43%
 
Join Date: Jun 2003
Location: Capital Federal, , Argentina.
Posts: 2,000
Thanks: 5
Thanked 37 Times in 36 Posts
Send a message via MSN to gbianchi
Default

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
================================================== =========
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
  #3 (permalink)  
Old December 20th, 2007, 04:19 PM
Friend of Wrox
Points: 5,269, Level: 30
Points: 5,269, Level: 30 Points: 5,269, Level: 30 Points: 5,269, Level: 30
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Nov 2004
Location: Port Orchard, WA, USA.
Posts: 1,621
Thanks: 1
Thanked 1 Time in 1 Post
Default

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...).
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
  #4 (permalink)  
Old December 21st, 2007, 12:26 PM
Registered User
 
Join Date: Dec 2007
Location: , , .
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
  #5 (permalink)  
Old December 21st, 2007, 12:40 PM
Friend of Wrox
Points: 6,570, Level: 34
Points: 6,570, Level: 34 Points: 6,570, Level: 34 Points: 6,570, Level: 34
Activity: 43%
Activity: 43% Activity: 43% Activity: 43%
 
Join Date: Jun 2003
Location: Capital Federal, , Argentina.
Posts: 2,000
Thanks: 5
Thanked 37 Times in 36 Posts
Send a message via MSN to gbianchi
Default

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
================================================== =========
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
  #6 (permalink)  
Old December 21st, 2007, 01:22 PM
Wrox Author
Points: 12,827, Level: 49
Points: 12,827, Level: 49 Points: 12,827, Level: 49 Points: 12,827, Level: 49
Activity: 15%
Activity: 15% Activity: 15% Activity: 15%
 
Join Date: Oct 2005
Location: Akron, Ohio, USA.
Posts: 4,029
Thanks: 1
Thanked 42 Times in 42 Posts
Send a message via AIM to dparsons
Default

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
================================================== =========
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
  #7 (permalink)  
Old December 21st, 2007, 03:23 PM
Friend of Wrox
Points: 5,269, Level: 30
Points: 5,269, Level: 30 Points: 5,269, Level: 30 Points: 5,269, Level: 30
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Nov 2004
Location: Port Orchard, WA, USA.
Posts: 1,621
Thanks: 1
Thanked 1 Time in 1 Post
Default

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]
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
When to use NEW in declarations LarryMoore BOOK: Beginning Microsoft Visual Basic 2008 ISBN: 978-0-470-19134-7 8 September 24th, 2008 05:02 PM
Where are my control declarations? Ron Howerton ASP.NET 2.0 Basics 13 December 6th, 2007 03:11 PM
running an .exe API without installing a service taunon C# 0 June 10th, 2006 10:37 AM
Variable Declarations New2ASPnet General .NET 1 July 30th, 2004 10:49 AM
retaining ENTITY declarations arvin XSLT 3 July 23rd, 2003 02:51 AM



All times are GMT -4. The time now is 03:20 AM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
© 2008 Wiley Publishing, Inc