Page 1 of 1

ActiveX control with COMatePlus

Posted: Sat May 16, 2020 12:33 pm
by leonhardt
Hello COMatePlus experts,could you help me ?
My app host a ActiveX control ,which should be passed a license key string to keep it functional, I've searched the web first,it seems I should use "AtlAxCreateControlLic" api rather than "AtlAxCreateControl" which is used for create activex in COMatePlus, I have tried to modify the comate source code but failed, well,I am a newbie to COMate, :oops: :oops: . In VB,I will do nothing but drag the activex control to a form to finish the job. in PB how can I put a license key to my control manually?

Re: ActiveX control with COMatePlus

Posted: Sun May 17, 2020 6:59 am
by leonhardt
no one can help me? :cry:

Re: ActiveX control with COMatePlus

Posted: Sun May 17, 2020 10:54 am
by srod
I don't think there should be any particular problem using AtlAxCreateControlLic() in place of AtlAxCreateControl() except on my system (Win 7) the function is not available through the atl.lib import library. Instead I can access it through the "atl100.dll" library file from my Windows folder. Use OpenLibrary() and create a suitable prototype for use with GetFunction() etc. Don't forget to use a p-BSTR pseudotype for the bstrLic parameter.

I haven't tested any of this mind except for testing the availability of the AtlAxCreateControlLic() function in the atl100.dll library.

Re: ActiveX control with COMatePlus

Posted: Mon May 18, 2020 2:26 am
by leonhardt
srod wrote:I don't think there should be any particular problem using AtlAxCreateControlLic() in place of AtlAxCreateControl() except on my system (Win 7) the function is not available through the atl.lib import library. Instead I can access it through the "atl100.dll" library file from my Windows folder. Use OpenLibrary() and create a suitable prototype for use with GetFunction() etc. Don't forget to use a p-BSTR pseudotype for the bstrLic parameter.

I haven't tested any of this mind except for testing the availability of the AtlAxCreateControlLic() function in the atl100.dll library.
OK,thanks CGS(COM God Srod),I'll check this out.