ActiveXDLL免注册VB调用的方法
阿国哥的代码(找到链接后再补上),我稍微改良了一下,做绿色软件的朋友肯定用的到。IDE下可以引用那个dll使用。编译后可以在未注册dll的计算机上正常工作了。
使用方法:
Dim pDll As Long '记录Dll,用来最后完美释放
Dim Update As Update.Handle '要实例化的对象
Set Update = LoadObjectByName(App.Path & "/Update.dll", "Handle", pDll) ' New Update.Handle
If Update Is Nothing Then Exit Sub
Update.Test '<--类中的方法
Set Update = Nothing '<-----这句不能少,否则会出现意外错误
UnLoadDll pDll '<----释放
模块中:
Option Explicit
Private Declare Function LoadLibrary Lib "kernel32" Alias "LoadLibraryW" (ByVal lpLibFileName As Long) As Long
Private Declare Function GetProcAddress Lib "kernel32" (ByVal hModule As Long, ByVal lpProcName As String) As Long
Private Declare Function FreeLibrary Lib "kernel32" (ByVal hLibModule As Long) As Long
Private Declare Function CallAsmCode Lib "user32" Alias "CallWindowProcW" (FirstAsmCode As Long, ByVal pA As Long, ByVal pB As Long, ByVal pC As Long, lpD As Long) As Long
Private Declare Sub CopyMemory Lib "kernel32" Alias "RtlMoveMemory" (Destination As Any, Source As Any, ByVal Length As Long)
Private AsmCode(94) As Long
Public Function LoadObjectByName(ByVal DllPath As String, ByVal ClsName As String, pDll As Long) As Object
Dim pObj As Long, TLIAPP As Object, TLI As Object
Dim CLSID As String, IID As String, IIDName As String
On Error GoTo Err
Set TLIAPP = CreateObject("TLI.TLIApplication")
Set TLI = TLIAPP.TypeLibInfoFromFile(DllPath)
IIDName = "_" & Trim(ClsName)
CLSID = TLI.GetTypeInfo(Trim(ClsName)).GUID
IID = TLI.GetTypeInfo(Trim(IIDName)).GUID
Set LoadObjectByName = LoadObjectByID(DllPath, CLSID, IID, pDll)
Set TLI = Nothing
Err:
End Function
Public Function LoadObjectByID(ByVal DllPath As String, ByVal CLSID As String, ByVal IID As String, pDll As Long) As Object
Dim pObj As Long
Call InitAsmCode
pObj = CallAsmCode(AsmCode(20), StrPtr(DllPath), StrPtr(CLSID), StrPtr(IID), pDll)
CopyMemory LoadObjectByID, pObj&, 4&
End Function
Public Function UnLoadDll(pDll As Long) As Long
Call InitAsmCode
UnLoadDll = CallAsmCode(AsmCode(79), pDll, 0, 0, 0)
End Function
Private Sub InitAsmCode()
If AsmCode(4) Then Exit Sub
Dim pDll As Long
pDll = LoadLibrary(StrPtr("kernel32"))
AsmCode(0) = GetProcAddress(pDll, "LoadLibraryW")
AsmCode(1) = GetProcAddress(pDll, "GetProcAddress")
AsmCode(2) = GetProcAddress(pDll, "FreeLibrary")
Call FreeLibrary(pDll)
AsmCode(4) = &H476C6C44
AsmCode(5) = &H6C437465
AsmCode(6) = &H4F737361
AsmCode(7) = &H63656A62
AsmCode(8) = &H4C430074
AsmCode(9) = &H46444953
AsmCode(10) = &H536D6F72
AsmCode(11) = &H6E697274
AsmCode(12) = &H10067
AsmCode(13) = &H0&
AsmCode(14) = &HC00000
AsmCode(15) = &H0&
AsmCode(16) = &H6F4600
AsmCode(17) = &H65006C
AsmCode(18) = &H320033
AsmCode(19) = &H0&
AsmCode(20) = &H83EC8B55 '创建对象函数入口
AsmCode(21) = &HE853D8C4
AsmCode(22) = &H0&
AsmCode(23) = &H6CEB815B
AsmCode(24) = &H8D100010
AsmCode(25) = &H105293
AsmCode(26) = &H93FF5210
AsmCode(27) = &H10001010
AsmCode(28) = &H32938D50
AsmCode(29) = &H52100010
AsmCode(30) = &H1493FF50
AsmCode(31) = &H8D100010
AsmCode(32) = &H101C93
AsmCode(33) = &HFF028910
AsmCode(34) = &H101893
AsmCode(35) = &H875FF10
AsmCode(36) = &H101093FF
AsmCode(37) = &HC00B1000
AsmCode(38) = &H86840F
AsmCode(39) = &H45890000
AsmCode(40) = &H20938DFC
AsmCode(41) = &H52100010
AsmCode(42) = &H1493FF50
AsmCode(43) = &HB100010
AsmCode(44) = &H506674C0
AsmCode(45) = &H52EC558D
AsmCode(46) = &HFF0C75FF
AsmCode(47) = &H101C93
AsmCode(48) = &H558D5810
AsmCode(49) = &H938D52D8
AsmCode(50) = &H10001042
AsmCode(51) = &HEC558D52
AsmCode(52) = &HBD0FF52
AsmCode(53) = &H8D3E75C0
AsmCode(54) = &HFF52DC55
AsmCode(55) = &H93FF1075
AsmCode(56) = &H1000101C
AsmCode(57) = &HD8558B50
AsmCode(58) = &H8D54128B
AsmCode(59) = &H6A50DC45
AsmCode(60) = &HD875FF00
AsmCode(61) = &HB0C52FF
AsmCode(62) = &H8B1575C0
AsmCode(63) = &H4D8BFC45
AsmCode(64) = &H59018914
AsmCode(65) = &H8BD18B51
AsmCode(66) = &H52FF5112
AsmCode(67) = &H14EB5804
AsmCode(68) = &HEB06EB58
AsmCode(69) = &HEB02EB0F
AsmCode(70) = &HFC75FF0B
AsmCode(71) = &H101893FF
AsmCode(72) = &HC0331000
AsmCode(73) = &H10C2C95B
AsmCode(74) = &H6C6C4400
AsmCode(75) = &H556E6143
AsmCode(76) = &H616F6C6E
AsmCode(77) = &H776F4E64
AsmCode(78) = &H0&
AsmCode(79) = &H53EC8B55 '尝试卸载DLL函数入口
AsmCode(80) = &HE8&
AsmCode(81) = &HEB815B00
AsmCode(82) = &H10001155
AsmCode(83) = &H1139938D
AsmCode(84) = &HFF521000
AsmCode(85) = &H93FF0875
AsmCode(86) = &H10001014
AsmCode(87) = &H1374C00B
AsmCode(88) = &HC00BD0FF
AsmCode(89) = &H75FF0E74
AsmCode(90) = &H1893FF08
AsmCode(91) = &H33100010
AsmCode(92) = &H4801EBC0
AsmCode(93) = &H10C2C95B
AsmCode(94) = &H90909000
End Sub
https://s2.loli.net/2023/10/15/XkLOvPe9DW45uAm.png
https://s2.loli.net/2023/10/15/iRDuKvyczgaIZn4.png
https://s2.loli.net/2023/10/15/5ZahJKqmHReBx87.png
https://s2.loli.net/2023/10/15/xNMREeGB8QCuyX1.png
https://s2.loli.net/2023/10/15/yEAwn7o2qmpDgPi.png
https://s2.loli.net/2023/10/15/yAjY5MpeBuHc4sa.png
https://s2.loli.net/2023/10/15/1fHF4opI3NCnXJY.png
https://s2.loli.net/2023/10/15/sSIkQnGgzVJu2ZE.png
https://s2.loli.net/2023/10/15/mxv9D7uo4FVNsWi.png
https://s2.loli.net/2023/10/15/oDjAP1RnbfyhIFM.png
https://s2.loli.net/2023/10/15/xgjfPpFcDrJ3Qw1.png
https://s2.loli.net/2023/10/15/38VcaFQnHEKqMCj.png
https://s2.loli.net/2023/10/15/zFSxdeA83GPYTRD.png
https://s2.loli.net/2023/10/15/Xgm4F8vYGUhIEBC.png
https://s2.loli.net/2023/10/15/Bs7GZuzwndy1xSg.png
https://s2.loli.net/2023/10/15/x4SrsthjvaHOdER.png
https://s2.loli.net/2023/10/15/OAenwlcKBDXsg48.png
https://s2.loli.net/2023/10/15/pIoBUAFPkYjK5Mf.png
https://s2.loli.net/2023/10/15/RqvSYoXus8D1wcj.png
https://s2.loli.net/2023/10/15/MKmXcZpndPxLR24.png
https://s2.loli.net/2023/10/15/25bAlW8eIEmit6X.png
https://s2.loli.net/2023/10/15/RQoq2idAsWnHlc5.png
https://s2.loli.net/2023/10/15/G9KsiVD4Fho5Tmj.png
https://s2.loli.net/2023/10/15/tZQDSgAHXW62zJI.png
https://s2.loli.net/2023/10/15/i8TB9XKJP54qQFW.png
https://s2.loli.net/2023/10/15/ms3YL8cxTSUtCDr.png
https://s2.loli.net/2023/10/15/aCgNdtbVRnBqrvs.png
https://s2.loli.net/2023/10/15/GISswzgANyxXfFH.png
https://s2.loli.net/2023/10/15/Krpkty6Lz7xqNaM.png
https://s2.loli.net/2023/10/15/VyZ2wLXkWo1Kb3A.png
https://s2.loli.net/2023/10/15/e5djtl6HnK4GfpZ.png
https://s2.loli.net/2023/10/15/D53fjArmQ86b94Y.png
https://s2.loli.net/2023/10/15/vx97KhNbqGacgw8.png
https://3o.hk/images/2023/10/16/73695364_202310150858500908143473.png
https://3o.hk/images/2023/10/16/73695364_202310150859030924145795.png
https://3o.hk/images/2023/10/16/73695364_202310150859160440405406.png
https://3o.hk/images/2023/10/16/73695364_202310150859280643668185.png
https://3o.hk/images/2023/10/16/73695364_202310150859390580477375.png
https://3o.hk/images/2023/10/16/73695364_202310150859510408729317.png
https://3o.hk/images/2023/10/16/73695364_202310150905040018243571.png
https://3o.hk/images/2023/10/16/73695364_202310150905140315736450.png
https://3o.hk/images/2023/10/16/73695364_202310150905230783927963.png
https://3o.hk/images/2023/10/16/73695364_202310150905340611656678.png
https://3o.hk/images/2023/10/16/73695364_202310150905440268736605.png
https://3o.hk/images/2023/10/16/73695364_202310150905540486259089.png
https://3o.hk/images/2023/10/16/73695364_202310150919410283764841.png
https://3o.hk/images/2023/10/16/73695364_202310150919520830234633.png
https://3o.hk/images/2023/10/16/73695364_202310150920030643203181.png
https://3o.hk/images/2023/10/16/73695364_202310150920130627154929.png
https://3o.hk/images/2023/10/16/73695364_202310150920230096356611.png
https://3o.hk/images/2023/10/16/73695364_202310150920320908786921.png
https://3o.hk/images/2023/10/16/73695364_202310150924320502106318.png
https://3o.hk/images/2023/10/16/73695364_202310150924420721994835.png
https://3o.hk/images/2023/10/16/73695364_202310150924550518548028.png
https://3o.hk/images/2023/10/16/73695364_202310150925090580930576.png
https://3o.hk/images/2023/10/16/73695364_202310150925190456482383.png
https://3o.hk/images/2023/10/16/73695364_202310150925300346694108.png
https://3o.hk/images/2023/10/16/73695364_202310150929290862295186.png
https://3o.hk/images/2023/10/16/73695364_202310150929390971857832.png
https://3o.hk/images/2023/10/16/73695364_202310150929500471220039.png
https://3o.hk/images/2023/10/16/73695364_202310150930000424451139.png
https://3o.hk/images/2023/10/16/73695364_202310150930100377284549.png
https://3o.hk/images/2023/10/16/73695364_202310150930200456163384.png
https://3o.hk/images/2023/10/16/73695364_202310150933510908958742.png
https://3o.hk/images/2023/10/16/73695364_202310150934010924491575.png
https://3o.hk/images/2023/10/16/73695364_202310150934110377862246.png
https://www.yxkfw.com/data/attachment/forum/202310/17/143634bvixsyyyf4s7svxo.png
https://www.yxkfw.com/data/attachment/forum/202310/17/143638vhy1ww00jxq13w13.png
https://www.yxkfw.com/data/attachment/forum/202310/17/143642q44q880vv81vuv8v.png
https://www.yxkfw.com/data/attachment/forum/202310/17/143645p8xw6bs0lg811suw.png
https://www.yxkfw.com/data/attachment/forum/202310/17/143648offvdnlloes4cdpc.png
https://www.yxkfw.com/data/attachment/forum/202310/17/143652u5gr5i5fm4irqco4.png
https://www.yxkfw.com/data/attachment/forum/202310/17/143658fogqxxsgw9ezej9y.png
https://www.yxkfw.com/data/attachment/forum/202310/17/143701o7fhfnhf00e0eyez.png
https://www.yxkfw.com/data/attachment/forum/202310/17/143704hm5dzip565pdiwow.png
https://www.yxkfw.com/data/attachment/forum/202310/17/143709ryb5e3bf3bhm87yi.png
https://www.yxkfw.com/data/attachment/forum/202310/17/143712ec6hkuhn4eolxx9a.png
https://www.yxkfw.com/data/attachment/forum/202310/17/143715yaf7yffy0g97hchn.png
https://www.yxkfw.com/data/attachment/forum/202310/17/144252w115b1t1u6vtzee1.png
https://www.yxkfw.com/data/attachment/forum/202310/17/144255j8i0181n8z00n1u8.png
https://www.yxkfw.com/data/attachment/forum/202310/17/144258t66s2qaglslqntql.png
https://www.yxkfw.com/data/attachment/forum/202310/17/144302knp5pnin0bpztzpp.png
https://www.yxkfw.com/data/attachment/forum/202310/17/144305pfx5vkkv85k56u88.png
https://www.yxkfw.com/data/attachment/forum/202310/17/144308x9gf2ajo643c7qb2.png
https://www.yxkfw.com/data/attachment/forum/202310/17/144313ujisia08ihlec8el.png
https://www.yxkfw.com/data/attachment/forum/202310/17/144316j8rlvqiy87kplfi8.png
https://www.yxkfw.com/data/attachment/forum/202310/17/144320cvipivttmttctqc9.png
https://www.yxkfw.com/data/attachment/forum/202310/17/144324v0jkz7zqeke7mzqq.png
https://www.yxkfw.com/data/attachment/forum/202310/17/144327zzwoos4q0wuuc0fo.png
https://www.yxkfw.com/data/attachment/forum/202310/17/144329qbrs34rstrvnzted.png
https://www.yxkfw.com/data/attachment/forum/202310/17/144710z3pppr1wxpqpcpsc.png
https://www.yxkfw.com/data/attachment/forum/202310/17/144713f82oibzgg8srtr5o.png
https://www.yxkfw.com/data/attachment/forum/202310/17/144719vuc1fbflc00jz19f.png
https://www.yxkfw.com/data/attachment/forum/202310/17/144725lav8tigylv2mza8i.png
https://www.yxkfw.com/data/attachment/forum/202310/17/144728kshjgrr0hksm6yym.png
https://www.yxkfw.com/data/attachment/forum/202310/17/144732bsbttyqvk1ft3buq.png
https://www.yxkfw.com/data/attachment/forum/202310/17/144738br7gb958trg7kgtc.png
https://www.yxkfw.com/data/attachment/forum/202310/17/144741pggggg3mkg0ytp83.png
https://www.yxkfw.com/data/attachment/forum/202310/17/144746osdsbz92mmc5dd8c.png
{2023年10月01日}2023冬季,全球 崩 盘,三 峡 溃 坝
{2023年10月01曰}2023冬季,全球 崩 盘,三 峡 溃 坝
作者 : 薛桦镰
时间:2023年10月01曰 О8:49:57 星期曰 农历八月十七
上正宗指 3110.48点 恒指 17809.66点 道指33507.50点
囯际音乐节 囯际老人节
突然的,全球 金 融 市 场 连 续 跌 停 大 崩 盘,
没有什么,谁也没想到啊,友邦惊诧,黑 天 鹅 白天鹅 哥斯拉,
一切都是,蓄 谋 已 久 的精心策划。zéi 喊捉zéi。
{一} 今时今曰{癸卯2023年10月01曰 } :
今时今曰,我预.测,人类有始.以来最大的金.融.崩 盘 ,未来三个月
之内,即,2023年11月、12月、2024年元月,将 震 撼呈 现。
---- 中卝囯股市、全球股市、全球金融市场 连序跌婷大崩 盘 , 大盘连
续或稍稍间断30/40多个跌亭板,人类有.史以来最大的金融.嗨啸。
股市、汇市、债市、期货商品、可能还有楼卝市,全部连卝锁式彻底崩溃。
黄 金 价 格 应 该 避 险 bào 涨。
忽 然 之 间 ,天 塌 了。{ 全 球 闪 崩 }
十 八 级 金融大 地.震,史无前例地球崩卝盘,要 多 惨 有 多惨,世界沫曰。
金融天坑,股市雪崩、铡 dāo 斩 首 、bào 雷 溃 坝 ,希 特 勒 巴巴罗萨
金融闪击战 。画 皮 ,终 于 撕 去 了 。
最热的天气,最冷的人心。
道琼斯,憋了14年的一泡shǐ{⑥440.О8},2023冬季,总算找到了,公共厕所。
缠中说禅17年之前预卝言的,2019毁miè性下跌。{有四年误差}
已故“周期天王”周金涛的,“2018年到2019年是康波周期的万卝劫卝不卝复之年”。
以金.融战.争为表现形式的,第 叁 次.世.戒.大.战,全面 bào.发。
---- 一切友好互访探讨分歧,新型大囯关
页:
[1]