CoInitializeEx or CoInitializeSecurity failedSolved

Hi

first of all, nice application.I'm trying to use LimeLM in one of my applications now.

Whenever i call the IsActivated method, i get the CoInitializeEx....error.I did also try to put the IsActivated call to the application start like you wrote (first line in main method)...still get the error.Any ideas?

thankschris

hi

i know it doesn't fit in the topic, but i have 2 more questions

1. If i create a 2nd version of my product, how can i get the version my product is activated for within my code? i need to decide which features are enabled in the standard and which ones are enabled in the pro version, but i dont know how to use 2 .dat files and guids, ....or am i wrong?!

2. the delete button for product versions is missing on the website

cheerschris

Hi

first of all, nice application.I'm trying to use LimeLM in one of my applications now.

Whenever i call the IsActivated method, i get the CoInitializeEx....error.I did also try to put the IsActivated call to the application start like you wrote (first line in main method)...still get the error.Any ideas?

thankschris

Did you try running the C# or VB.NET example app with your TurboActivate.dat file and version GUID? Does the CoInitializeEx error happen?

Also, if you're running C# did you try running TurboActivate.IsActivated() in the main() function in Program.cs? (If you're using VB.NET did you try putting TurboActivate.IsActivated() above the InitializeComponent call?)

1. If i create a 2nd version of my product, how can i get the version my product is activated for within my code? i need to decide which features are enabled in the standard and which ones are enabled in the pro version, but i dont know how to use 2 .dat files and guids, ....or am i wrong?!

This will be supported in the near future. But for now you can do this in a hacky way:

  1. Create 2 folders in your app's base directory: (e.g. "pro" and "basic")
  2. Copy the TurboActivate files (exe and dll) in both directories. Then put the TurboActivate.dat files in the respective directories.
  3. Copy the TurboActivate.cs (or TurboActivate.vb) file. Name one "TurboActivateBasic.cs" and the other "TurboActivatePro.cs". Also rename the class (e.g. public static class TurboActivateBasic {...} )
  4. In TurboActivateBasic.cs change the "[DllImport("TurboActivate.dll", CharSet = CharSet.Unicode)]" to "[DllImport("basic\\TurboActivate.dll", CharSet = CharSet.Unicode)]"

Then you can just use:

TurboActivatePro.VersionGUID = "INSERT GUID";TurboActivateBasic.VersionGUID = "INSERT GUID";


if (!TurboActivatePro.IsActivated()){    // not pro, check if basic    if (TurboActivateBasic.IsActivated())    {        // is basic    }}else{    // is pro}
2. the delete button for product versions is missing on the website

Why do you want to delete a product version?

Hi, sry for being late 🙂

1. the sample project does work but not my project.tried to copy the dll from the sample and used this code (program.cs)

[STAThread] static void Main() { TurboActivate.VersionGUID = ........... bool isActivated = TurboActivate.IsActivated();

...but it always throws an exception ... integer value 11 -> com exceptioni have no idea what could be executed before this entry point..

2. nice idea with your application-version-solution (standard, pro)....i'm gonna try this after i figuredout the problem above

3. i just created a new version to see what happens. then i was wondering how i could delete it again (because so far, the application only exists as standard version, but pro version is already planned 🙂 )

cheerschris

Answer

We've uploaded TurboActivate 2.0.1. This should fix the problem for you. And you'll be able to use TurboActivate functions anywhere now.

Also you no longer need to disable the Visual Studio hosting process.

We'll add official version deleting later, but I can do it manually for you right now. Which version to you want me delete?

Yes it works!

I also recognized, that i don't need to have the isActivated() method at the beginning of my code.That's great, 'cause now i can put those lines in my prepared region for the wyday activation 🙂

Amazing, thank you.

ps: it would be great if you could delete the pro version in my account.

cheerschris

Yes it works!

I also recognized, that i don't need to have the isActivated() method at the beginning of my code.That's great, 'cause now i can put those lines in my prepared region for the wyday activation 🙂

Amazing, thank you.

No problem.

ps: it would be great if you could delete the pro version in my account.

Done.