473,404 Members | 2,137 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,404 software developers and data experts.

module definition file

Hello everyone,
I am using Visual Studio 2005 to develop C++ DLL (in-process COM). There is
a setting in Linker --Input called Module definition file. This setting
makes me confused,

1. I have tried that if input a file name (.def), then the generated DLL be
larger than the time when we leave the module definition file to empty.
Should we leave it empty or non-empty (input a .def file name);

2. What is the function of the module definition file? Should developer
write it manually or generated by system.
thanks in advance,
George
Nov 2 '07 #1
2 1668
"George" <Ge****@discussions.microsoft.comwrote in message
news:98**********************************@microsof t.com...
1. I have tried that if input a file name (.def), then the generated DLL
be
larger than the time when we leave the module definition file to empty.
Should we leave it empty or non-empty (input a .def file name);
I know of only two ways to export a function by name from a DLL. Either tag
it with the __declspec(dllexport) attribute or specify it's name in the
module definition file. Pick one.
2. What is the function of the module definition file? Should developer
write it manually or generated by system.
See above. It's usually the proper choice when you want no name decoration
of the exported symbol.

Regards,
Will
Nov 4 '07 #2
Thanks for your clarification, Will!
regards,
George

"William DePalo [MVP VC++]" wrote:
"George" <Ge****@discussions.microsoft.comwrote in message
news:98**********************************@microsof t.com...
1. I have tried that if input a file name (.def), then the generated DLL
be
larger than the time when we leave the module definition file to empty.
Should we leave it empty or non-empty (input a .def file name);

I know of only two ways to export a function by name from a DLL. Either tag
it with the __declspec(dllexport) attribute or specify it's name in the
module definition file. Pick one.
2. What is the function of the module definition file? Should developer
write it manually or generated by system.

See above. It's usually the proper choice when you want no name decoration
of the exported symbol.

Regards,
Will
Nov 5 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

14
by: Jay O'Connor | last post by:
Is there a good way to import python files without executing their content? I'm trying some relfection based stuff and I want to be able to import a module dynamically to check it's contents...
2
by: Roy Smith | last post by:
I'm playing with the timeit module, and can't figure out how to time a function call. I tried: def foo (): x = 4 return x t = timeit.Timer ("foo()") print t.timeit()
18
by: Steven Bethard | last post by:
In the "empty classes as c structs?" thread, we've been talking in some detail about my proposed "generic objects" PEP. Based on a number of suggestions, I'm thinking more and more that instead of...
13
by: Genady Beryozkin | last post by:
Hi, I've read the article at http://msdn2.microsoft.com/en-us/library/ms235211.aspx about how to compile MFC/ATL code, but I still have one question unanswered: Should I have the CComModule...
0
by: Jérôme Le Bougeant | last post by:
Hello (and sorry for my English), I downloaded the VideoCapture module on the http://videocapture.sourceforge.net/ site. I tested it with a webcam and that functions. Now I want to...
10
by: Ben Finney | last post by:
Howdy all, Question: I have Python modules named without '.py' as the extension, and I'd like to be able to import them. How can I do that? Background: On Unix, I write programs intended to...
9
by: Ramashish Baranwal | last post by:
Hi, I want to get a module's contents (classes, functions and variables) in the order in which they are declared. Using dir(module) therefore doesn't work for me as it returns a list in...
1
by: Kirk | last post by:
I have a WS called "IWeb", which I define within the page class like this: Dim service As IWeb.WebService I then have a button that calls the web service like this: Dim header As...
2
by: gbin,Zhou | last post by:
Hi,all. I see from "http://docs.python.org/tut/node11.html" that "Name spaces are created at different moments and have different lifetimes. The namespace containing the built-in names is created...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.