VB,C#ʹÓÃVCµÄ.libºÍ.hÎļþ
——————————————————————————————————
ÔÚc#ÖÐÈçºÎʹÓÃÒÔÇ°c++µÄ.lib¿âºÍ.hÍ·Îļþ
zhujiang_1977£¨Öì½£©
ÎÒÔø¾Óöµ½¹ýÀàËƵÄÎÊÌ⣬ÎҵĽâ¾ö·½·¨ÊÇ£¬ÓÃVC½«“ÒÔÇ°c++µÄ.lib¿âºÍ.hÍ·Îļþ”±àÒë³ÉCOM£¬ÔÙÔÚC#ÖÐʹÓ㬽á¹ûÊǹ¦ÄÜÉÏ´óÌ嶼¿ÉÒÔʵÏÖ£¬µ«ÊÇËÙ¶ÈÉÏÉÔ΢ÓÐЩÂý¡£
fa2002£¨·çÏèÍòÀ
ÎÒд¹ý2¸öVCµÄ½Ó¿ÚÁ¬½Ó³ÌÐò£¬Ã»COMʲôÊ£¬ÎÒ½¨ÒéÄãµ½MSDNÖÐÑ°ÕÒ"·âËÍ´¦Àí" ¿´¿´MSµÄ½¨Òé·½·¨ÔÙ˵¡£
zeaing£¨£©
ÄãµÄÎÊÌâÊǸöºÜ´óµÄÎÊÌ⣬ǣÉæµ½´úÂëµÄÖØÓá¢COM DLLµÄÖØÓá¢Win32 API DLLµÄÖØÓ㬵ȵȡ£Ö»ÄܸøÄãһЩ½¨Ò飺
1£©´úÂ뼶ÖØÓÃÊÇ×ö²»µ½µÄ¡£C++µÄ´úÂë²»ÄÜÖ±½ÓÓÃÔÚC#ÖС£
2£©ÄãÌáµ½Á˺ܶàÏÖÓеÄÀà¿â£¬ÀýÈçOpenGL¡¢DirectXµÈµÈ¡£ÕâЩÀà¿â£¬¶¼ÊÇÒÔDLLÐÎʽ³öÏֵģ¬ÒªÃ´ÊÇWin32 API DLL£¬ÒªÃ´ÊÇCOM DLL¡£ÎÞÂÛÊÇÄÄÒ»ÖÖ£¬¶¼¿ÉÒÔÔÚC#ÀïÃæͨ¹ýInteroperationÖØÓá£ÍøÉÏÓкܶàDLLImportºÍCOM InteropµÄÀý×ÓºÍÎĵµ¡£
3£©Èç¹ûÐèÒªÖØÓÃ.libºÍ.h£¬¾ÍÐèÒªÇø±ðÇé¿ö¶Ô´ý¡£Èç¹û.libÊÇ´¿´âµÄAPIº¯Êý¿â£¬ÄÇ¿ÉÒÔ°Ñ.libºÍ.h±àÒë³É.dll£¬¾Í¿ÉÒÔÔÚC#ÀïÃæͨ¹ýDLLImportÀ´ÖØÓá£Èç¹û.libºÍ.hÀïÃæÓÐ×Ô¶¨µÄÀ࣬¾Í±È½ÏÂé·³£¬×îºÃÊÇ°ÑÔ´Âë¿Ù³öÀ´£¨Èç¹ûûÓÐÔ´Â룬¾Í×Ô¼ºÔÙÔÚÍâÃæ°üÒ»²ã×Ô¼ºµÄÀࣩ£¬È»ºóÓÃCOMµÄ·½·¨ÖØаüװһϣ¬ÔÙ±àÒë³ÉDLL£¬ÕâÑù¾Í¿ÉÒÔÔÚC#ÀïÃæÓÃCOM InteropÀ´ÖØÓá£
unmanaged codeÊÇÒ»¸öºÜ´óºÜ´óµÄ»°Ì⣬½¨ÒéÄãÂýÂýÌå»áÂýÂý×êÑУ¬Ç°Ãæzhujiang_1977, fa2002ºÍ Muf¸øµÄ½¨Ò鶼ºÜÓвο¼¼ÛÖµ¡£Ö»ÓжÔWin32 API DLL¡¢COMÒÔ¼°.NETÖеÄInteroperation¶¼ÒѾÊìϤÁË£¬²ÅÄÜÈÚ»á¹áͨµÄ´¦Àí´úÂëÖØÓõÄÎÊÌâ¡£Ò»¿ÚÊdzԲ»Ï´óÅÖ×ӵġ£
Çë½ÌC++DLLµÄÎÊÌ⣬ÎÒÓÐÒ»¸ö.hºÍ.libÎļþ£¬ÇëÎÊÄÜÉú³ÉDLLÎļþÂð£¿
popy007£¨Twinsen£©
½¨Á¢Ò»¸öDLLµÄ¹¤³Ì£¬°Ñ.hºÍ.libÎļþµ¼Èë½ø¹¤³Ì£¬È»ºóÄ㽨Á¢Ò»Ð©×Ô¼ºµÄ·½·¨£¬Ã¿Ò»¸ö·½·¨ºÍ.hºÍ.libÖеÄÒ»¸ö·½·¨¶ÔÓ¦£¬²¢°Ñÿһ¸öºóÕß·â×°µ½Ò»¸ö¶ÔÓ¦µÄÇ°Õß¡£×îºó£¬µ¼³öDLLºó£¬Äã¿ÉÒÔʹÓÃ×Ô¼º±àдµÄ·½·¨£¬¶øÕâ·½·¨·â×°µÄ¶¼Ê
Ïà¹ØÎĵµ£º
1 ʾÀýxmlÎļþ model.xml
<?xml version="1.0" encoding="utf-8" ?>
<DrRoot>
<SiteName>xml²Ù×÷ʾÀý</SiteName>
<SiteUrl>www.abc.com.cn</SiteUrl>
.net¿ªÔ´ÂÛ̳
<SiteKeyWord>xml²Ù×÷ʾÀý</SiteKeyWord>
<FileType>gif|jpg| ......
Private Declare Function OpenThread Lib "kernel32" (ByVal dwDesiredAccess As Long, ByVal bInheritHandle As Long, ByVal dwThreadId As Long) As Long
Private Const THREAD_ALL_ACCESS = &H1F03FF
OpenThread(THREAD_ALL_ACCESS, 1, Ïß³ÌID) 'ÓÉÏß³ÌIDÈ¡µÃÏ߳̾ä±ú,·µ»ØÏß³Ì¾ä± ......
http://www.Experts-Exchange.com: ·Ç³£ºÃµÄÎÊÌâ ÌÖÂÛÇø£¬¸ßÊÖÊý²»¾¡£¬¶øÇÒÕâÀïµÄÈ˺ÜÓÐרҵ¾«Éñ£¬²»»áÌÖÂÛһЩºÍ³ÌÐòÎÞ¹ØÓÖÎÞÁĵÄÎÊÌâ¡£²»¹ýÏëÒª±ðÈË°ïÄã ½â¾öÎÊÌ⣬×Ô¼ºÒ²ÒªÓÐÕæ³ÏµÄ̬¶È¡£
http://www.Codeguru.com/vb: ÓÐÃûµÄÔ´ÂëÌÖÂÛÕ¾ µã£¬ÌصãÊÇÔÚÿ¸öÔ´ÂëÏÂÃ涼¿ÉÒÔ¸úÌûÌÖÂÛ¡£
http://www.planet-source-code.co ......
Option Explicit
Public Function ascii2Char(strInput As String) As String
Dim i As Integer
Dim strTemp As String
Dim nPos As Integer
Dim nValue As Integer
i = 1
nPos = InStr(i, strInput, "&#", vbTextCompare)
While (nPos > 0)
ascii2Char = ascii2Char + Left(st ......
http://topic.csdn.net/t/20030306/11/1497896.html#
¹¤³ÌÎļþÃû£ºChdsp.vbp
Type=Exe
Reference=*\G{00020430-0000-0000-C000-000000000046}#2.0#0#..\PWIN95\SYSTEM\\STDOLE2.TLB#OLE Automation
Module=Module1; ChDsp.bas
Form=ChDsp.frm
Startup="Form1"
He ......