Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

¹ØÓÚ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 extern

++ÖÐextern - -                                      ×÷ÕߣºËᦻª  e-mail:21cnbao@21cn.com¡¡³ö´¦£ºÌ«Æ½ÑóµçÄÔÍø1 ......

C ·ç¸ñ£¨C

C ·ç¸ñ£¨C-style£©Ç¿ÖÆתÐÍÈçÏ£º
(T) exdivssion // cast exdivssion to be of type T
º¯Êý·ç¸ñ£¨Function-style£©Ç¿ÖÆתÐÍʹÓÃÕâÑùµÄÓï·¨£º
T(exdivssion) // cast exdivssion to be of type T
 
ÕâÁ½ÖÖÐÎʽ֮¼äûÓб¾ÖÊÉϵIJ»Í¬£¬Ëü´¿´â¾ÍÊÇÒ»¸ö°ÑÀ¨ºÅ·ÅÔÚÄĵÄÎÊÌâ¡£ÎÒ°ÑÕâÁ½ÖÖÐÎʽ³ÆΪ¾É·ç¸ñ£¨old-style£ ......

C/C++ÓïÑÔÖи÷ÖÖÊý¾ÝÀàÐͳ¤¶ÈµÄ×ܽá

ÏÂÃæÊÇÎÒ¹ØÓÚCÓïÑÔÖи÷ÖÖÊý¾ÝÀàÐͳ¤¶ÈµÄ×ܽ᣺(²Î¿¼The C Programming Language)
1. cÓïÑÔÖеÄÕûÊýÀàÐÍÓÐchar, short, int, longµÈ¼¸ÖÖ, ÏÂÃæÊÇCÓïÑÔ¶ÔÿÖÖÊý¾ÝÀàÐͳ¤¶ÈµÄ¹æ¶¨:
(a). shortºÍlongÀàÐ͵ij¤¶È²»Ïàͬ
(b). intÀàÐÍͨ³£Í¬¾ßÌå»úÆ÷µÄÎïÀí×Ö³¤Ïàͬ
(c).&nb ......

.hÎļþºÍ.cÎļþ

HÎļþºÍCÎļþÔõôÓÃÄØ£¿Ò»°ãÀ´Ëµ£¬HÎļþÖÐÊÇdeclare£¨ÉùÃ÷£©£¬CÎļþÖÐÊÇdefine£¨¶¨Ò壩¡£ÒòΪCÎļþÒª±àÒë³É¿âÎļþ£¨WindowsÏÂÊÇ.obj/.lib£¬UNIXÏÂÊÇ.o/.a£©£¬Èç¹û±ðÈËҪʹÓÃÄãµÄº¯Êý£¬ÄÇô¾ÍÒªÒýÓÃÄãµÄHÎļþ£¬ËùÒÔ£¬HÎļþÖÐÒ»°ãÊDZäÁ¿¡¢ºê¶¨Ò塢ö¾Ù¡¢½á¹¹ºÍº¯Êý½Ó¿ÚµÄÉùÃ÷£¬¾ÍÏñÒ»¸ö½Ó¿Ú˵Ã÷ÎļþÒ»Ñù¡£¶øCÎļþÔòÊÇʵÏÖϸ½Ú ......

[Õª×Ôc#Bible]c#ÖÐnamespaceµÄʹÓã¨ÃüÃû¿Õ¼ä£©

The C# classes that you design will be used by code that you write and possibly by code that
other people write. Your C# classes may be used by a VB.NET application or from within an
ASP.NET page. Moreover, your classes may very well be used alongside other classes
designed by other .NET develope ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ