Featured post

c# - Usage of Server Side Controls in MVC Frame work -

i using asp.net 4.0 , mvc 2.0 web application. project requiremrnt have use server side control in application not possibl in noraml case. ideally want use adrotator control , datalist control. i saw few samples , references in codepleax mvc controllib howwver found less useful. can tell how utilize theese controls in asp.net application along mvc. note: please provide functionalities related adrotator , datalist controls not equivalent functionalities thanks in advace. mvc pages not use normal .net solution makes use of normal .net components impossible. a normal .net page use event driven solution call different methods service side mvc use actions , view completly different way handle things. also, mvc not use viewstate normal .net controlls require. found article discussing mixing of normal .net , mvc.

c++ - Why/when is __declspec( dllimport ) not needed? -


in project using server.dll , client.exe, have dllexported server symbol server dll, , not dllimported client exe.

still, application links, , starts, without problem. dllimport not needed, then???

details:

i have 'server' dll:

// server.h #ifdef server_exports   #define server_api __declspec(dllexport) #else   #define server_api // =====> not using dllimport! #endif class  server_api cserver {    static long s;    public:    cserver(); };  // server.cpp cserver::cserver(){}  long cserver::s; 

and client executable:

#include <server.h> int main() {    cserver s; } 

the server command line:

cl.exe /od  /d "win32" /d "_debug" /d "_windows" /d "_usrdll"   /d "server_exports" /d "_unicode" /d "unicode" /d "_windll"   /gm /ehsc /rtc1 /mdd /yu"stdafx.h"   /fp"debug\server.pch" /fo"debug\\" /fd"debug\vc80.pdb"   /w3 /nologo /c /wp64 /zi /tp /errorreport:prompt  cl.exe /out:"u:\libs\debug\server.dll" /incremental:no /nologo /dll  /manifest /manifestfile:"debug\server.dll.intermediate.manifest"  /debug /pdb:"u:\libs\debug\server.pdb"  /subsystem:windows /machine:x86 /errorreport:prompt  kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib  shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib 

client command line:

cl.exe /od /i "..\server"   /d "win32" /d "_debug" /d "_console" /d "_unicode" /d "unicode"   /gm /ehsc /rtc1 /mdd /fo"debug\\" /fd"debug\vc80.pdb" /w3 /c /wp64 /zi /tp   .\client.cpp  cl.exe /out:"u:\libs\debug\debug\client.exe" /incremental  /libpath:"u:\libs\debug"  /manifest /manifestfile:"debug\client.exe.intermediate.manifest"  /debug /pdb:"u:\libs\debug\debug\client.pdb"  /subsystem:console /machine:x86  server.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib  advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib 

it isn't required. optimization, hint compiler dll going export function pointer directly rather entry in iat of dll. exported function pointer function named foo() __imp_foo. allows generate better code, saving function pointer load iat , indirect jump. time optimization, not space.

this blog post has details.


Comments

Popular posts from this blog

c# - Usage of Server Side Controls in MVC Frame work -

cocoa - Nesting arrays into NSDictionary object (Objective-C) -

ios - Very simple iPhone App crashes on UILabel settext -