You could try going on to the main ni.com website, and looking for the self help support forum. The last time I went in there, there are hundreds of competent programmers, many using Delphi of one release or another (even D1!) so someone should have seen that problem and know of a work arround.
If you have not already done so, create your free "account" with NI's website (you may get re-directed to your locale version when you do that) then you can get to the forums. They are web based, but none the less usefull for that. Hope you figure it out. Dave B. > -----Original Message----- > From: John Dammeyer [mailto:[EMAIL PROTECTED] > Sent: Wednesday, March 28, 2007 7:04 PM > To: 'ICS support mailing' > 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 > > > This mail has been scanned by Palmer Cook Computer Services Limited. www.palmercook.co.uk -- 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