Òþ²Ø½ø³ÌµÄÔ´´úÂë(c/c++ʵÏÖ)!
²ÉÓÃ×¢Èëµ½ÆäËû½ø³ÌµÄ·½·¨À´Òþ²Ø×Ô¼ºµÄ½ø³Ì¡£¾ÍÊÇ˵£¬°ÑÄãÏë×öµÄÊÂÇé¼ÄÉúµ½±ðÈ˵Ľø³ÌÀïÃæ¡£±ÈÈçIEʲôµÄ¡£¹ØÓÚ×¢ÈëµÄ·½·¨ºÜ¶à£¬ÏÂÃæÎÒ¸øÄãÒ»¸öDLL×¢ÈëµÄ·½·¨£¬Õâ¸öÊÇÎÒ×öijÍâ¹ÒʱÓùýµÄ´úÂ룬Äã²Î¿¼Ò»Ï°ѡ£
int APIENTRY _tWinMain( HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPTSTR lpCmdLine,
int nCmdShow)
{
TCHAR szCommandLine[] _T("Ä¿±ê½ø³Ì");
TCHAR szCurPath[] = _T("µ±Ç°Ä¿Â¼");
WCHAR szTagetDLLName[256] = L"Ä¿±êDLL";
PWSTR pszRemoteDLLName = NULL;
HANDLE hRemoteThread = NULL;
STARTUPINFO StartupInfo = { sizeof(StartupInfo) };
PROCESS_INFORMATION ProcessInfo = { 0 };
PTHREAD_START_ROUTINE pfnLoadLibraryAddress = NULL;
HANDLE hTheFileMaping = NULL;
LPREMOTEDATA pTheRemoteData = NULL;
__try
{
//»ñµÃ±¾µØ½ø³Ì·¾¶Ãû³Æ
GetModuleFileNameW(hInstance, szTagetDLLName, 256);
//»ñµÃÄ¿±êDLL·¾¶Ãû³Æ£¬¼Ù¶¨Ä¿±êDLL±¾µØ½ø³ÌÔÚͬһ¸öĿ¼¡£
WCHAR * p = szTagetDLLName + lstrlenW(szTagetDLLName) - 1;
while( (*p != L'\\') && (p != szTagetDLLName) )
p --;
p ++;
*p = L'\0';
lstrcatW(szTagetDLLName, L"TagetDll.DLL");
//»ñÈ¡LoadLibraryWÔÚKernel32.DLLÖеĵØÖ·£¬ÓÃÓÚ×÷ΪԶÏ̵߳ÄÈë¿ÚµØÖ·¡£
pfnLoadLibraryAddress = ( PTHREAD_START_ROUTINE )
GetProcAddress( GetModuleHandle( _T("Kernel32") ), "LoadLibraryW" );
if( NULL == pfnLoadLibraryAddress )
 
Ïà¹ØÎĵµ£º
Boss˵£¬Òª¿´OpenGL£¬¿´ÁË¿ìÒ»¸öÔ£¬×ÜËã³öÁ˸öÏñÑùµÄ¶«Î÷£¬ÓÃCдÁ˸ö3DÃÔ¹¬£¬
ËäȻֻÓÐ350ÐÐ
´úÂ룬²»¹ý±ßѧ±ßд£¬×ã×ãдÁËÒ»ÖÜʱ¼ä£¬»¹ÊÇСÓгɾ͸еģ¬»î»î»î£¡
&n ......
¶¯Ì¬¼ÓÔØDLLÐèҪʹÓÃWindows APIº¯Êý£ºLoadLibrary¡¢GetProcAddressÒÔ¼°FreeLibrary¡£ÎÒÃÇ¿ÉÒÔʹÓÃDllImportÔÚC#ÖÐʹÓÃÕâÈý¸öº¯Êý¡£
[DllImport("Kernel32")]
public static extern int GetProcAddress(int handle, String funcname);
[DllImport("Kernel32")]
public static extern int L ......
ÖÚËùÖÜÖª£¬strcmpΪ×Ö´®±È½ÏÖ»Ó㬼òµ¥µÄº¯Êý²¢²»¼òµ¥¡£
ÏÂÃæµÄ´úÂë
int main()
{
char* cp1 = {'z', 'h', 'a', 'n', 'g'};
char* cp2 = {'z', 'h', 'a', 'n', 'g'};
std::cout<<strcmp(cp1, cp2)<< ......
ÎÒ֮ǰÊÇÒ»¸öC³ÌÐòÔ±£¬¶øÇÒÊǸöWindowsµÄ³ÌÐòÔ±£¬ÔÚwindowsÏÂʹÓÃVC6.0/VS2005µÈmicrosoftµÄɵ¹Ïʽ¹¤¾ß¹¤×÷£¬
¶ÔÓÚÄǸövc 6.0/vs2005µÄ¿ì½Ý²Ù×÷£¬debug²Ù×÷ÊÇÄÇôµÄÊìϤ£¬¿ÉÒÔ˵vc
6.0/vs2005ÊÇwindowÏ¿ª·¢c/c++×îºÃÓõŤ¾ßÁË£¬¿ÉÒԲ鿴µ÷ÓöÑÕ»£¬ÄÚ´æ±ä»¯Çé¿ö£¬±äÁ¿Öµ£¬ÁíÍâ°²×° visual assist
xºóÈÃVC¿´ÆðÀ´ÊÇÄÇô ......
TinyXML£ºÒ»¸öÓÅÐãµÄC++ XML½âÎöÆ÷
¶ÁÈ¡ºÍÉèÖÃxmlÅäÖÃÎļþÊÇ×î³£ÓõIJÙ×÷£¬ÊÔÓÃÁ˼¸¸öC++µÄXML½âÎöÆ÷£¬¸öÈ˸оõTinyXMLÊÇʹÓÃÆðÀ´×îÊæ·þµÄ£¬ÒòΪËüµÄAPI½Ó¿ÚºÍJavaµÄÊ®·ÖÀàËÆ£¬ÃæÏò¶ÔÏóÐԺܺá£
TinyXMLÊÇÒ»¸ö¿ªÔ´µÄ½âÎöXMLµÄ½âÎö¿â£¬Äܹ»ÓÃÓÚC++£¬Äܹ»ÔÚWindows»òLinuxÖбàÒë¡£Õâ¸ö½âÎö¿âµÄÄ£ÐÍͨ¹ý½âÎöXMLÎļþ£¬È»ºóÔ ......