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

VC++ÔõÑùÉú³ÉDLL

---- ÔÚÓÃPowerBuilder¿ª·¢Ó¦ÓóÌÐòʱ£¬¾­³£ÐèÒªµ÷Óö¯Ì¬Á´½Ó¿âDLL£¬±¾ÎĽéÉÜÁ˶¯Ì¬Á´½Ó¿âµÄ»ù±¾Ìص㣬¸ø³öÁËVC++½¨Á¢DLLÒÔ¼°ÔÚPowerBuilderÖе÷ÓÃVC++´´½¨µÄDLLº¯ÊýµÄ±à³ÌʵÀý£¬ÊµÏÖÁËͨ¹ýDLLÁ¬½ÓPowerBuilderºÍVC++±àÖƵIJ»Í¬³ÌÐòµÄÄ¿µÄ¡£
Ò»¡¢ DLL¸ÅÊö£º
---- ¶¯Ì¬Á´½Ó¿â£¨Dynamic-Link Library£©£¬¼ò³ÆDLL£¬ÊÇ»ùÓÚWindows³ÌÐòÉè¼ÆµÄÒ»¸ö·Ç³£ÖØÒªµÄ×é³É²¿·Ö¡£Ê¹ÓÃDLLÓÐÐí¶àÓŵ㣺£¨1£©Ê¹ÓÃDLLµÄ¶¯Ì¬Á¬½Ó²»Êǽ«¿â´úÂ뿽±´£¬Ö»ÔÚ³ÌÐòÖмǼº¯ÊýµÄÈë¿ÚµãºÍ½Ó¿Ú£¬ÔÚ³ÌÐòÖ´ÐÐʱ²Å½«¿â´úÂë×°ÈëÄڴ棬Èç¹ûÓжà¸ö³ÌÐòʹÓÃÏàͬµÄDLL£¬Ò²Ö»Ð轫DLLÔÚÄÚ´æÖÐ×°ÔØÒ»´Î£¬½ÚÊ¡ÁËÄڴ濪Ïú¡££¨2£©DLLÊÇ»ùÓÚWindowsµÄ³ÌÐòÄ£¿é£¬Ëü²»½ö°üº¬¿ÉÖ´ÐдúÂ룬»¹¿ÉÒÔ°üº¬Êý¾Ý£¬¸÷ÖÖ×ÊÔ´£¬À©´óÁË¿âÎļþµÄʹÓ÷¶Î§¡££¨3£©¶ÔÓÚÒ»¸ö´óÐ͵ġ¢²»¶Ï¸üеÄÓ¦ÓóÌÐò£¬¿ÉÒÔ½«Ðí¶àÖظ´µÄ¹¦ÄÜд³ÉDLL£¬ÓÃÖ÷³ÌÐòµ÷Óã¬ÕâÑù¼È¼õÉÙÁË¿ª·¢µÄ¹¤×÷Á¿£¬ÓÖÌá¸ßÁË·ÃÎÊËٶȡ££¨4£©DLL·á¸»ÁËPowerScriptÓïÑԵıà³ÌÄÜÁ¦£¬¿ÉÒÔʹÓÃPowerScriptº¯Êý¼¯Ö®ÍâµÄº¯Êý¡£ÀýÈ磺Óû§¿ÉÄܱàдͼÏó´¦ÀíϵͳÀ´ä¯ÀÀÎļþ²¢½«Æä´æ·ÅÓÚÊý¾Ý¿â£¬¸ÃÓ¦ÓÃÐèʹÓÃä¯ÀÀÆ÷£¬µ«ÓÃPowerScriptÓïÑÔδÌṩ×öÕâÀ๤×÷µÄº¯Êý£¬ÎªÁ˲Ù×ÝÉ豸£¬ÐèÒªÓëÉ豸±¾Éí»·¾³Í¨ÐÅ£¬¸Ã»·¾³Ò»°ãÊdz§ÉÌÌṩµÄ¶¯Ì¬Á´½Ó¿â¡££¨5£©DLL¶ÀÁ¢ÓÚ±à³ÌÓïÑÔ£¬´ó¶àÊýWINDOWS±à³Ì»·¾³¶¼ÔÊÐíÖ÷³ÌÐòµ÷ÓÃDLLÖеĺ¯Êý¡£¼´¿ÉÒÔÓÃVC++¡¢VB¡¢PowerBuilder¡¢Delphi¡¢»ã±àÓïÑԵȽ¨Á¢DLL£¬È»ºóÔÚ²»Í¬ÓïÑÔ±àÖƵÄÓ¦ÓóÌÐòÖе÷ÓÃËü¡£ÏÂÃæÓÃÒ»¸öʵÀý˵Ã÷ͨ¹ýDLLʵÏÖPowerBuilder³ÌÐòºÍVC++³ÌÐòÖ®¼äµÄÁ¬½Ó¡£
¶þ¡¢ VC++´´½¨DLL
---- ÔÚVC++5.0ÖпÉÒÔÓÃMFC AppWizard×Ô¶¯Éú³ÉWin32 DLLºÍMFC AppWizard DLL£¬Æô¶¯VCÖ®ºó£¬´ÓFile | New²Ëµ¥ÏѡÔñNew¶Ô»°¿òÖеÄProjects±êÇ©£¬Ñ¡ÔñÐÂÏîĿΪMFC AppWizard£¨dll£©£¬ÊäÈ빤³ÌÃûpbdll£¬µã»÷OK°´Å¥£¬µ¯³öͼ1-1Ëùʾ¶Ô»°¿ò£¬Ñ¡ÔñDLLÀàÐÍΪ£ºRegular DLL using shared MFC DLL£¬È»ºóµã»÷Finish°´Å¥¡£ÕâÑù£¬AppWizard½«×Ô¶¯´´½¨Ò»¸ö°üº¬»ù±¾ÒªËصÄDLL¿ò¼Ü£¬½Ó×ÅÊÖ¹¤Ìí¼Ó´úÂë¡£
ͼ1-1 (ÂÔ)×Ô¶¯Éú³ÉµÄMFC AppWizard DLL
´ò¿ªpbdll.cppÎļþ£¬Ìí¼ÓÈçϺ¯Êý£º
extern "C" _declspec ( dllexport )
int PASCAL out_num(int x)
{
    int y;
    char msg[30];
    y=x > >2;
    sprintf(msg, "¼ÆËã½á¹û£º%o ! ", y);
    ::MessageBox(NULL, msg, "Ð


Ïà¹ØÎĵµ£º

C++ÖеÄÊý¾ÝÀàÐÍת»»·½·¨×ܽá

C++ÖеÄÊý¾ÝÀàÐÍת»»·½·¨×ܽá
ÕªÒª£º±¾ÎÄ×ܽáÁËC/C++ÖеĶàÖÖÊý¾ÝÀàÐÍת»»·½·¨£¬²¢±È½ÏÁ˸÷×ÔµÄÓÅÁÓ¡£¸ø³öÁËÍƼöµÄʹÓý¨Òé¡£
´Óintµ½char*£¬»òÕß·´¹ýÀ´´Óchar*µ½int£¬ÔÚC/C++Öе½µ×ÓжàÉÙÖÖת»»·½·¨ÄØ£¿·ûºÏ±ê×¼µÄ´ó¸ÅÓÐËÄÖÖ¡£¼´CÊý¾Ýת»»º¯Êý×å¡¢sprintf/snprintf/sscanfº¯Êý×å¡¢×Ö·û´®Á÷std::stringstream¡¢std::strst ......

VC++ ADOÊý¾Ý¿â FlexGrid¿Ø¼þ

ºÄ·ÑÁËÒ»ÏÂÎ磬Ñо¿ÁËÒ»ÏÂVCµÄÊý¾Ý¿â±à³Ì£¬Ð´ÁËÕâ¸ö²âÊÔ³ÌÐò¡£Ö÷ÒªµÄ¹¦ÄÜΪʵÏÖaccessÊý¾Ý¿âµÄÌí¼ÓÓëɾ³ý£¬Í¬Ê±¶¯Ì¬µÄ½«Êý¾Ý¿âÊý¾ÝÏÔʾÔÚflexgrid¿Ø¼þÖС£ÏÂÃæ°Ñ¹ý³Ì¼Ç¼ÏÂÀ´£¬ÒÔ±¸ºóÓá£
Ò»¡£ADO¼ò½é
 ADOÌṩÁËÒ»×é·Ç³£¼òµ¥£¬½«Ò»°ãͨÓõÄÊý¾Ý·ÃÎÊϸ½Ú½øÐзâ×°µÄ¶ÔÏó¡£ÓÉÓÚODBCÊý¾ÝÔ´Ò²ÌṩÁËÒ»°ãµÄOLE DB Privide ......

C/C++ÖеÄstatic

C++ÖеÄStaticÓÐÁ½¸ö×÷Óá£
1¡¢ ¾²Ì¬¾Ö²¿±äÁ¿ 
   ¾²Ì¬¾Ö²¿±äÁ¿ÔÚº¯ÊýÄÚ¶¨Òå ËüµÄÉú´æÆÚΪÕû¸öÔ´³ÌÐò£¬µ«ÊÇÆä×÷ÓÃÓòÔڸú¯ÊýÄÚ£¬Ö»ÄÜÔÚ¶¨Òå¸Ã±äÁ¿µÄº¯ÊýÄÚʹÓøñäÁ¿¡£ ÔÊÐí¶Ô¹¹ÔìÀྲ̬¾Ö²¿Á¿¸³³õÖµ£¬Èôδ¸³ÒÔ³õÖµ£¬ÔòÓÉϵͳ×Ô¶¯¸³ÒÔ0Öµ¡£ 
void fun1()
{
static int i = 0;
......

C++ string Ïê½â

C++ string Ïê½â
2007-04-22 11:05
Ç°ÑÔ: string µÄ½ÇÉ«
1 string ʹÓÃ
1.1 ³ä·ÖʹÓÃstring ²Ù×÷·û
1.2 ÑÛ»¨çÔÂÒµÄstring find º¯Êý
1.3 string insert, replace, erase 2 string ºÍ C·ç¸ñ×Ö·û´®
3 string ºÍ Charactor Traits
4 string ½¨Òé
5 С½á
6 ¸½Â¼Ç°ÑÔ: string µÄ½ÇÉ«
C++ ÓïÑÔÊǸöÊ®·ÖÓÅÐãµÄÓ ......

VC++³ÌÐòÔ±Ó¦µ±ÈçºÎÔĶÁADOÎĵµ

VC++³ÌÐòÔ±Ó¦µ±ÈçºÎÔĶÁADOÎĵµ
¡¶ADO API²Î¿¼¡·ÓÃVBµÄÓï·¨ÃèÊöÁËADO APIµÄÄÚÈÝ¡£µ«ADO³ÌÐòԱȴʹÓÃ×Ų»Í¬µÄ±à³ÌÓïÑÔ£¬±ÈÈçVB,VC++£¬VJ++¡£¶Ô´Ë¡¶ADO for VC++µÄÓï·¨Ë÷Òý¡·ÌṩÁË·ûºÏVC++Óï·¨¹æ·¶µÄÏêϸÃèÊö£¬°üÀ¨¹¦ÄÜ¡¢²ÎÊý¡¢Òì³£´¦ÀíµÈµÈ¡£
ADO»ùÓÚÈô¸ÉµÄCOM½è¿ÚʵÏÖ£¬Òò´ËËüµÄʹÓöÔÓÚÒ»¸öÕý½øÐÐCOM±à³ÌµÄ³ÌÐòÔ±¶øÑÔ¸ü ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ