CrDllObj.cls
资源名称:IE_VB.rar [点击查看]
上传用户:davilee3
上传日期:2015-04-22
资源大小:986k
文件大小:2k
源码类别:
浏览器
开发平台:
Visual Basic
- VERSION 1.0 CLASS
- BEGIN
- MultiUse = -1 'True
- Persistable = 0 'NotPersistable
- DataBindingBehavior = 0 'vbNone
- DataSourceBehavior = 0 'vbNone
- MTSTransactionMode = 0 'NotAnMTSObject
- END
- Attribute VB_Name = "cCrDllObj"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = True
- Attribute VB_PredeclaredId = False
- Attribute VB_Exposed = False
- '---------------------------------------------------------------------------------------
- ' Module : cCrDllObj
- ' DateTime : 2005-4-8 00:42
- ' Author : Lingll
- ' Purpose :
- '---------------------------------------------------------------------------------------
- ' References:
- ' VBoostTypes6.olb (VBoost Object Types (6.0))
- ' ObjCreate.olb (VBoost: Object Creation and Security)
- Option Explicit
- Private m_strCLSID As String
- Dim Clsid_DllObject As CLSID
- Dim m_hModMydll&
- Public Sub IniClsId(vStrId$)
- Call UnloadDll
- m_strCLSID = vStrId
- End Sub
- Public Function CreateMyDllObject(RelPath As String) As Object
- Dim pCF As objcreate.IClassFactory
- If m_hModMydll = 0 Then
- Clsid_DllObject = GUIDFromString(m_strCLSID)
- Set pCF = GetDllClassObject(RelPath, _
- Clsid_DllObject, m_hModMydll)
- Else
- Set pCF = GetDllClassObject(vbNullString, Clsid_DllObject, m_hModMydll)
- End If
- Set CreateMyDllObject = pCF.CreateInstance(Nothing, IID_IUnknown_vbb)
- End Function
- Public Sub UnloadDll()
- TestUnloadDll m_hModMydll
- End Sub
- Private Sub Class_Terminate()
- Call UnloadDll
- End Sub