???? ID: 326651 - ????? ???????: 04 ?????? 2010 - ??????: 2.0
?????? ??? ?? ??? Visual Basic 2005 ?? Visual Basic .NET ??? ??-???? ??????? ?? ???????? ???? ?? ?? ActiveX ?????????? ?? ?????? ?? ??? ???? ????
?????? ?????? This article applies to a different operating system than the one you are using. Article content that may not be relevant to you is disabled.
?? ??? ?? ??? ???? ????? ???? ?? ?? ???? ?? ??-???? ??????? ??? Visual Basic 2005 ?? Visual Basic .NET ??? ?????? ??? ?? ???? ?? ?? ActiveX ???????? ?? ???????? ??? ?? ????? ?? ???? Visual Basic ??????? 6, ??? ?? ???????? ??? ?? ???? ???? ??????? ??????? ?????? ?? ????? ??
Licenses.Add() ?????? ??? ???? ?? ???? ??? ???? ??????? ?? ???
License.Add() ???? Visual ??? ?????? 6 ????? ?? ???? ?? "??????" ????
Visual Basic .NET ??? ?? Visual Basic 2005 ???, ?? ??????? ?????? ????? ??? ???????? ??? ??????? ??????? ?????? ???? ?????? ???
?? ???? ????? ?? ?? ??-???? ??????? ?? ???????? ?? ?? ???????? MyProject.OCX ??? ?? ?? MyLicensedControl ??? ??? MyProject.OCX ?? C:\Windows\System32 ??? ????? ???
??? ????? ??? .NET ?? Visual Basic 2005 ????????? ?????????? ????,??????? ?? ????? ????,??? ????????? ?? ????? ????,Microsoft Visual Studio .NET ??,Microsoft Visual Studio 2005 ?? ????-????? ????, ?? ???? ???Microsoft Visual Studio .NET ??,Microsoft Visual Studio 2005 . ????? ???????? ???? ??,??? ?? ????-????? ????, ?? ???? ???????????? . ???????? ????????? ????? ????? ???, ????? ????Visual Basic ????????? ?? ???????????????? ?????? ????? ????,Windows ????????? ?? ??????????????? ?? ????-????? ????, ?? ???? ???OK .???: Visual Studio 2005, ??? ????? ????Visual Basic ?? ???????????????? ?????? . ActiveX ?????? Assemblies ?????????? ????,??????? ?? ????? ????,??? ????????? ?? ????? ????,Microsoft Visual Studio .NET ??,Microsoft Visual Studio 2005 ?? ????? ????,????? Studio .NET ????? ??,????? Studio 2005 ????? ?? ????-????? ????, ?? ???? ???????? Studio .NET ????? ????????? ??,????? Studio 2005 ????? ????????? . ????? ?? ??? ?? ?????? assemblies ?? ???? ?????, ?? ????? ??????? ???? ????:aximp /out:C:\temp\AxMyProject.dll "C:\Windows\System32\MyProject.ocx"
AxMyProject.dll AxHost Interop ?? ??? ???MyProject.dll COM Interop ?? ??? ??? ?????? ??? ?? ???????? ?????????? ????????????? ???? ??,?????? ?????? . ????? ????,??????? , ?? ???? ??? ???? ?????? ??? ???? ?? ActiveX ???????? Interop assemblies ?? ??? ???? (?? ??? ???? ????? C:\Temp)? AxMyProject.dll ?? MyProject.dll ??????; ?? ??????? ?? ?????? ???????? ?????? ??????? ??? ?? ?????? ????? ????? ?????? ????????? ???? ?? ??? ???????? ??? ?? ??? ?????? ?? ??? ??? ?? ???-????? ??????? ????? ????? ???? ?????? ??? ???????? ????? ????? ???? ???? ?? ???, ????? ??? ???????:
Dim myControl As New AxMyProject.AxMyLicensedControl()
?? AxHost ?? ?????? ?? ???????? ?? ?? ?? ??????? ????? ??????: : ???? ??? COM (??? MyProject.MyLicensedControl), ?? ?????? ?? ???????? ?? ?? ?? ??????? ??????? ?? ??????? ?? ??? ???? ?????, ?? ?? ????? ?? ??????? ???? ???? ?? ????? ???????? ?? ??? ??????? ?? ?????????????? ???? ?? ???????? ?? ??? ??-???? ??????? ????? ?? ??? ????? ?? ???MyLicensedControl , ??????? ????? ?? "gnvlslnjskvlmlgnnimh" ??? ???????? ????? ????? ???? ???? ?? ???, ???? ??? ?? ????? ??? ????????? ??? ??? ?? AxMyProject.AxMyLicensedControl() ??? myControl :
Dim f As System.Reflection.FieldInfo
f = GetType(AxHost).GetField("licenseKey", _
Reflection.BindingFlags.NonPublic _
Or Reflection.BindingFlags.Instance)
f.SetValue(myControl, "gnvlslnjskvlmlgnnimh")
?? ??? ??-???? ??????? ??? ???????? ???????? ???? ??? ?? ?? ??????? ?? ????? ??FieldInfo , ?? ??? ??? ?? ??? ??OCXState . ?? ??? ??? ActiveX ???????? ?? ??????? ??????? ?? ??? ??? ??? ??????? ?? ?????? ???, ?? ??? ???? ?????licenseKey ?? ?? ??? ?? ??????myControl . ?? ?? ??-???? ??????? ?? ??? ?????? ??? ActiveX ???????? ?? ???????? ???????? ?? ??? ?? ??? ???? ???? ?????? ??????? ???????? ???????????? ???????? ?????? ???? ?? ??? ???????? ?????, ?? ???? ??? ???????? ??????? ??? ???? ?? ???, ?? ????? ??? ?? ????? ?? ???? ???:
Controls.Add(myControl)
myControl.Show()
?? ??? ??? ?????????? ????? ????? ???? ????, "f.SetValue (myControl,"gnvlslnjskvlmlgnnimh")" ?? ???, ?? "?? ?????? ????" ?????? ?? ????????: : ??? ??????? ???????? ??? ???? ????? ??? ?? ?? ??????? ?? ???????? ??, ??Controls.Add ???? ?? ??????Controls.Add ??? ?? ?????? ?? ??????? ?? ??????? ?? ????? ??? ?? ?? ?? ?????? ???? ?? ?????Controls.Add , ?? ???? ??? ??? ????? ?????? ?????:'System.ComponentModel.LicenseException' ??? ???????? ??????? system.windows.forms.dll ?? ?? ?????? ?? ??? ????? unhandled: ?? ?? ActiveX ???????? ?? ????? ???? ?? ??? ??? ??????? ???? ???
??, ????? ??? ?? ?? ????? ???? ?????? ????? ??? ???? ???:???? ????????? ??? unhandled ????? ??????? ???? ???? ??? ?? ActiveX ???????? ?? ????? ???? ?? ??? ??? ??????? ???? ???
????????? ?? ????? ?? ??? F5 ?????.. ??????? ?? ???? ActiveX ???????? ?? ?????? ?? ??? ??? ????? ????? ?????? ???????????????? : ?? ???????? ?? ???? ??? ????? ?? ????? ???:
???????? ActiveX ?? ???????? ???????? ?? ??? ??????? ?????? ?????? ???????? ?? ?? ??-???? ??????? ?? ???????? ??? ?????? ?? ???, ??? ?? ????? ?? ??? ????? ??????MyLicensedControl , ?????? ?? ??? ??????? ?? ?????? ?? ???? ????????? ???? ?? ???? ???????? ?? ??? ??? ??????? ????? ??? ??? ??????? ????? ???????? ???????? ?? ??? ??????? ??:????? ?? ???????? ???? ?? ???? ??? ???????? ??????? ?? ??? Microsoft ???????? ??? ???? ????? ?? ??? ????? ???? ?????? ?? ????? ????:151771
(http://support.microsoft.com/kb/151771/EN-US/
)
LICREQST.EXE ?? ???????? ??? ?? ?? ??????? ????? ?? ?????? ?? ??? ??
???????? ??? ??, ?? ????? ?? ???? ???Licenses.Add ???????? ?? ??? Visual Basic 6 ??? ????????? ??? ??????? ?? ?? ???? ???????? ???Licenses.Add ??-???? ???? ??????? ?? it ?? ???????? ?? ??? ??? ????? ???; ?? ????? ?? ?? ???? ???Debug.print ??????? ????? ??????? ????? ???????? ??????? ?? ??? ?????? ?? Microsoft ???????? ??? ????? ?? ??? ????? ???? ???????? ?? ????? ????:
241126
(http://support.microsoft.com/kb/241126/EN-US/
)
?????: ?????? ??? ?? UserControls ??-???? ??????? ?????? ?? ?????
188577
(http://support.microsoft.com/kb/188577/EN-US/
)
HOWTO: ???? ?? ??????? ?????? ????? ????
190670
(http://support.microsoft.com/kb/190670/EN-US/
)
HOWTO: ?????? ??? ?? ????? ???????? ???? ?? ??? Visual Basic 6.0 ?? ??? ??? ???????
???? ???? ???? ??: Microsoft Visual Basic 2005 Microsoft Visual Basic .NET 2003 Standard Edition Microsoft Visual Basic .NET 2002 Standard Edition kbvs2005swept kbvs2005applies kbhowtomaster kbmt KB326651 KbMthi
???? ?????? ???????? ??????????: ?? ???? ?? ???? ??????? ?? ????? ?? Microsoft ????-?????? ?????????? ?????? ?????? ???? ??? ??. Microsoft ???? ??? ????-???????? ?? ????-???????? ????? ?????? ?? ???? ???????? ???? ?? ???? ????? ????? ??? ?? ??? ?????? ?? ???? ???? ???? ??? ????? ??. ???????, ????-???????? ???? ????? ???? ???? ???? ???. ?????, ????????, ?????-???? ?? ??????? ?? ???????? ?? ???? ???, ???? ?? ??? ?????? ???? ???? ??? ????? ??? ?? ???? ??. Microsoft ??????? ??? ???? ?? ?????? ?? ??????????, ????????? ?? ??? ?????? ?? ???? ????? ?? ???? ???????? ?? ??? ???? ????? ?? ??? ????????? ???? ??. Microsoft ????-?????? ?????????? ?? ????? ?????? ?? ?? ??? ??.
?????????? ?? ??????? ????????? ??????? ??:
326651
(http://support.microsoft.com/kb/326651/en-us/
)
Was this information helpful?
How much effort did you personally put forth to use this article?
Tell us why and what can we do to improve this information
Thank you! Your feedback is used to help us improve our support content. For more assistance options, please visit the
Help and Support Home Page .
???? ?????? ???? ?????? ??????
??????
??? ?????? ??????? ????
???? ??????