|
Thank you ever so much , I will try and inform you of the outcome
|
|
|
|
|
Hi,
Am trying to find an implemenation of the
Zero Proof Algorithm in C++.
Does anyone have any pointers, have found it
in C# but not in C++, does it exist?
many thanks
|
|
|
|
|
If i create a raw socket, build my own IP and UDP header, and then use sendto() to send a packet.. what does the buffer have to contain? just data.. or the entire packet data with the header data and everything?
Kuniva
--------------------------------------------
|
|
|
|
|
|
But how does the socket know the source address it should use? I mean, the idea of the raw socket is that we can use setsockopt() to tell it it should use OUR header, and not the one filled in by windows by default. But in sendto() it would only get the socket,the data and a sockaddr_in structure as parameters, so you are saying the data for the header should be somewhere in the socket handle... because the sockaddr_in structure only contains data for the destination. I don't see how this is possible since a SOCKET is just a handle, an int.. How does it know the header to use? Perhaps you have an example for sending a packet with your own header? It would clarify a lot for me...
Thanks
Kuniva
--------------------------------------------
|
|
|
|
|
Microsoft have an example of using SOCK_RAW here
|
|
|
|
|
Hey,
I'm thinking about creating a little "game" that will produce a little character on your monitor, the character will walk around and do random little things, and interact with the cursor, and (hopefully) other windows. I'd like to make this character appear to be IN the computer, not an application or game. I'd like all other windows to be seen, and icons to be clickable, etc. For example:
I load up my game, and then decide to open winamp. Without having to minimize anything, or move any windows, I can just double click the winamp icon on my desktop. My character (still visible the whole time) keeps walking around or dancing, or whatever he wants to do the whole time.
I hope I've explained myself well enough.
Thanks in advance!
-Brian
-untwisted
www.uber-ware.com
brian@uber-ware.com
|
|
|
|
|
|
If I create a web service in C#, is it possible to consume it in normal C++ ? Is it going to be a nightmare ? I'm trying to decide on a home project and thinking of an app to use sourcesafe remotely, web service one end, C++ app the other ( so that the .NET framework is not needed remotely ).
Christian
NO MATTER HOW MUCH BIG IS THE WORD SIZE ,THE DATA MUCT BE TRANSPORTED INTO THE CPU. - Vinod Sharma
Anonymous wrote:
OK. I read a c++ book. Or...a bit of it anyway. I'm sick of that evil looking console window.
I think you are a good candidate for Visual Basic. - Nemanja Trifunovic
|
|
|
|
|
Christian Graus wrote:
If I create a web service in C#, is it possible to consume it in normal C++ ?
If by "normal C++" you mean VC 7.x, then yes. You need to use ATL Server like in this example.
Christian Graus wrote:
Is it going to be a nightmare ?
For development, no. For deployment - it requires MSXML which is a drag.
|
|
|
|
|
Cool - thank you. MSXML is a lot smaller than the .NET framework, and included in IE 5.5 ( from memory ), so that's still a lot easier in terms of deployment IMO. So that suits me just great.
Christian
NO MATTER HOW MUCH BIG IS THE WORD SIZE ,THE DATA MUCT BE TRANSPORTED INTO THE CPU. - Vinod Sharma
Anonymous wrote:
OK. I read a c++ book. Or...a bit of it anyway. I'm sick of that evil looking console window.
I think you are a good candidate for Visual Basic. - Nemanja Trifunovic
|
|
|
|
|
Not sure if this the answer you're looking for, but if the web service accepts HTTP GET requests, like CP's service, then you can call IXMLDOMDocument::load() and pass it the URL to the service, and let the XML parser do the rest. Check out my CP screen saver, which uses this method.
BTW MSXML comes with IE 5+, and is available as a redistributable for those poor people stuck on IE 4.
--Mike--
Latest blog entry: *drool* (Alyson) [May 10]
Ericahist | Homepage | RightClick-Encrypt | 1ClickPicGrabber
"You have Erica on the brain" - Jon Sagara to me
|
|
|
|
|
This example seems to write both server and client in ATL, is it possible to write the server in C#, or does that complicate things ?
Christian
NO MATTER HOW MUCH BIG IS THE WORD SIZE ,THE DATA MUCT BE TRANSPORTED INTO THE CPU. - Vinod Sharma
Anonymous wrote:
OK. I read a c++ book. Or...a bit of it anyway. I'm sick of that evil looking console window.
I think you are a good candidate for Visual Basic. - Nemanja Trifunovic
|
|
|
|
|
Christian Graus wrote:
is it possible to write the server in C#, or does that complicate things ?
Yes. In fact you can write the server in any programming language, as long as you have a valid SOAP library.
However, I've tried only the opposite combination: ATL server and C# client. It worked just fine, and I assume (but cannot guarantee) that your case will be fine too.
|
|
|
|
|
The web service will return an xml which you can "consume" in normal c++.
Jason Henderson My articles
"The best argument against democracy is a five-minute conversation with the average voter." - Winston Churchill
|
|
|
|
|
which function can capture mouse and cursor events of system?
is it possible to capture their shapes (i.e. Arrow or user icon of mouse, cursor shape in different edit)?
thx
includeh10
|
|
|
|
|
It sounds like you are needing a system-wide hook. See if SetWindowsHookEx() works.
|
|
|
|
|
Forgive me if I am using the wrong terminology.
By system tool bar I mean the bar that defaults to the top of each application. The bar that host the minimize, maximize and close buttons.
Two questions.
(1) what is this area of the screen correctly called? Is it the frame?
(2) Can you point me towards an article that would show me how to add a button to this bar?
thanks
|
|
|
|
|
McGahanFL wrote:
Can you point me towards an article that would show me how to add a button to this bar?
There actually is one here on CodeProject about that!
I don't remember where because it was like hell to find it when I was searching for it!
Happy searching! (if not somebody post the link)
Rickard Andersson8
Here is my card, contact me later!
UIN: 50302279
E-Mail: nikado@pc.nu
Interests: C++, ADO, SQL, Winsock, 0s and 1s
|
|
|
|
|
Hi,
I have a DlgApp that launch other applications. When the user click on a button, a popup menu is created with some data that I have collected in my database. The user then need to select an item into the menu. The selected info is used as parameters to launch the other app.
This is my click button handler:
void CmyDlg::OnBnClickedBtnDbmanager()
{
CMenu myMenu;
CRect rect;
m_wndDBBtn.GetWindowRect(&rect);
monMenu.CreatePopupMenu();
monMenu.AppendMenu(MF_STRING, 0, "Name1");
monMenu.AppendMenu(MF_STRING, 0, "Name2");
monMenu.AppendMenu(MF_STRING, 0, "Name3");
monMenu.AppendMenu(MF_STRING, 0, "Name4");
myMenu.TrackPopupMenu(TPM_LEFTALIGN|TPM_LEFTBUTTON, rect.left+20, rect.top+20, AfxGetMainWnd());
}
I would like to know how I can get the index of the menu. For example, if I select name4 into the menu, I would like something to tell me that the fourth item is selected... After that, I can use GetMenuString() to retrieve my data and launch my other App.
As you can see, unstead of ID as second parameter into AppendMenu() I have 0. The reason of this is that I dont know how many info I will have to put into my menu, so i can't provide ID for each of them.
Any Ideas?
Everything's beautiful if you look at it long enough...
|
|
|
|
|
a) Specify the index as second parameter in AppendMenu
b) use TrackPopupmenuEx, and specify TPM_RETURNCMD in the flags.
The return value will contain the value passed as second parameter to AppendMenu
c) NEVER EVER use an User Interface String (such as the one displayed in the menu) directly for further processing. Don't do that. Never. it is not done.
"Der Geist des Kriegers ist erwacht / Ich hab die Macht" StS
sighist | Agile Programming | doxygen
|
|
|
|
|
MemLeak wrote:
I would like to know how I can get the index of the menu.
Assign the menu items unique IDs starting with 1 and incrementing. Add the TPM_RETURNCMD flag to TrackPopupMenu() and it will return the ID of the item the user selected, or 0 if he cancelled the menu.
--Mike--
Latest blog entry: *drool* (Alyson) [May 10]
Ericahist | Homepage | RightClick-Encrypt | 1ClickPicGrabber
"You have Erica on the brain" - Jon Sagara to me
|
|
|
|
|
Anyone know of a problem with the old fprintf function? I have been using it for years now and all of a sudden during some testing it has started to crash inside the call.
|
|
|
|
|
iltallman wrote:
I have been using it for years now and all of a sudden during some testing it has started to crash inside the call.
Could you be trying to reference a memory location that no longer exists?
-Nick Parker
|
|
|
|
|
No. I looked in the debugger at all the data and attributes - it all looked good with appropriate NULL ending strings
|
|
|
|