Quantcast
Channel: Chilkat Forum - latest questions
Viewing all 1061 articles
Browse latest View live

How do I parse multipart/digest mails?

$
0
0

I'm trying to parse an old mail that is multipart/digest. When using the example "ExaminEml" I correctly get

multipart/mixed text/plain text/plain multipart/digest message/rfc822 message/rfc822 and so on. text/plain

as result.

But how do I access the parts with multipart/digest and message/rfc822? Both GetPlainTextBody and GetHtmlBody only have the text/plain part. NumAttachedMessages is 0. I've uploaded the email to http://www.mothsoftware.com/downloads/digest.eml .

Xojo 2016r4.1, MacOS 10.11.6, latest Chilkat plugin.

Mit freundlichen Grüßen/Regards

Beatrix Willius

http://www.mothsoftware.com Mail Archiver X: The email archiving solution for professionals


CkAuthAzureAd examples?

$
0
0

Is this really what it looks like? A wonderful object designed to demystify the Office365/Azure AD Client Credentials Flow? Oh please tell me Christmas came early this year.

Any chance for some example code on how to use it correctly? Thanks!

BT

RSA with SAH 256

$
0
0

Hi all,

i need to "translate" these lines writed in java. I dont' know what functions or assembly to use :

KeyStore keystore; // key repository for keys containing signature certificate String alias; // alias for the certificate in the key repository String password; // password for the certificate's private key String plaintext; // text being signed

Signature signature = Signature.getInstance("SHA256withRSA"); signature.initSign((PrivateKey) keystore.getKey(alias, password.toCharArray())); signature.update(plaintext.getBytes("UTF-8")); byte[] rsa_text= signature.sign();

If someone can help me. I discover certificates and cryto. it is so new for me.

Thanks for your help.

Eric

Is it mandatory to install MSVC++ 9.0 Runtime Libs?

$
0
0

Hi,

We use Chilkat ActiveX in our software. I understand that Chilkat ActiveX depends on MSVC++ 9.0 Runtime Libs, so at this moment in the setup of our software vcredist_x64.exe is called.

The problem is, we would like our users to be able to setup our software without administrative rights, so calling vcredist_x64.exe in our setup is not an option.

Is it possible to simple copy the dlls of MSVC++ 9.0 Runtime Libs to the installation directory of our software?

If not, is MSVC++ always already installed on Windows 10?

Thanks.

SFTP download failed (files over 2GB)

$
0
0

we try download files over 2GB from sftp server (freeFTPd, RebexTinySftpServe, CoreFTPServer, ... ). but always download failed and Server is down or crash.

isn't chilkat lib support files over 2GB ?

thanks.

BadImageFormatException

$
0
0

Can you help me with this problem,


An unhandled exception of type 'System.BadImageFormatException' occurred in App.exe Additional information: Could not load file or assembly 'ChilkatDotNet45, Version=9.5.0.65, Culture=neutral, PublicKeyToken=eb5fc1fc52ef09bd' or one of its dependencies. An attempt was made to load a program with an incorrect format.


My project have the reference to ChilkatDotNet45.dll(32-bits) and it's compile to 32-bits. There is a solution for this problem?.

RSA with SHA256

$
0
0

Hi all,

i need to "translate" these lines writed in java. I dont' know what functions or assembly to use :

KeyStore keystore; // key repository for keys containing signature certificate
String alias; // alias for the certificate in the key repository
String password; // password for the certificate's private key
String plaintext; // text being signed

Signature signature = Signature.getInstance("SHA256withRSA"); signature.initSign((PrivateKey) keystore.getKey(alias, password.toCharArray())); signature.update(plaintext.getBytes("UTF-8")); byte[] rsa_text= signature.sign();

If someone can help me. I discover certificates and cryto. it is so new for me.

Thanks for your help.

Eric

@odata in JSON not found?

$
0
0

Has anyone else run into this? I have a valid JSON with "@odata.nextLink" in it:

{ "@odata.nextLink":"https...." }

Yet, loading that JSON into the CkJsonObjectW and running "StringOf("@odata.nextLink"..." returns an empty string.

Is there something special needed to do @odata items?

BT


Application not working when distributed

$
0
0

Hi,

We have incorporated Chilkat Zip into our VBA/MS Access application. It works fine on the development PC; the deployment package includes ChilkatZip.dll, and the dll appears to register correctly on the target system (in SysWow64).

Then, when attempting to create the zip object, the application raises the error "ActiveX component can't create object."

I've tried installing on two different target machines (other than the development machine) with the same results in both cases.

Any ideas what this could be?

Thanks, Alex

Updating Legacy VB6 from ChilkatEmail DLLs to Active X

$
0
0

I inherited a legacy VB6 app that sends email using Chilkat Mail 5.1 that now needs to use SMTP TLS, but apparently the StartTLS property doesn't exist in Chilkat Mail 5.1. I downloaded and installed the newest Active X component (v9.5) and added the reference to the project, but am having trouble translating methods and properties to the new component.

Let me preface this by saying I have limited experience with VB, but here are my old declarations:

Dim Mailer As New CHILKATMAILLib.ChilkatMailMan
Dim MailFactory As New CHILKATMAILLib.EmailFactory
Dim msg As CHILKATMAILLib.IChilkatEmail

I tried using these declarations...

Dim Mailer As New ChilkatMailMan
Dim MailFactory As New ChilkatEmail
Dim msg As New ChilkatEmail

...but trying to invoke the method Set msg = MailFactory.NewEmail fails. I also tried invoking EmailBundle as MailFactory and use Set msg = MailFactory.AddEmail but that doesn't work either.

I know I'm not giving much to go on, but any help would be greatly appreciated as I an out of my depth here.

Thanks in Advance, vin

SSH Tunnel not close in ThreadPool

$
0
0

I use newest Chilkat DLL.

This is my code in threadpool: alt text

When i Don't Use :

` http.SocksHostname = "localhost";

http.SocksPort = Port;

http.SocksVersion = 5;`

It's Ok.

Something wrong? Anybody can help me?

Processor Architecture Mismatch?

$
0
0

VS 2015 was issuing a warning when I compiled my project:

There was a mismatch between the processor architecture of the project being built "MSIL" and the processor architecture of the reference "ChilkatDotNet46, Version=9.5.0.52, Culture=neutral, PublicKeyToken=eb5fc1fc52ef09bd, processorArchitecture=x86", "x86". This mismatch may cause runtime failures. Please consider changing the targeted processor architecture of your project through the Configuration Manager so as to align the processor architectures between your project and references, or take a dependency on references with a processor architecture that matches the targeted processor architecture of your project.

My solution includes three projects, (1) the main EXE, (2) a DLL, and (3) a test unit.

(1), the EXE, had "Platform target" set to "Any CPU" with "Prefer 32-bit" checked.

(2) and (3) were set to "Any CPU", but "Prefer 32-bit" was unchecked because it was disabled.

The EXE has a reference to "...chilkat-win32.9.5.0.60libnet461ChilkatDotNet46.dll", the 32-bit version of the library.

To avoid the warning, I changed Platform target to "x86" in all three projects. However, I'd rather use "Any CPU" with "Prefer 32-bit" checked to get the expanded address space that VS 2015 enables when "Prefer 32-bit" is checked. To use that, would we need a DLL for Chilkat that had /LARGEADDRESSAWARE?

Why separate 32- and 64-bit Chilkat libraries for .NET?

$
0
0

I was curious as to why the Chilkat .NET libraries are released in separate 32- and 64-bit modules. Microsoft .NET allows applications to be compiled in the following modes - x86, x64, IA64, Any CPU and, with Visual Studio 2012 and Modern UI, ARM.

When I began marketing my software, I spoke with the good folks at the Association of Software Professionals, and one of the items they pointed out was that I was being too technical and made things burdensome for the end user. There was a lot of emphasis on simplicity.

I always compile my software in "any CPU" mode. This provides the luxury of knowing the software will work, regardless of the machine it is run on.

Using the Chilkat libraries forces me to change that mode of thinking, and compile in either 32- or 64-bit (x86/x64) modes, and also forces me to release the software in separate 32- and 64-bit downloads. This adds to the complexity for an end user who has no idea what 32- or 64-bits means. I try to help the user by telling them on the webpage that we detected 32- or 64-bit.

But, in a perfect world, I would like to be able to make just one download, and know it will install and run on every user's computer, regardless of 32- or 64-bit Windows.

Matthew Sawyer Owner, Dojo North Software, LLC

get data from webservice with x509

$
0
0

Hello,

I have to get data from a webservice (described as "like REST") , the site needs a certificate. We send some data in XML form but as contenttype text/plain (dont ask:-) ) and receive some data in XML form.

We have different certificates on the pc, so the one to be used comes from a file (see down)

In the next lines there is code from our working c# solution. But now need to do implement it in another project in VFP and want to use chilkat for it (which we use for ftp,..)

Can you give me a hint where to start or some code ?

Thanks a lot in advance tom

Here is the main part of the c# program :

namespace WebClientService

{ public class WebClient

{
    private readonly ILog _log;
    public WebClient()

    public string SendData(string uri, String xmlData)
    {

        var url = new Uri(uri);
        SecureWebClient client = new SecureWebClient();

       var response =client.UploadString(url, xmlData);

       _log.Debug(response);

        return response.ToString();

    }

    class SecureWebClient : System.Net.WebClient
    {

        protected override WebRequest GetWebRequest(Uri address)
        {
            HttpWebRequest request = (HttpWebRequest)base.GetWebRequest(address);

            ServicePointManager.ServerCertificateValidationCallback = delegate { return true; };
            //ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;
            X509Certificate myCert =  X509Certificate2.CreateFromCertFile("ClientCertificate.cer");
            request.ClientCertificates.Add(myCert);
            return request;
        }
    }

}

}

CKFILE GetFileNameWithoutExtension

$
0
0

Hy,

VB6: Public fac As New CkFileAccess

Simple in debug window: ? fac.GetFileNameWithoutExtension("c:\windows\win.ini") ANSWER: wi

? fac.GetFileNameWithoutExtension("c:\windows\system32\defrag.exe") ANSWER: defra

The last character is failed in both cases.

It's a bug ?

THX


How to add CSS File to an Email

$
0
0

I am building a component that we will use for creating newsletters and mailing them. For the newsletter template I have html and I have a css-file. What is the recommended way of adding the css to the email? I succeed in adding the html to the mail, but the css, since it’s in a different mail, I don’t know how to handle.

Matching .NET Framework TripleDES

$
0
0

Hello,

I have the following .NET class that I'm trying to re-write into Crypt2.

Actual keys from the byte array have been removed, but contains numbers such as {1, 2, 3, 4}.

The class below encrypts/decrypts a Base64 string.

Can anyone help me with what settings I need to use on the Crypt2 component so that my encrypted string will match the .NET encrypted string? I'm having trouble figuring out what to use for CipherMode, KeyLength, and PaddingScheme.

class Crypt
{

    //New Key
    //24 byte or 192 bit key and IV for TripleDES
    private static byte[] KEY_192 = {?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?};
    private static byte[] IV_192 = {?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?};

    //TRIPLE DES encryption
    public static string EncryptTripleDES(string value)
    {
        if (!string.IsNullOrEmpty(value))
        {
            TripleDESCryptoServiceProvider cryptoProvider = new TripleDESCryptoServiceProvider();
            MemoryStream ms = new MemoryStream();
            CryptoStream cs = new CryptoStream(ms, cryptoProvider.CreateEncryptor(KEY_192, IV_192), CryptoStreamMode.Write);
            StreamWriter sw = new StreamWriter(cs);

            sw.Write(value);
            sw.Flush();
            cs.FlushFinalBlock();
            ms.Flush();

            //convert back to a string
            return Convert.ToBase64String(ms.GetBuffer(), 0, Convert.ToInt32(ms.Length));
        }
        else
        {
            return null;
        }
    }

    //TRIPLE DES decryption
    public static string DecryptTripleDES(string value)
    {
        if (!string.IsNullOrEmpty(value))
        {
            TripleDESCryptoServiceProvider cryptoProvider = new TripleDESCryptoServiceProvider();

            //convert from string to byte array
            byte[] buffer = Convert.FromBase64String(value);
            MemoryStream ms = new MemoryStream(buffer);
            CryptoStream cs = new CryptoStream(ms, cryptoProvider.CreateDecryptor(KEY_192, IV_192), CryptoStreamMode.Read);
            StreamReader sr = new StreamReader(cs);

            return sr.ReadToEnd();
        }
        else
        {
            return null;
        }
    }

Thank you!!

Listen thread did not stop.

$
0
0

What the happen with log:

ChilkatLog:
  StopAccepting:
    DllDate: Dec 27 2016
    ChilkatVersion: 9.5.0.65
    UnlockPrefix: Anything for 30-day trial.
    Architecture: Little Endian; 64-bit
    Language: .NET 4.0 / x64
    VerboseLogging: 0
    Stopping listen thread...
    Listen thread did not stop.
    Failed.
  --StopAccepting
--ChilkatLog

Problem in syncing files for more than one hour

$
0
0

I am using chilkat extension in PHP. The problem I am getting is with keeping the connection alive. It automatically time out after one hour. And I got e mail for the time out of the FTP connection. It works well where I need to download lesser files. Problem is in some large amount of file. On inspection found that it is the connection to remote host which is not lasting for more than 1 hour.

Can any one please help me ?

Thanks

ckEncryptFile ran twice on same file decrypts file?

$
0
0

Why does running ckEncryptFile on a file twice Decrypt that file?

' Drop a command button and a text box onto a form and run

Private Sub Command1_Click()

' Creating a text file filled with 1,000 (1's)
Const ForReading = 1, ForWriting = 2, ForAppenting = 8
Dim fso, f
Set fso = CreateObject("Scripting.FileSystemObject")
Set f = fso.CreateTextFile("ones.txt", 2, 0)
f.write String(1000, "1")
f.Close

' load Contents of ones.txt file into textbox for verification
Set f = fso.openTextFile("ones.txt", 1, 0)
Do While f.AtEndofStream <> True
    Text1 = Text1 & f.readline
Loop
f.Close

' Setup the Chilkat Methods

Dim crypt As New ChilkatCrypt2
success = crypt.UnlockComponent("Anything-30-days")
If (success <> 1) Then
    MsgBox crypt.LastErrorText
    End
End If
crypt.VerboseLogging = True

crypt.CryptAlgorithm = "chacha20"
crypt.KeyLength = 256
crypt.EncodingMode = "hex"
Dim ivHex As String
ivHex = "000000000000000000000002"
crypt.SetEncodedIV ivHex, "hex"
crypt.InitialCount = 42
Dim keyHex As String
keyHex = "1c9240a5eb55d38af333888604f6b5f0473917c1402b80099dca5cbc207075c0"
crypt.SetEncodedKey keyHex, "hex"
crypt.HeartbeatMs = 500

' ENCRYPT
strSrcFile = "ones.txt" ' A text file filled with 1's
strDestFile = "cyphertext.txt" ' Gets encrypted
success = crypt.CkEncryptFile(strSrcFile, strDestFile)
If (success <> 1) Then
    MsgBox crypt.LastErrorText
End If
log1 = crypt.LastErrorText
' load Contents of "cyphertext.txt" file into textbox for verification
Set f = fso.openTextFile("cyphertext.txt", 1, 0)    ' Notice we are loading the encrypted file
Text1 = Text1 & "********************************Encrypted section****************************"
Do While f.AtEndofStream <> True
    Text1 = Text1 & f.readline
Loop
f.Close

' Mine correctly shows an encrypted file!

' Now encrypt the encrypted file again strSrcFile = "cyphertext.txt" ' should be encrypted strDestFile = "cypherX2.txt" ' should be Really encrypted ;) success = crypt.CkEncryptFile(strSrcFile, strDestFile) If (success <> 1) Then MsgBox crypt.LastErrorText End If log2 = crypt.LastErrorText ' load Contents of cypherX2.txt file into textbox for verification Set f = fso.openTextFile("cypherX2.txt", 1, 0) ' Notice we are now loading the Double encrypted file Text1 = Text1 & "****Double Encrypted section****" Do While f.AtEndofStream <> True Text1 = Text1 & f.readline Loop f.Close ' Mine shows cypherX2.txt is clear text again and NOT encrypted! ??? Debug.Print log1 Debug.Print "++++++++++++++++++++++++++" Debug.Print log2 MsgBox "Done!"

End Sub

logs:

ChilkatLog:
  CkEncryptFile:
    DllDate: Dec 27 2016
    ChilkatVersion: 9.5.0.65
    UnlockPrefix: RAGSOFCrypt
    Architecture: Little Endian; 32-bit
    Language: ActiveX
    VerboseLogging: 1
    ckEncDecFile:
      inputFile: [ones.txt]
      outputFile: [cyphertext.txt]
      encryptionMethod: chacha
      inFileSize: 1000
    --ckEncDecFile
    Success.
  --CkEncryptFile
--ChilkatLog

++++++++++++++++++++++++++ ChilkatLog: CkEncryptFile: DllDate: Dec 27 2016 ChilkatVersion: 9.5.0.65 UnlockPrefix: RAGSOFCrypt Architecture: Little Endian; 32-bit Language: ActiveX VerboseLogging: 1 ckEncDecFile: inputFile: [cyphertext.txt] outputFile: [cypherX2.txt] encryptionMethod: chacha inFileSize: 1000 --ckEncDecFile Success. --CkEncryptFile --ChilkatLog

Viewing all 1061 articles
Browse latest View live