Delphi DLL – GetBytesPtr (Writing PByte to TStream)

Chilkat v9.5.0.80 adds a new BinData function named GetBytesPtr.   It returns a pointer to the internal bytes contained within the BinData.   This post shows one way of writing those bytes to a Delphi TStream (using the Chilkat non-ActiveX Delphi DLL). procedure TForm1.Button2Click(Sender: TObject); var rawBytes: PByte; ItemCount: Integer; binDat: HCkBinData; Stream: TMemoryStream; Writer: TBinaryWriter; byteArr: TBytes; numBytes: Integer; i: Integer; […]

HTTP “broken pipe” Error on non-Windows Systems (Linux, iOS, MacOSX, etc.)

If you see the error lines “The connection already exists, as far as we know..” followed by “socketError: Broken pipe”  in any LastErrorText for a method that sends an HTTP request, it means the following:   The server replied to the previous request without a “Connection: close” header, thus allowing the client to keep the connection open for the next request.  […]

Explaining OAuth2.StartAuth

This post explains the OAuth2 flow for desktop apps.   It begins by calling OAuth2.StartAuth. The oauth2.StartAuth method does two things: 1) Returns a URL that should be displayed in a browser. 2) Starts a background thread to receive the redirect callback from the browser. The flow of control is like this: 1) The browser (popped up and displayed by the […]

iPad Simulator: Undefined symbols for architecture x86_64: _readdir$INODE64

Question: We are currently seeing the following error when we run the build on iPad Simulator Undefined symbols for architecture x86_64: “_readdir$INODE64”, referenced from: _ckFileList2::addDirNonRecursive2(int, FileMatchingSpec&, ExtPtrArrayXs&, ProgressMonitor*, LogBase&) in libchilkatIos.a(fileList.o) _ckFindFile::advancePositionLinux(char const*, LogBase&) in libchilkatIos.a(fileList.o) “_opendir$INODE64”, referenced from: _ckFindFile::ffOpenDir2(XString&, LogBase&) in libchilkatIos.a(fileList.o) _ckFileList2::addDirNonRecursive2(int, FileMatchingSpec&, ExtPtrArrayXs&, ProgressMonitor*, LogBase&) in libchilkatIos.a(fileList.o) ld: symbol(s) not found for architecture x86_64 Answer: You can […]

Chilkat v9.5.0.80 Release Notes

The previous version release notes: Chilkat v9.5.0.79 Release NotesThe next version release notes: Chilkat v9.5.0.82 Release Notes Chilkat v9.5.0.80 Release Notes 9-Aug-2019 Apple WatchOS: Added the static library for the arm64_32 architecture.  9-Aug-2019 iOS: Added an “iPad Apps for Mac” build.   This is a new set of Chilkat iOS libs built with Xcode 11.0 beta 5, on macOS Catalina […]

Android Java .so Shared Lib sizes, and Android C++ Linker Options to Minimize Size

The Chilkat v9.5.0.79 version reduces the size of the Android Java .so shared libs by approximately 24%. For example, the armv7l lib is reduced from 9.86MB to 7.56MB. For developers writing C++ code in Android (i.e. using the Android C++ libs downloaded from https://www.chilkatsoft.com/chilkatAndroidCpp.asp), you’ll want to include the following linker options when linking with the Chilkat static libs: -Wl,–gc-sections,–icf=safe […]

Getting Started with Chilkat in the Go Language (Linux 64-bit)

This is a walkthrough for getting a “Hello World” working with Chilkat in the Go programming language. We’ll start from scratch by downloading Go and getting a simple Hello World Go example working. Then we’ll install Chilkat and build and run an example program. (1) My Go language installation will be in ~/langDists/go. cd ~ mkdir langDists cd langDists (2) […]

Electron: Uncaught Error: A dynamic link library (DLL) initialization routine failed.

Customer problem: Hi having trouble getting @chilkat/ck-electron4-win64 working. Im getting this error: Uncaught Error: A dynamic link library (DLL) initialization routine failed.\\?\C:\Users\User\Documents\xyz\node_modules\@chilkat\ck-electron4-win64\chilkat.node Resolution: I’m unable to reproduce the problem. Here are the steps taken to install Electron 4.0.4 and use Chilkat from scratch… using the Electron quick start as shown here:  https://github.com/electron/electron-quick-start (1) Start the GitHub Bash shell (2) Go to […]