Page 1 of 1

Certificates available in the current store

Posted: Mon Dec 24, 2018 2:33 pm
by patito
Hi All

Happy Easter
Merry Christmas
FELIZ NAVIDAD
Frohe Weihnachten

Attached program to retrieve a list of all certificates available in the current store
A source program is attached, so that it can be adapted.
Use ot4xb, which is attached and crypt32.dll

Best Regard
Héctor Pezoa

Re: Certificates available in the current store

Posted: Wed Aug 03, 2022 1:02 pm
by slobodan1949
i need to get this
i need to get this
YES OK.png (9.21 KiB) Viewed 2248 times
now i get this
now i get this
NOT OK.png (10.62 KiB) Viewed 2248 times
Dear Patito,
function:

@crypt32:CertGetNameStringA(pCertContext, CERT_NAME_SIMPLE_DISPLAY_TYPE, 0x00200000, 0, @cNombre, cchString)

forms cNombre as an ANSI string and destroys Serbian Cyrillic fonts, so Xbase++ displays them as: ??????
and they can no longer be converted either to utf-8 or to Serbian Cyrillic or Serbian Latin.

Trying to solve this problem didn't work for me.
The MS documentation for c++ or c# says this: this function will return an ANSI string or a UTF-8 string
depending on whether the ANSI switch is turned on in the program from which the function is called
or the UTF-8 switch is on.

Xbase++ does not have such a switch that this function could accept, so it returns by default
ANSI and not UTF-8.

I need it to switch back to UTF-8 Serbian Cyrillic which I can transform to ANSI Serbian Latin.

Can it be done in this example of yours ?