¹ØÓÚcÓïÑÔ´´½¨dllÎļþ¼°dllÎļþµÄµ÷ÓÃ
½üÀ´ÓÖÓÐÈËÔÚȺÀïÎÊÈçºÎÓÃcÓïÑÔ±àÖÆdllÎļþ£¨¶¯Ì¬Á´½Ó¿â£©¡£
ÔÀ´Ã»ÓжÔÕâ¸öÎÊÌâÌ«ÔÚÒâ¹ý£¬Ò²Ã»Óг¢ÊÔ¹ýÈκνâ¾ö·½°¸£¬±Ï¾¹ÔÀ´ÎÒÊÇÓÃvbµÄ£¨ÏÖÔÚÓÃ.net£©£¬×ö¸ödllÖ»²»¹ýÊǵãѡһϽ¨Á¢activeX dll¹¤³ÌµÄͼ±ê¶øÒÑ¡£½ñÌìÔÚÍøÉÏÓëÅóÓÑÁÄÌ죬¿´ÁËËûÖ¸¸øÎҵö¼¸¸öÎļþ£¬ÓÃMingW½«C³ÌÐò±àÒë³ÉdllÎļþµÄÀý×Ó£¬ÎÒ»ÐÈ»´óÎò£¬ÔÀ´½²C³ÌÐò±àÒë³ÉdllÎļþÖ»²»¹ýÊÇÔÚÒª¹«¿ªµÄ½Ó¿Úº¯ÊýÉùÃ÷Ç°Ãæ¼ÓÉϼ¸¸öÌØ¶¨µÄÐÞÊηû¶øÒÑ¡£ÓÚÊÇÓÃdev-cpp½¨Á˸ödllµÄĬÈÏÎĵµ£¬Ò»Çж¼ºÜÃ÷ÁË¡££¨ÎÒ°ÑÔ´´úÂëÌùÔÚÏÂÃæ£©
/*dll.hÎļþ*/
#ifndef _DLL_H_
#define _DLL_H_
#if BUILDING_DLL
# define DLLIMPORT __declspec (dllexport)
#else /* Not BUILDING_DLL */
# define DLLIMPORT __declspec (dllimport)
#endif /* Not BUILDING_DLL */
DLLIMPORT void HelloWorld (void);
#endif /* _DLL_H_ */
/*dllmain.cÎļþ*/
/* Replace "dll.h" with the name of your header */
#include "dll.h"
#include <windows.h>
#include <stdio.h>
#include <stdlib.h>
DLLIMPORT void HelloWorld ()
{
MessageBox (0, "Hello World from DLL!\n", "Hi", MB_ICONINFORMATION);
}
BOOL APIENTRY DllMain (HINSTANCE hInst /* Library instance handle. */ ,
DWORD reason /* Reason this function is being called. */ ,
LPVOID reserved /* Not used. */ )
{
switch (reason)
{
case DLL_PROCESS_ATTACH:
break;
case DLL_PROCESS_DETACH:
break;
case DLL_THREAD_ATTACH:
break;
case DLL_THREAD_DETACH:
Ïà¹ØÎĵµ£º
C³ÌÐòÓë»ã±à³ÌÐòÏ໥µ÷ÓùæÔò
ΪÁËʹµ¥¶À±àÒëµÄCÓïÑÔ³ÌÐòºÍ»ã±à³ÌÐòÖ®¼äÄܹ»Ï໥µ÷Ó㬱ØÐëΪ×Ó³ÌÐò¼äµÄµ÷Óùæ
¶¨Ò»¶¨µÄ¹æÔò¡£ATPCS£¬¼´ARM£¬ Thumb¹ý³Ìµ÷Óñê×¼(ARM/Thumb Procedure Call
Standard)£¬ÊÇARM³ÌÐòºÍThumb³ÌÐòÖÐ×Ó³ÌÐòµ÷ÓõĻù±¾¹æÔò£¬Ëü¹æ¶¨ÁËһЩ×Ó³ÌÐò¼äµ÷ÓÃ
µÄ»ù±¾¹æÔò£¬Èç×Ó³ÌÐòµ÷Óùý³ÌÖеļĴæ ......
CÓïÑÔÖÐûÓк¯ÊýÖØÔØµÄ¸ÅÄ£¡
CÓïÑÔÖÐûÓк¯ÊýÖØÔØµÄ¸ÅÄ£¡
½ñÌìMSNȺÖÐÓиöÈËÎÊÎÒCÓïÑÔµÄÎÊÌ⣺
£¨Á½¸öº¯ÊýʵÏֵŦÄÜÏàͬ
µ«ÊÇËüÃDzÎÊýµÄ¸öÊý²»Í¬
ÎÒÓÃÒ»¸öº¯Êý°ÑÕâ¸öÁ½¸öº¯Êý·âÆðÀ´
&n ......
char c[] = "hello world" ·ÖÅä¾Ö²¿Êý×é
char* c = "hello world" ·ÖÅäÈ«¾ÖÊý×é È«¾ÖÇøÓòµÄÖµÊDz»ÄܽøÐÐÐ޸ĵÄ
1 ³£Á¿Ö¸Õ룡Èç int b, c; int * const a = &b;
±íʾaÊÇÒ»¸ö³£Á¿Ö¸ÕëËüÖ¸Ïò±äÁ¿bµÄÄÚ´æ¡£µ«ÊÇÒòΪÊdz£Á¿Ö¸ÕëËùÒÔ²»ÄÜÔÙÓÃaÖ¸ÏòÆäËû±äÁ¿£¬Èç a = &c; ´íÎ󣡿ÉÒÔÐÞ¸ÄÖ ......
×Ô¼ºÊ¹ÓÃvim±à¼´úÂëÒ²ÊÇÓÐÒ»¶Îʱ¼äÀ´£¬Ä¿Ç°ÔĶÁ¡¢Ð޸ġ¢Ð´´úÂë»ù±¾¶¼Àë²»¿ªËûÁË¡£±¾ÈËʹÓùýµÄ±à¼Æ÷ºÜÉÙ£¬ÒÔǰһ°ã¶¼ÊÇʹÓóÌÐò¿ª·¢IDE×Ô´øµÄ±à¼Æ÷Щ´úÂ룬û¾õµÃʲô·½±ã¡£¿ªÊ¼Ê¹ÓÃvimµÄ¸Õ¸Õ½Ó´¥linux³ÌÐò¿ª·¢µÄʱºò£¬ÄÇʱ¿´µ½ÆäËûÈËÒ»°ã¶¼ÊÇÔÚwindowsÏÂʹÓÃSource Insight ±à¼´úÂ룬ȻºóÔÚÐéÄâ»úlinuxÏÂmake¡£ÎұȽ ......
GNU/LinuxÓÐÁ½Ì׿â¿ÉÓÃÓÚÕýÔò±í´ïʽ±à³Ì£ºPOSIX¿âºÍPCRE¿â¡£Ç°Õß²»ÐèÒªµ¥¶À°²×°£¬Ò»°ãÐèÇó»¹ÊÇÄÜÂú×ãµÄ£¬ËÙ¶ÈÉÔÂýЩ¡£ºóÕßÊǾøºÊ¢ÃûµÄPerlÕýÔò±í´ïʽ¿â£¬¹¦ÄÜÇ¿´ó£¬Æ¥ÅäËٶȿ죬²»¹ý¿ÉÄÜÐèÒªµ¥¶À°²×°¡£
ÎÒÃÇÏÈÓÃÒ»¸öÀý×ÓÀ´½éÉÜÈçºÎʹÓÃPOSIX¿â¡£
££i nclude <stdio.h>
££i nclude <sys/ty ......