My apologies for this off topic post but I'm not even sure where to ask
this.
I've got National Instruments ActiveX controls running in a test
application. The Delphi Wrapper created when importing the control into
my development environment appears to have also brought in the license
string similar to the LICREQST.EXE app from Microsoft.
In the wrapper it creates:
TCWDSP = class(TOleControl)
Private
procedure InitControlData; override;
procedure TCWDSP.InitControlData;
const
CLicenseKey: array[0..62] of Word = ( $006F, $006E, $0070, $006E,
...
CControlData: TControlData2 = (
ClassID: '{4EE5F083-54CF-11D0-8B74-0020AF31CEF9}';
EventIID: '';
EventCount: 0;
EventDispIDs: nil;
LicenseKey: @CLicenseKey;
Flags: $00000000;
Version: 401);
begin
ControlData := @CControlData;
end;
On the target system I run regsvr32 with the file.ocx to register it.
But when I run the application the unlicensed control is displayed.
National Instruments which doesn't support Delphi doesn't know how to
help me. Their C solutiuon is:
3.Add the following code below
" AxMyProject.AxMyLicensedControl myControl = new
AxMyProject.AxMyLicensedControl();"
System.Reflection.FieldInfo f =
typeof(AxHost).GetField("licenseKey",
System.Reflection.BindingFlags.NonPublic |
System.Reflection.BindingFlags.Instance);
f.SetValue(myControl, "gnvlslnjskvlmlgnnimh");
Which is probably what the wrapper is doing.
But I can't see where the InitControlData is being invoked or how I make
it understand that the control is licensed.
Any ideas?
Thanks
John Dammeyer
--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be