CryptBinaryToString isn't supported on Windows 2000. Is there and alternative? - winapi

The Windows API function CryptBinaryToString isn't supported on Windows 2000.
Is there and alternative?
The main use that I need, is to encode/decode BASE64

If you want BASE64, you can find some very short implementation like b64.c.
If you need more cryptocipher/certificate related stuff, try get openssl for win32.

You could roll your own from the MSDN description.

Related

Windows password crypt support

I looking for a Windows replacement for Unix crypt(3), is there any native windows function equivalent to the Unix crypt function?
You want the Windows Crypto API. There's a pretty straightforward example available. If you're using C#, there are easier to use wrappers in the System.Security.Cryptography namespace.

Using windows.pas with Lazarus on OS X

I was wondering if it's possible somehow to use windows.pas on OS X with Lazarus?
I need to use special library in my project, and one of key-files uses windows.pas :( Any ideas?
Windows.pas only works on Windows. You will have to edit the library to put an IFDEF around it in the uses clause, and then provide alternatives for any functionality that is then broken. Or contact the library author and see if there is already a non-Windows version available.
You certainly cannot use Windows.pas under OSX. Because Windows.pas exposes the functionality of the Win32 library.
If you need to execute Win32 code on OSX pretty much your only option is Wine.
A more plausible solution is that you find an alternative to this "special" library to which you refer.
Windows.pas is mostly a wrapper around different DLLs contained in the Windows operating system. As it is unlikely that you will find those DLLs in OSX I guess you are out of luck.
You could check the library's source code and try to identify the constants, procedures and functions that are used in windows.pas. If it is not too much code you could try to modify the library so that it uses corresponding Carbon functions instead.
While the various answers are correct, and the vast bulk of unit windows is not portable, some functionality IS abstracted. Structures like interlockedincrement, Rect and ColorRef, and some message related functionality. Have a look at types and lcltype and the system unit interface of FPC.
A lot of Delphi code still uses Windows for that functionality, while e.g. unit types already exists since D6.
Some other things are abstracted, but not using the same (windows unit) calls. Better explain what exactly you need in a separate post.

How can i convert MacBinary on windows platform?

i need to develop or use a utility on windows platform
to convert MacBinary2 to more readable type
any ideas?
Google "macbinary file format". MacBinary used to add 128 bytes with Mac-specific information at the start of the file, which you would need to remove. That's quite trivial. I really wonder where you managed to dig out MacBinary files.

Text To Speech Api

I'm porting an app from Android/iOS and it uses text-to-speech.
Anything like this available for windows phone?
I tried the Bing/Microsoft Translator APIs but they dont work and rumour says they are deprecated: http://www.codeproject.com/Articles/259727/Text-to-speech-in-windows-phone7
Nuance is out of the question, as their fees are ridiculous.
Thanks in advance!
swine
They do work. The Bing API is deprecated for use on Microsoft Translator services, the new format is to obtain tokens.
I was able to implement a library for this, here:
http://msttokenforwp7.codeplex.com/
obtaining tokens.
http://ttsforwindowsphone7.codeplex.com/
text-to-speech library
Starting with Windows Phone 8, there is now a build in TTS engine. More details can be found in the official MSDN documents.

How to utilize the Windows Vista/7 Dialogs?

I have noticed that the Windows Vista/7 dialogs look MUCH better than just a MessageBox. How can I use them with a P/Invoke?
You're looking for the TaskDialogIndirect method.
You can also use the Windows API Code Pack, which contains a managed wrapper.

Resources