Certificates available in the current store

This forum is for ideas and or code to be contributed for general use.
Post Reply
Message
Author
patito
Posts: 121
Joined: Tue Aug 31, 2010 9:01 pm

Certificates available in the current store

#1 Post 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
Attachments
cert.rar
(731.92 KiB) Downloaded 931 times

User avatar
slobodan1949
Posts: 80
Joined: Mon Apr 25, 2011 8:57 am
Location: SERBIA
Contact:

Re: Certificates available in the current store

#2 Post by slobodan1949 »

i need to get this
i need to get this
YES OK.png (9.21 KiB) Viewed 2227 times
now i get this
now i get this
NOT OK.png (10.62 KiB) Viewed 2227 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 ?

Post Reply