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

VCµÄDLLÈç¹ûͨ¹ý²ÎÊýÏòVB´«Êý¾Ý£¿ - VB / »ù´¡Àà

ÎÒÕâÑùдµÄ.
VC DLL²¿·Ö
size_t *Ep2ReadLen;
extern "C" int _stdcall TestDLL(size_t* iPort2ReadLen)
{
Ep2ReadLen = iPort2ReadLen;
*Ep2ReadLen = 5; //͉˕
if (Ep2ReadLen)
{
free(Ep2ReadLen);
//Ep2ReadLen=NULL;
}

return 0;
}

VB²¿·Ö
Declare Function TestDLL Lib "XXX.dll" (ByRef iPort2ReadLen As Integer) As Integer
Dim iPort2ReadLen As Integer
rt = TestDLL(iPort2ReadLen)

±àÒëͨ¹ý£¬ÔËÐÐVB³ÌÐò£¬µ÷Óã¬ÄÜÕýÈ··µ»Ø5¡£µ«ÊÇÔڹرÕVB³ÌÐòʱ,±¨´í¡£
µ«ÔÚÉÏÃæµÄ *Ep2ReadLen = 5; ×¢Ê͵ôºó£¬¾Í²»±¨´íÁË¡£ËµÃ÷ÊÇÕâÐе¼Öµġ£
ÎÒÔø¿¼ÂÇÊDz»ÊÇVCÖ¸ÕëûÓÐÊÍ·Å£¬ËùÒÔ¼ÓÉÏ free(Ep2ReadLen);
µ«½á¹ûÈÔȻһÑù¡£
Çë½Ì¸÷룬´íÔÚÄÄÀ


¡¢¡¢¡¢¡¢¡¢¡¢¡¢¡¢¡¢¡¢¡¢¡¢¡¢¡¢¡¢¡¢¡¢

free(Ep2ReadLen);µÄÌí¼Ó²»ÊÇÎҵı¾Ò⣬×îÏÈÊÇûÓмÓÕâÐе쬵«×îÖչرÕVB³ÌÐò±¨´íºó£¬ÎÒÔö¼ÓÁËÕâÐУ¬½á¹ûÏàͬ¡£
ÎÒÔ­ÒÔΪÊÇûÓÐÊÍ·ÅÖ¸Õ룬µ¼Öµı¨´í£¬µ«ÏÖÔÚ¿´ºÃÏñÓÖ²»ÊÇ :(

VBºÃÏñûÓÐÖ¸Õ룿

¡¢¡¢¡¢¡¢¡¢¡¢¡¢¡¢¡¢¡¢¡¢¡¢¡¢¡¢¡¢¡¢¡¢

VBÖÐ
ÎÒÓÖÊÔÁËÒ»ÏÂ

²âÊÔÒ»£º

Dim iPort2ReadLen As Integer
Private Sub Command1_Click()  
  iPort2ReadLen = 34
  rt = TestDLL(iPort2ReadLen)
  MsgBox iPort2ReadLen
End Sub

iPort2ReadLen ×÷Ϊȫ¾Ö±äÁ¿£¬¹Ø±ÕVB´°Ìåʱ¡°±¨´í¡±¡£


²âÊÔ¶þ£º

Private Sub Command1_Click()  
  Dim iPort2ReadLen As Integer
 


Ïà¹ØÎÊ´ð£º

vbµÄÀàÖÐʹÓÃ×Ô¶¨ÒåÀàÐÍÊý¾ÝµÄÎÊÌâ - VB / »ù´¡Àà


ÎÒÔÚÀàÖÐÓÐÒ»¸öº¯Êý
Public Function DownloadAdditionalSite(SiteName As siteconfig, Directory As String, ymd As String) As Boolean
siteconfigÊÇÎÒ×Ô¶¨ÒåÀàÐ͵ÄÊý¾Ý£¬ÎªÊ²Ã´»áÌáʾ¡°Ö»ÓÐÔÚ¹«¹²¶ÔÏóÄ£¿éÖж ......

vb¶ÁÈ¡xml - VB / »ù´¡Àà

ÏÖÔÚÓиöxmlÎļþÊÇ<?xml version="1.0"?>
<?mso-application progid="Excel.Sheet"?>
<Workbook xmlns="urn:schemas-microsoft-com:office:spreadsheet"
 xm ......

VB µ÷ÓÃInet¿Ø¼þÏÂÔØ³ö´í - VB / ÍøÂç±à³Ì

¸÷λ¸ßÊÖ£¬Ð¡µÜ×î½üÅöµ½Ò»¸öÎÊÌ⣺ԭÏÈдµÄ³ÌÐò´ó¸ÅµÄ˼·ÊÇ£ºÊ×ÏÈwebbrowser´ò¿ªÍøÖ·£¬ÍøÖ·ÏÔʾºó£¬µã»÷ÍøÖ·ÉϵÄijһ¸öÁ¬½Ó£¬µ±webbrowser¼ì²âµ½ÍøÖ·ÒѾ­Á¬½Óµ½ÏëÒªµÄµØÖ·Ê±ºò¾Í¿ªÊ¼ÏÂÔØÎļþ£¬µ±ÓÃIE6µÄʱºòÏÂÔ ......

ÇóÖú£ºC´úÂë¸Äд³ÉVB´úÂë - VB / »ù´¡Àà

Ë­ÄܰïÎÒ°ÑÏÂÃæÕâЩ´úÂë¸Ä³ÉVBÐÎʽµÄ£¬¶àлÁË£¬¼±ÓÃ~~
#include "stdlib.h"
#include "math.h"
#include "stdio.h"
float objfx(float x[]);
void constraint(float x[],float g ......

ÇóÖú£ºC´úÂëchange toVB´úÂë - VB / »ù´¡Àà

ͦ·±Ëö£¬Ö®Ç°·¢µÄÌû×Ó£¬·Öֵ̫µÍÏÖÔÚÖØ·¢Ò»¸ö¡£»¶Ó­¸÷λ´óÏÀ~~
#include "stdlib.h"
#include "math.h"
#include "stdio.h"
float objfx(float x[]);
void constraint(float x[] ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ