Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Outlook MAPI 80040112: Class is not licensed for use
Message
General information
Forum:
Visual FoxPro
Category:
ActiveX controls in VFP
Environment versions
Visual FoxPro:
VFP 6 SP5
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01034530
Message ID:
01034540
Views:
29
That's a good question Sergey. The water is extremely muddy, but it appears that the license that MSMAPI is looking for when it says that it doesn't have an appropriate license is a design time license, not a runtime license. So, in order to get around it, the registry hack takes a design-time license and moves it to a user's computer. Here's a kb article that has an interesting little line in it... http://www.kbalertz.com/kb_192693.aspx

"A distribution created with the Visual FoxPro Setup Wizard or InstallShield Express only allows a run-time license, while the AddObject method requires a design time license."

In any event, I believe the accepted way to get around this problem is to add the ActiveX control to a form or create a subclass of the olecontrol in a vcx at design-time, that way only the run-time licensing is needed when the application is installed at a user's location and the activex will stop complaining that it doesn't have the appropriate license on the user's machine. Whether this violates the EULA for the MSMAPI controls and/or the EULA for VFP is a matter that could be debated. But I think it is clear that hacking the registry is using a design-time license not a runtime license, and as such, I stay away from it.

>Which one?
>
>>I've heard that a registry hack like that violates the EULA.
>>
>>>See if Re: Cannot create MSMAPI.MAPISession Message #1029060 helps?
>>>
>>>>I am receiving the following error when instantiating a MAPI client class within my Visual FoxPro 6 SP5 application:
>>>>
>>>>80040112: Class is not licensed for use
>>>>
>>>>The error occurs at the point where a Mapi Session or Message is being created with one of these two lines:
>>>>
>>>>.oSession = createobject("MSMAPI.MAPISESSION")
>>>>.oMessage = createobject("MSMAPI.MAPIMESSAGES")
>>>>
>>>>Anyone have any thoughts? I'll continue below with what I've tried so far.
>>>>
>>>>[Debugging Done to find Issue]
>>>>1) Windows XP SP2 with Microsoft Office 2000 and SP1 Virtual PC for testing
>>>>
>>>>2) This issue is most likely a missing DLL, OCX, or registry "license" key. Thus most of my testing has been along this route
>>>>
>>>>3) I tried the watch utility in installsheild to monitor what is being used. I then included those files, or the MSI Merge Module containing them, in my installation routine and installed. No Joy
>>>>
>>>>4) I then moved to manual searches of differences in Mapi files between my Dev machine and the failed client. The only thing I find missing is MAPIR.DLL located in the C:\Program Files\Common Files\SYstem\MSMAPI\1033\MAPIR.DLL. I moved that file into the location (copying from Dev) and tried a regsvr32.exe. I get the DLLEntryPoint Server Not Found error when attempting to register. The license error still occurs in my application on the test machine. I can not find any information on what MAPIR.dll does in terms of MAPI
>>>>
>>>>5) I then installed Visual Studio 6 on the machine. Viola... everything works. So at this stage I know one thing... whatever the problem, installing Visual Studio Fixes it.
>>>>
>>>>6) Then tried the same install on Windows 2000 with Office 2000 on a seperate Virtual machine. This was done in case problems with the office install were the culprit... No Joy... same error.
>>>>
>>>>7) Since then I've tried a myriad of installs and unistalls (the virtual machine is returned to unloaded state each time, no dll/ocx etc) varying different DLLs in an attempt to fix... No Joy
>>>>
>>>>I could go on for hours with what I've tried but I think this information is the most useful.
>>>>
>>>>Okay Thread... I need some saving.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform