|
I've never done this but just looking at the documentation I would consider using CTL_FIND_ANY and then for each one using CertFindSubjectInCTL() to confirm that what I was searching for actually existed.
|
|
|
|
|
Viola!
That was PURE magic! Thanks!
What documentation did you look at? I missed that type completely. Also, I thought that CertFindSubjectInCTL was what you used to look at the entries. Does your "magic" documentation show more about this function than MSDN?
Joseph A. Lightfoot
"It's not my fault!"
|
|
|
|
|
Joseph.Lightfoot wrote: Does your "magic" documentation show more about this function than MSDN?
http://msdn2.microsoft.com/en-us/library/aa376067.aspx
That is the documentation for CertFindCtlInStore() which contains a table entry for the CTL_FIND_SUBJECT find type which contains a link to CertFindSubjectInCTL[^]
Perhaps I'm just lucky
|
|
|
|
|
How can I convert an array of BYTE to an array of Point?
-- modified at 11:02 Friday 7th September, 2007
|
|
|
|
|
Md. Ali Naser Khan wrote: How can I convert an array of BYTE to an array of Point?
Did you intentionally leave out any information about what is in the Bytes?
|
|
|
|
|
led mike wrote: Did you intentionally leave out any information about what is in the Bytes?
Don't they contain nibbles? What else is a person supposed to bite?
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
So he can't show the array contents to us, lest we would have Nipplegate[^] here!
In a code forum! Shocking!
Though I speak with the tongues of men and of angels, and have not money, I am become as a sounding brass, or a tinkling cymbal. George Orwell, "Keep the Aspidistra Flying", Opening words
|
|
|
|
|
// Create a region from a path.
Region pathRegion(&path); // Here path is a type of GraphicsPath class.
// Get the region data.
UINT bufferSize = 0;
UINT sizeFilled = 0;
BYTE* pData = NULL;
bufferSize = pathRegion.GetDataSize();
pData = new BYTE[bufferSize];
pathRegion.GetData(pData, bufferSize, &sizeFilled);
////////////////////////////////////////////////////////////////
Now I have data in pData.
How can I covert this 'pData' to an arry of Point type data?
|
|
|
|
|
Are you sure Region::GetData() gets you an array of Point objects?
I don't see that documented...I wonder why they didn't use "Point"
instead of "BYTE"...
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Well you are forcing me to guess that you are using the GDI+ API. Apparently you feel it is our job to drag relevant information out of you. It isn't.
Md. Ali Naser Khan wrote: Region pathRegion(&path); // Here path is a type of GraphicsPath class.
Perhaps GraphicsPath::GetPathPoints(....)[^] would be a solution
|
|
|
|
|
In case you did not notice you gave us absolutely no information. We could guess, but it is not worth the effort.
INTP
"Program testing can be used to show the presence of bugs, but never to show their absence."Edsger Dijkstra
|
|
|
|
|
... and then you remove more useful info from your post...
Only you know what's in this array of BYTEs.
A POINT is a structure containing two LONGs. The conversion from your mystery
BYTE array could be as simple as a cast or as difficult as iterating through the bytes
and creating POINT structs from them.
In your original post, you assumed a method was returning an array of points as a byte
array, but in reality, unless you know the Windows internals and you know it's not going to
change, that was a bad assumption. There's no documentation I know of that describes what's
in those bytes.
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
i have program which use this type of variable. but not defined error in compiler. plz help.
|
|
|
|
|
It's in comdef.h .
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Thnks, i know it is in comdef.h, which is part of windows 2003 SDK kit. i have included it but still in vain, may be some library or something elese is missing. please help. infact i have a program which work in .net 2003 but when i try to convert it in to .net 2005, this error occurs while compiling.
|
|
|
|
|
I have a application based on a CFormView class btw I use VC++ 2005. I want to know when the x button of the mainFrame is click how to send the app in the status bar instead of closing it. It already work with the File->Quit menu ( I use ON_COMMAND(ID_APP_EXIT, &NameOfTheClassView) ) but I don't know what happen in the code when the X button is clicked so I don't know where to add the code to send my app in the status bar.
Thanks for helping me.
David
|
|
|
|
|
HiEverybody wrote: I want to know when the x button of the mainFrame is click how to send the app in the status bar instead of closing it.
Search CP for Shell_NotifyIcon() examples.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
I already know all the stuff concerning Shell_NotifyIcon(). My question is how to intercept the X bouton in the main window and then hide the window so that only the tray icon will be visible.... ( intercept here is the KEY word ).
|
|
|
|
|
HiEverybody wrote: My question is how to intercept the X bouton in the main window...
Handle the WM_CLOSE message.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
I tried with this code. It's not working. What is missing ??
ON_MESSAGE(WM_CLOSE , CloseAppToTray)
LRESULT CSolsticeAcquisitionView::CloseAppToTray(WPARAM wParam, LPARAM lParam)
{
// MessageBox("Test"); // This is not displaying
CWnd *mainWindow;
mainWindow=AfxGetMainWnd() ;
mainWindow->ShowWindow(SW_HIDE);
return 0;
}
Thanks
David
|
|
|
|
|
Use ClassWizard (Ctrl+W) to create a function for the WM_CLOSE message. The net result will be something like:
BEGIN_MESSAGE_MAP(CMainFrame, CFrameWnd)
ON_WM_CLOSE()
END_MESSAGE_MAP()
void CMainFrame::OnClose()
{
CFrameWnd::OnClose();
}
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
I'm using Visual Studio 2005. No class wizard in there!!!
|
|
|
|
|
HiEverybody wrote: I'm using Visual Studio 2005. No class wizard in there!!!
Technically, yes, but the functionality is alive and well.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Ctrl-W do nothing.....
Are you using Visual Studio 2005 ?
I have already use VC6 and the class wizard was there... but were can I find it in Visual Studio 2005 ?
|
|
|
|
|
HiEverybody wrote: Are you using Visual Studio 2005 ?
No.
HiEverybody wrote: ...but were can I find it in Visual Studio 2005 ?
Right here.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|