荔园在线

荔园之美,在春之萌芽,在夏之绽放,在秋之收获,在冬之沉淀

[回到开始] [上一篇][下一篇]


发信人: tec (JL~酷夏凉风), 信区: Visual
标  题: Re: 看看是调用了那个函数????
发信站: 荔园晨风BBS站 (Mon Aug 25 12:23:35 2003), 站内信件

LIBRARY语句是指明dll的名称,这里加不加引号关系应该不大,在MSDN查到的
Rules for Module-Definition Statements 文章里有下面两条:

Long filenames containing spaces or semicolons (;) must be enclosed in
quotation marks (").

If a string argument matches a reserved word, it must be enclosed in
double quotation marks (").

也许跟这个有点关系吧。

那个link warning的问题在这里可以找到答案:
http://msdn.microsoft.com/library/default.
asp?url=/library/en-us/vccore/html/vcerrlinkertoolswarninglnk4222.asp

顺便还找到了这个,^_^
http://msdn.microsoft.com/library/default.
asp?url=/library/en-us/dv_vstechart/html/vstchdebugginginvisualstudionet
.asp

No More Additional DLLs
~~~~~~~~~~~~~~~~~~~~~~~~
Another new feature improvement is that now you do not need to specify
additional DLLs to set breakpoints in DLLs on processes running on
your local or remote machine. Visual Studio .NET now dynamically binds
the breakpoints to the DLL as soon as it detects that the DLL loads. All
 you need to do is press F9, or set a breakpoint in the code you want to
 debug, and the debugger binds it when the DLL loads.




【 在 littlebao (爱拼才会赢) 的大作中提到: 】
: warning LNK4222: exported symbol 'DllGetClassObject' should not be assigned
: an ordinal
: 但是书上明明说可以加序号的,而且用alt建com时也是加序号的。
: 我是说用LIBRARY 说明引出的dll名时,用.net建立的def是不用双引号的
: 比如LIBRARY     InnerComp
: 而用6.0通过atl建立com时却加了双引号
: 比如
: LIBRARY      "InnerComp.dll"
: 【 在 tec (JL~酷夏凉风) 的大作中提到: 】
: : 加序号与不加序号的区别记得在什么地方看过,不过记不起来了,
: : 所以特地查了下MSDN,下面你自己看看。
: : 警告的信息是什么,贴出来看看。
: : 还有你说导出时什么加引号是什么意思,这个不明白。
: : Other useful features of the DEF file is use of the ordinal number and
: : the NONAME flag.
: : ................
: : The ordinal number can be any decimal number usually set to indicate the
: :  number of functions in the DLL, which in turn provides a shorthand
: : method for getting the address of the function in the DLL when
: : GetProcAddress function is used (discussed in the following section on
: : explicit linking).
: : ................
: : Explicit dynamic linking is used when you want to load the DLL only when
: :  you are ready to call the functions in the DLL in your application.
: : When you are done using the functions, you can unload the DLL from
: : memory, thus saving memory space when the application is running, and
: : load another DLL for some other function calls. The two functions used
: : to achieve this are LoadLibrary and FreeLibrary. To get the function
: : addresses GetProcAddress is used. GetProcAddress can use the actual
: : function name or the ordinal number of the function as associated in the
: :  DEF file, which we discussed before. The use of the ordinal number lets
: :  GetProcAddress locate the function in the DLL function table quickly
: : instead of searching the table with a function name string. If the
: : NONAME flag is used in the DEF file, GetProcAddress must use the ordinal
: :  number. To get the function address through the ordinal number, the
: : MAKEINTRESOURCE macro is used. The following example shows how to
: : write the code on the application side to achieve this. Notice the
: : absence of the header files Pascal.h and Pascal2.h. Note that as the DLL
: :  is loaded explicitly, the application does not link with the DLL import
: :  library. But, the DLL has to be in the directories specified for
: : LoadLibray to succeed. In our example below, we copied the pascaldll.dll
: :  into the application's EXE directory. Use the following source file for
: :  the application. Build the application without the import library
: : pascaldll.lib.


--
※ 来源:·荔园晨风BBS站 bbs.szu.edu.cn·[FROM: 192.168.64.33]


※ 来源:·荔园晨风BBS站 bbs.szu.edu.cn·[FROM: 61.144.235.40]


[回到开始] [上一篇][下一篇]

荔园在线首页 友情链接:深圳大学 深大招生 荔园晨风BBS S-Term软件 网络书店