Custom OCX; License not found
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Page 1 of 2 12 LastLast
Results 1 to 15 of 20

Thread: Custom OCX; License not found

  1. #1
    Join Date
    Oct 2012
    Posts
    10

    Question Custom OCX; License not found

    We have a few VB6 applications that use an OCX that we developed. We setup a new XP build machine for all our projects. On this new XP build machine, the projects that use one of our OCX won't compile and give us the error "Cannot load control {control_name}; license not found.". We have tried the registry fix provided by Microsoft with no change.

    The OCX is our own project that references the following:

    {831FDD16-0C5C-11D2-A9FC-0000F8754DA1}, MSCOMCTL.OCX
    {662901FC-6951-4854-9EB2-D9A2570F2B2E}, WINHTTP.DLL
    {EAB22AC0-30C1-11CF-A7EB-0000C05BAE0B}, IEFRAME.DLL
    {F5078F18-C551-11D3-89B9-0000F81FE221}, MSXML6.DLL
    {00020430-0000-0000-C000-000000000046}, STDOLE2.TLB

    How do we fix this? We are out of ideas to get past this.

  2. #2
    Join Date
    Jan 2006
    Location
    Chicago, IL
    Posts
    14,982

    Re: Custom OCX; License not found

    I don't think you developed MSCOMCTL.OCX, unless you over-wrote it (with a different key)
    David

    CodeGuru Article: Bound Controls are Evil-VB6
    2013 Samples: MS CODE Samples

    CodeGuru Reviewer
    2006 Dell CSP
    2006, 2007 & 2008 MVP Visual Basic
    If your question has been answered satisfactorily, and it has been helpful, then, please, Rate this Post!

  3. #3
    Join Date
    Oct 2012
    Posts
    10

    Re: Custom OCX; License not found

    The OCX is our own project that references the following:

    {831FDD16-0C5C-11D2-A9FC-0000F8754DA1}, MSCOMCTL.OCX
    {662901FC-6951-4854-9EB2-D9A2570F2B2E}, WINHTTP.DLL
    {EAB22AC0-30C1-11CF-A7EB-0000C05BAE0B}, IEFRAME.DLL
    {F5078F18-C551-11D3-89B9-0000F81FE221}, MSXML6.DLL
    {00020430-0000-0000-C000-000000000046}, STDOLE2.TLB

  4. #4
    Join Date
    Jan 2006
    Location
    Chicago, IL
    Posts
    14,982

    Re: Custom OCX; License not found

    Those all work under XP. What is YOUR OCX, and the key?
    David

    CodeGuru Article: Bound Controls are Evil-VB6
    2013 Samples: MS CODE Samples

    CodeGuru Reviewer
    2006 Dell CSP
    2006, 2007 & 2008 MVP Visual Basic
    If your question has been answered satisfactorily, and it has been helpful, then, please, Rate this Post!

  5. #5
    Join Date
    Oct 2012
    Posts
    10

    Re: Custom OCX; License not found

    Quote Originally Posted by dglienna View Post
    Those all work under XP. What is YOUR OCX, and the key?
    Our custom control used on the form is:
    {4791C3B3-6C6F-422A-900A-00978799AAF2}

    The OCX is:
    {ECFB0155-4F7E-4E4A-B89E-5204BD830E4A}

  6. #6
    Join Date
    Jan 2006
    Location
    Chicago, IL
    Posts
    14,982

    Re: Custom OCX; License not found

    Post the code used IN the controls, and maybe something will stand out.
    David

    CodeGuru Article: Bound Controls are Evil-VB6
    2013 Samples: MS CODE Samples

    CodeGuru Reviewer
    2006 Dell CSP
    2006, 2007 & 2008 MVP Visual Basic
    If your question has been answered satisfactorily, and it has been helpful, then, please, Rate this Post!

  7. #7
    Join Date
    Jul 2001
    Location
    Sunny South Africa
    Posts
    11,091

    Re: Custom OCX; License not found

    Did you register this control on the system by using RegSvr32 ?

  8. #8
    Join Date
    Oct 2012
    Posts
    10

    Re: Custom OCX; License not found

    Quote Originally Posted by HanneSThEGreaT View Post
    Did you register this control on the system by using RegSvr32 ?
    Yes, we have compiled the OCX on the XP build machine and we have also unregistered and registered using regsvr32. We are still having the problem. We have also made sure the OCX project property "Require license key" is not checked.

  9. #9
    Join Date
    Oct 2012
    Posts
    10

    Re: Custom OCX; License not found

    If it helps, my VB6 project file for the OCX is below.

    Type=Control
    Reference=*\G{00020430-0000-0000-C000-000000000046}#2.0#0#..\..\..\..\WINDOWS\system32\stdole2.tlb#OLE Automation
    Reference=*\G{F5078F18-C551-11D3-89B9-0000F81FE221}#4.0#0#..\..\..\..\WINDOWS\system32\msxml6.dll#Microsoft XML, v4.0
    Reference=*\G{662901FC-6951-4854-9EB2-D9A2570F2B2E}#5.1#0#..\..\..\..\WINDOWS\system32\WINHTTP.dll#Microsoft WinHTTP Services, version 5.1
    Object={EAB22AC0-30C1-11CF-A7EB-0000C05BAE0B}#1.1#0; ieframe.dll
    Object={831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.1#0; mscomctl.ocx
    UserControl=MyUserControl.ctl
    Form=frmPrinterSetup.frm
    Module=modGetPrinterName; GetPrinterName.bas
    Module=MAPG; MAPG.bas
    Module=MPrintSample; MPrintSample.bas
    Class=APG; CApg.cls
    Class=Sample; Sample.cls
    Module=PrinDev; ..\..\GLOBAL5\PRINDEV.bas
    Form=frmViewSample.frm
    Form=..\..\GLOBAL5\Companybox.frm
    Module=modCompanybox; ..\..\GLOBAL5\Companybox.bas
    Module=modMain; modMain.bas
    Class=ThirdSampleJob; ThirdSampleJob.cls
    Form=frmSampleJobs.frm
    Startup="(None)"
    HelpFile=""
    Title="CompanyThirdMyUserControl"
    ExeName32="CompanyThirdSample4.ocx"
    Command32=""
    Name="CompanyThirdMyUserControl"
    HelpContextID="0"
    CompatibleMode="2"
    CompatibleEXE32="CompanyThirdSample4.ocx"
    VersionCompatible32="1"
    MajorVer=4
    MinorVer=0
    RevisionVer=28
    AutoIncrementVer=1
    ServerSupportFiles=0
    VersionCompanyName="Company"
    CompilationType=0
    OptimizationType=0
    FavorPentiumPro(tm)=0
    CodeViewDebugInfo=0
    NoAliasing=0
    BoundsCheck=0
    OverflowCheck=0
    FlPointCheck=0
    FDIVCheck=0
    UnroundedFP=0
    StartMode=1
    Unattended=0
    Retained=0
    ThreadPerObject=0
    MaxNumberOfThreads=1
    ThreadingModel=1
    DebugStartupOption=0

    [MS Transaction Server]
    AutoRefresh=1

  10. #10
    DataMiser is offline Super Moderator Power Poster
    Join Date
    Jul 2008
    Location
    WV
    Posts
    4,825

    Re: Custom OCX; License not found

    Did you copy over the license file? Sounds like the .VBL file is missing or not in the right location.
    Always use [code][/code] tags when posting code.

  11. #11
    Join Date
    Oct 2012
    Posts
    10

    Re: Custom OCX; License not found

    Quote Originally Posted by DataMiser View Post
    Did you copy over the license file? Sounds like the .VBL file is missing or not in the right location.
    I cannot locate and i'm not familiar with any .VBL file. The OCX project is NOT set to require a license file. This project is several years old, and this has never happened before, which is what makes this really confusing.

  12. #12
    DataMiser is offline Super Moderator Power Poster
    Join Date
    Jul 2008
    Location
    WV
    Posts
    4,825

    Re: Custom OCX; License not found

    That is odd, I have only saw this message when the control is set to use a license and the .vbl file is missing. I've got an old one here s well written in VB5 and when I setup a new machine it will alwys give that message until I have the proper .vbl file in place.

    Can you open and build the ocx project on this new system?
    Always use [code][/code] tags when posting code.

  13. #13
    Join Date
    Oct 2012
    Posts
    10

    Re: Custom OCX; License not found

    Yes, we can open the VB6 project on the new build machine and compile the OCX with no problems. Just the EXE projects that have the custom user control on a form won't compile with the missing license problem.

  14. #14
    Join Date
    Oct 2012
    Posts
    10

    Re: Custom OCX; License not found

    On a side note, I tried compiling the OCX with the require license property set so I could get a license file. Even that didn't work, same problem.

  15. #15
    Join Date
    Oct 2012
    Posts
    10

    Re: Custom OCX; License not found

    When I open our VB6 EXE project that uses the OCX control giving the license not found error, I have Process Monitor telling me the following HKCR\Licenses keys are looked for, but not found. Those GUID, I can not find any information for any where. I have no idea what they are for.

    Code:
    HKCR\Licenses\06BE90B0-2D30-11d0-9441-00A0C90F26F1
    HKCR\Licenses\46fd8960-d06c-11cf-b364-00aa0060d393
    HKCR\Licenses\5f54e750-ce26-11cf-8e43-00a0c911005a
    The GUID for our one custom user control in our OCX giving the license error is:
    {4791C3B3-6C6F-422A-900A-00978799AAF2}

    Our custom user control (OCX) has one form that has the following controls on it:
    Code:
    {1EFB6596-857C-11D1-B16A-00C0F0283628}	MSComctlLib.TabStrip
    {0057D0E0-3573-11CF-AE69-08002B2E1262}	SHDocVwCtl.WebBrowser
    The OCX project has the following references and objects:
    Code:
    {EAB22AC0-30C1-11CF-A7EB-0000C05BAE0B}	IEFRAME.DLL			1.1	
    {F5078F18-C551-11D3-89B9-0000F81FE221}	MSXML6.DLL			4.0
    {00020430-0000-0000-C000-000000000046}	STDOLE2.TLB			2.0
    {831FDD16-0C5C-11D2-A9FC-0000F8754DA1}	MSCOMCTL.OCX			2.1	
    {662901FC-6951-4854-9EB2-D9A2570F2B2E}	WINHTTP.DLL			5.1
    I hope this gives someone an idea of what is giving me this error, i'm running out of time to get this running.

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Azure Activities Information Page

Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center