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

ΪʲôCдDLLÎļþC¡¢PBÄܵ÷ÓÃVB²»Äܵ÷ÓÃ

ΪʲôCдµÄDLLÎļþC¡¢PBÄܵ÷ÓÃVB²»Äܵ÷Óã¿
VBÀïΪʲôÓеÄDLLÖ±½Óͨ¹ýÒýÓÿÉÒÔʹÓã¿ÓеÄÐèҪͨ¹ýdeclareÉêÃ÷Íⲿº¯Êý£¿ÕâЩDLLÓÐʲô²î±ð£¿

1¡¢ÎªÊ²Ã´PBÄÜͨ¹ýDECLAREÉùÃ÷¶øVB²»ÐУ¿
2¡¢Èç¹ûÕâ¸ödllÖеĺ¯ÊýÓÐÒýÓõ½±ðµÄdllÖеĺ¯Êý£¬ÊDz»ÊDZ»ÒýÓõĺ¯ÊýҲҪͨ¹ýdeclareÉùÃ÷ÆäÖб»ÒýÓõĺ¯Êý£¬²ÅÄÜʹÓÃ


¸Ðл2λ»Ø´ð£º»¹ÓÐһЩ¸ÅÄîºÜÄ£ºý
1¡¢Ê¹ÓÃdeclareºÍregsvr32×¢²ádllÓÐûÓÐʲô¹Øϵ£¿
  dll²»¾­¹ýregsvr32ÃüÁî×¢²áÄÜ·ñͨ¹ýdeclareÉùÃ÷ÆäÖеĺ¯Êý£¿
2¡¢regsvr32×¢²áÃüÁΪʲôע²áºódll\ocx¾ÍÄܱ»Ó¦Óᢸ½¼þ£¬regsvr32×¢²áʱϵͳ·¢ÉúÁËʲô±ä»¯£¿»¹ÓÐ×¢²á±íÀïCLSID¡¢createobjectº¯Êý´´½¨¶ÔÏó¡¢getobject»ñÈ¡¶ÔÏóÓÐʲô¹Øϵ

Ó²µÀÀí

ʧÃßÁË£¬Ã»ÓÐʲôµÀÀí~~~~~~~~~~~``

Á½ÖÖ²»Í¬µÄ dll ÀàÐÍ£º

COM dll µÄ½Ó¿Ú¶¨ÒåÔÚ TypeLib Info ÖУ¬±ØÐëͨ¹ý regsvr32 ½«¸ÃÐÅϢдÔÚ×¢²á±íÖУ¬È»ºó VB ²ÅÄÜͨ¹ýÒýÓþÍÄÜʹÓ᣸à dll µÄ·¾¶¼Ç¼ÔÚ×¢²á±íÖУ¬Ïàͬ dll µÄ¸±±¾Ö»ÒªÒ»¸öÊÇʵ¼Ê¿ÉÓõġ£

±ê×¼ dll µÄº¯ÊýÈë¿ÚÖ±½Ó¶¨ÒåÔÚ dll ÖУ¬±ØÐëÒªÓà Declare ÉùÃ÷¾ßÌåµÄº¯Êý¸ñʽ²ÅÄÜÕýÈ·µ÷Ó᣸à dll µÄλÖÃͨ¹ýËÑË÷·¾¶²éÕÒ£¬Èç¹ûʹÓÃÏà¶ÔĿ¼£¬Ïàͬ dll µÄ¸±±¾¿ÉÒԷֱ𱻲»Í¬µÄ exe ½øÐе÷Óá£

vbÊDz»ÊÇÖ»ÄÜдactivex dll£¨COM DLL£©£¿Äܲ»ÄÜд±ê×¼DLL? Äܲ»ÄÜÐ޸ĵ÷ÓÃÔ¼¶¨£¿ÔõôÐ޸ģ¿

¡°¸Ã dll µÄ·¾¶¼Ç¼ÔÚ×¢²á±íÖУ¬Ïàͬ dll µÄ¸±±¾Ö»ÒªÒ»¸öÊÇʵ¼Ê¿ÉÓõġ£¡±
ÊDz»ÊÇ¡°Ö»ÓÐÒ»¸öÊÇʵ¼Ê¿ÉÓõġ±

ÎÒÊÕ²ØÁËÒ»¸öÀà,¿Éµ÷ÓÃCDeclÓëStdCallµÄº¯Êý.

ÒÔÏ´úÂë´æΪcCallAPI.cls:
VB code



Code highlighting produced by Act


Ïà¹ØÎÊ´ð£º

eclipse3.5+cdt±àÒëcÓÐÎÊÌâ

±àÒëÆÕͨµÄcûÎÊÌâ°¡£¬µ«±àÒëjavahÉú³ÉµÄ¾Í±¨´í£º
gcc -O0 -g3 -Wall -c -fmessage-length=0 -oHelloWorld.o ..\HelloWorld.c
gcc -otest.exe HelloWorld.o
d:/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../. ......

µ¥Á´±íÎÊÌâ c¸ßÊÖÇë½ø

±àдһ¸ö³ÌÐòÓÃÁ´±íʵÏÖ£º½«Ò»¸öÉýÐòÕûÊýÊýÁеÄÖظ´Êý¾ÝÈ¥µô
±àºÃºó£¬½á¹û²»¶Ô°¡£¬ÇóÖúc¸ßÊÖ
#include <stdio.h>
#include <stdlib.h>
struct link
{
  int number;
  s ......

ΪʲôCÅÌÊ£ÓàµÄ¿Õ¼äºÜС

CÅÌ9G£¬ËãÁËһϸ÷ÖÖÎļþ°üÀ¨ÒþÐÎ×ܹ²²»µ½2G£¬¿ÉÊÇϵͳÏÔʾֻʣÓà1¸ö¶àG£¬ÎÒÒѾ­½«¸÷ÖÖÁÙʱÎļþ¶¼É¾³ýÁË£¬°üÀ¨´ÅÅÌÇåÀí£¬Ôõô»ØÊ£¿Ð»Ð»»Ø´ð
ʲôϵͳ£¿

ÐéÄâÄÚ´æÉèÖõ½ÆäËüÅÌ£»
¹Ø±Õϵͳ»¹Ô­£»
ɾ³ýÐ ......

CÖеÄ++£¬Çë°ïæ½âÊÍÒ»ÏÂ

int a=2;
int i;
        i=(a++)+(++a)+(a++)+(++a)+(a++);
    printf("%d",i);


½á¹ûÊÇ20£¬Çë½â¶Á



ÕâÒѾ­²»ÊÇÔ¾­ÌùÁË£¬Ë­Í³¼Æ¹ý½ñÌ ......

ÔÚc°æ¿éµÄÄãÃǶ¼´ÓÊÂʲô¹¤×÷?

ÎÒ¿´Ñ§Éú±È½Ï¶à...
¶îÊÇÒµÓàµÄ¡­¡­

żÊÇÒµÓàѧÉú

ÎÒ±¾À´ÏëѧcÇÖÈëʽѧϰ
¿É¾õµÃѧjavaÈÝÒ×Щ
ËùÒÔ¸ÄΪj2ee·½Ïò

¿´À´ÎҵĹÀ¼ÆÊÇ׼ȷµÄ, ÒòΪ´ó²¿·Ö¹¤×÷µÄÈ˶¼ÓÃc++»òÕßjava, .NETÖ®Àà...

c/php/p ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ