Archived Forum Post

Index of archived forum posts


Chilkat CkCrypt2 in C++ CLI WinForm won't work

Jun 02 '16 at 14:51

Hello, i want to use Chilkat in CLI mode, but when i compile application, i get this error. "I add reference DLL .NET for Chilkat too".

How to fix this?



I created a simple C++/CLR app in VS2012, add a reference to the Chilkat .NET assembly (by browsing to it), then wrote this code:

#include "stdafx.h"

using namespace System; using namespace Chilkat;

int main(array<System::String ^> ^args) { Console::WriteLine(L"Hello World");

Chilkat::Crypt2 ^crypt = gcnew Chilkat::Crypt2();

return 0;



it's working now. thanks, but i have one question, i planning about buying a bundle pack and i need to ask a question, bundle contain all modules of chilkat? like zip, crypt2, gzip, mail, etc? Thanks


Thanks. Yes, that is correct. The Bundle includes all existing classes, in all supported programming languages, operating systems, etc. New version updates are included while support is not expired. The Bundle can be purchased with 1YR or 2YR support, and support can be optionally renewed. (Your existing unlock codes for existing versions would never expired -- only support expires and the ability to update to newer versions.)


Thanks for fast answer. Then when i buy this bundle, then i need to use obtained unlockcode everytime in C++ programs with for example crypt->UnlockComponent("UnlockCode");. Right?


Yes, that is correct. But with a Bundle unlock code, it's easier to instantiate a Chilkat::Global object at the beginning of your program, and call Global::UnlockBundle once. The Chilkat::Global object instance can be garbage collected/discarded after calling UnlockBundle.


Thanks a lot, and one question out of theme, i can for example encrypt file succesfully and then decrypt this file, but can i encode string with specify key and then decrypt it only with this key? i try encodestring(str^, "utf8", "hex"), but i want encode string with my predefined key. Thanks for help.