I would recommend you news://forums.borland.com ; there are both Delphi and C++ newsgroups. After having said this, I cannot tell you the answer to your question unfortunately as I do have no idea! ;(
BR, SZ ----- Original Message ----- From: "John Dammeyer" <[EMAIL PROTECTED]> To: "'ICS support mailing'" <twsocket@elists.org> Sent: Wednesday, March 28, 2007 9:03 PM Subject: [twsocket] [OT] Embedding ActiveX licenses in Delphi > 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 -- 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