Click here to Skip to main content
15,891,513 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: SendMessage for Interprocess communication stops working Pin
Midi_Mick1-Nov-16 17:36
professionalMidi_Mick1-Nov-16 17:36 
AnswerRe: SendMessage for Interprocess communication stops working Pin
Randor 1-Nov-16 17:56
professional Randor 1-Nov-16 17:56 
GeneralRe: SendMessage for Interprocess communication stops working Pin
ForNow2-Nov-16 13:59
ForNow2-Nov-16 13:59 
GeneralRe: SendMessage for Interprocess communication stops working Pin
Randor 2-Nov-16 16:42
professional Randor 2-Nov-16 16:42 
AnswerRe: SendMessage for Interprocess communication stops working Pin
leon de boer2-Nov-16 3:10
leon de boer2-Nov-16 3:10 
GeneralRe: SendMessage for Interprocess communication stops working Pin
ForNow2-Nov-16 14:32
ForNow2-Nov-16 14:32 
GeneralRe: SendMessage for Interprocess communication stops working Pin
leon de boer2-Nov-16 16:57
leon de boer2-Nov-16 16:57 
QuestionNeed help with cryptography Pin
SMD1111-Nov-16 8:54
SMD1111-Nov-16 8:54 
I have a few questions on the following cryptography functions.

1)
C++
BOOL WINAPI CryptGenKey(
  _In_  HCRYPTPROV hProv,
  _In_  ALG_ID     Algid,
  _In_  DWORD      dwFlags,
  _Out_ HCRYPTKEY  *phKey
);
This is supposed to generate a private/public key pair, which is maintained between sessions.
Q: What is the effect of repetitive calls to this function? For example, I decide to change the key length, and generate a call with a different dwFlags value. What happens to the old key pair? Does it get overwritten? Or does each new call generate a new key pair?

2)
C++
BOOL WINAPI CryptGetUserKey(
  _In_  HCRYPTPROV hProv,
  _In_  DWORD      dwKeySpec,
  _Out_ HCRYPTKEY  *phUserKey
);

MSDN: “The CryptGetUserKey function retrieves a handle of one of a user's two public/private key pairs.”
Q: which one?

MSDN: “dwKeySpec [in]
Identifies the private key to use from the key container.”

In this example, MSDN says
C++
// Get the public at signature key. This is the public key
// that will be used by the receiver of the hash to verify
// the signature. In situations where the receiver could obtain the
// sender's public key from a certificate, this step would not be
// needed.
if(CryptGetUserKey(   
   hProv,    
   AT_SIGNATURE,    
   &hKey)) 
{
Q: So how does one retrieve the public key, and how does one get the private key?

3)
C++
BOOL WINAPI CryptDestroyKey(
  _In_ HCRYPTKEY hKey
);
MSDN: “However, the underlying public/private key pair is not destroyed by this function. Only the handle is destroyed.”
Q: How can the public/private key pair be destroyed?

Thank you!
AnswerRe: Need help with cryptography Pin
Randor 1-Nov-16 19:04
professional Randor 1-Nov-16 19:04 
Question[C]Problem in creating a random string Pin
xXxRevolutionxXx27-Oct-16 1:31
xXxRevolutionxXx27-Oct-16 1:31 
AnswerRe: [C]Problem in creating a random string Pin
Richard MacCutchan27-Oct-16 1:46
mveRichard MacCutchan27-Oct-16 1:46 
GeneralRe: [C]Problem in creating a random string Pin
k505427-Oct-16 4:47
mvek505427-Oct-16 4:47 
GeneralRe: [C]Problem in creating a random string Pin
Richard MacCutchan27-Oct-16 4:55
mveRichard MacCutchan27-Oct-16 4:55 
AnswerRe: [C]Problem in creating a random string Pin
Jochen Arndt27-Oct-16 2:35
professionalJochen Arndt27-Oct-16 2:35 
AnswerRe: [C]Problem in creating a random string Pin
leon de boer27-Oct-16 3:43
leon de boer27-Oct-16 3:43 
SuggestionRe: [C]Problem in creating a random string Pin
David Crow27-Oct-16 4:48
David Crow27-Oct-16 4:48 
GeneralRe: [C]Problem in creating a random string Pin
Daniel Pfeffer27-Oct-16 5:11
professionalDaniel Pfeffer27-Oct-16 5:11 
AnswerRe: [C]Problem in creating a random string Pin
Krishnakumartg27-Oct-16 20:18
Krishnakumartg27-Oct-16 20:18 
GeneralRe: [C]Problem in creating a random string Pin
k505428-Oct-16 4:59
mvek505428-Oct-16 4:59 
PraiseRe: [C]Problem in creating a random string Pin
Krishnakumartg30-Oct-16 18:50
Krishnakumartg30-Oct-16 18:50 
QuestionRe: [C]Problem in creating a random string Pin
David Crow31-Oct-16 2:31
David Crow31-Oct-16 2:31 
QuestionUsing COM in DLL called by .Net application Pin
Leif Simon Goodwin26-Oct-16 3:02
Leif Simon Goodwin26-Oct-16 3:02 
AnswerRe: Using COM in DLL called by .Net application Pin
Richard Deeming26-Oct-16 3:11
mveRichard Deeming26-Oct-16 3:11 
PraiseSOLVED Pin
Leif Simon Goodwin9-Nov-16 5:32
Leif Simon Goodwin9-Nov-16 5:32 
AnswerRe: Using COM in DLL called by .Net application Pin
«_Superman_»26-Oct-16 20:47
professional«_Superman_»26-Oct-16 20:47 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.