473,405 Members | 2,261 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

How to pass a runtime license key to CreateControl()

Hi

I have a problem with passing a runtime license key for an ActiveX
control to the method CreateControl() of the class
pywin.mfc.activex.Control.

Can anybody give me a hint in which form the license key string must be
passed to this method?

I got the license key for the ActiveX control using the "License Key
Requester" from Microsoft and I used the string given as comment above
the WCHAR array (since I don't know how to convert the WCHAR array for
Python).

But when creating the control with this string, the control is created
in "evaluation mode" and not, as expected, as a licensed control.

I looked up the code for the CreateControl() method and found out, that
it passes the license key string directly to the CreateControl() of the
PyCWnd class (the Python wrapper for the CWnd class of MFC). Than I
looked at the Python extension, where the PyCWnd::CreateControl() is
implemented, and found, that the macro T2OLE is used to convert the
given Python string for the license key to an OLE string, before
passing it to the original MFC method.

ok = pWnd->CreateControl(clsid, szWndName, style, rect, pWndParent, id,
NULL, bStorage, T2OLE(szLicKey));

I'm not sure, but when I understand this right, the MFC method
CreateControl() wants a BSTR here and I read somewhere that T2OLE does
not return a BSTR. Can this be the problem here?

Has anybody ever used the license key string parameter of the
CreateControl() method in Python and can tell my how to pass the
license key string correctly?

Thanks in advance.

Wolfgang Schneider

Jul 18 '05 #1
0 943

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: wschneider | last post by:
Hi I have a problem with passing a runtime license key for an ActiveX control to the method CreateControl() of the class pywin.mfc.activex.Control. Can anybody give me a hint in which form...
1
by: Mark Ramey | last post by:
I have an assembly that I want to license to developers. I don't want to license the runtimes that they deliver to their customers. There are no real design-time controls, only some classes that...
1
by: Casper | last post by:
I am issuing the following commands in a form's detail on click event. Private Sub Detail_Click() Dim Nline As Line Set Nline = New Line I get :"ActiveX component can't create object" ...
7
by: Kathryn Townsend | last post by:
We have a customer using our Acc97 Runtime application on a Win 98 machine that was recently upgraded to WinXP Home Edition Service Pack 1. Shes states RAM is 228, CPU Pentium II 398 MHz , Hard...
6
by: Stu | last post by:
with the following code snippet Dim ConOra As OracleConnection = New OracleConnection() ConOra.ConnectionString = "User Id=USER;Password=PASSWORD;Data Source=orcl9i;" Dim Sql As String =...
0
by: Nonee | last post by:
Hello- I have a form with the mediaplayer referenced to play mp3's and avi's and I believe that is what is causing the problem. I am not sure, but I am hoping. Anyway, I "published" the vb.net...
9
by: Tim | last post by:
Hi, I hope this is an easy question for you guys... I have an application that I need to be able to switch from sqlserver to access at runtime. I can change from one sqlserver installation to...
0
by: JBoeker | last post by:
I'm new to C# and I want to programmatically put some ActiveX controls on my form. I've already put some via the forms editor successfully. Currently the control does not show on the form and I...
9
by: Paul H | last post by:
As I understand it, to distribute a runtime version of Access 2003 with my app I need to spend £600 on "Visual Studio Tools for Office System package" which contains the RT plus a load of stuff I...
2
by: sriregu | last post by:
Hi, i am trying the exe file in .net environment and am getting the following error.Any idea how i can resolve it? System.Runtime.InteropServices.COMException (0x80040154): Class not registered ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.